This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Part of WCF application host config file | |
WCF communication is proxying via locahost:8888 | |
--> | |
<system.net> | |
<defaultProxy enabled = "true" useDefaultCredentials = "true"> | |
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" /> | |
</defaultProxy> | |
</system.net> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Donchian Channel | |
def donchian(df, n): | |
i = df.index[-1] - 1 | |
dcuarr = [float('NaN')] * df.index[-1] | |
dclarr = [float('NaN')] * df.index[-1] | |
while i - n >= 0: | |
dcupper = max(df['High'].ix[i - n:i]) | |
dclower = min(df['Low'].ix[i-n:i]) | |
dcuarr[i] = dcupper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(chron) | |
require(Hmisc) | |
require(ggplot2) | |
#this function creates and returns date time for indexing purposes later | |
f = function(d, t) as.chron(paste(strptime(d, "%Y.%m.%d"), t)) | |
#path to data, change for pointing your repository | |
path <- "G://TickData//" | |
#suffix of the file names with extension | |
suffix <- "_UTC+0_00_noweekends_fxmtf.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(quantmod) | |
library(zoo) | |
library(chron) | |
#following section loads "Systematic Investor Toolbox" | |
setInternet2(TRUE) | |
con <- gzcon(url('https://github.com/systematicinvestor/SIT/raw/master/sit.gz', 'rb')) | |
source(con) | |
close(con) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#reads ticks and creates .rda file | |
library(xts) | |
library(zoo) | |
library(blotter) | |
symbol = "GBPJPY" | |
tick.data.dir <- paste0('g:\\JForex\\data\\', symbol) | |
tick.data.outdir <- "g:\\TickData\\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this gist anticipates following: | |
# existence of GBPJPY.csv with OHLC series in g:\TickData directory | |
# time series having date time in format %d.%m.%Y %H:%M:%S | |
# update above assumptions in accordance with your dataset | |
library(blotter) | |
symbol = "GBPJPY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.dukascopy.api.*; | |
import org.rosuda.JRI.REXP; | |
import org.rosuda.JRI.Rengine; | |
/** | |
* Created by tomas on 8/17/2016. | |
*/ | |
public class JRITestStrategy implements IStrategy { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import time | |
import struct | |
f = open(r'\\.\pipe\NPtest', 'r+b', 0) | |
i = 1 | |
while True: | |
s = 'Message[{0}]'.format(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main() | |
{ | |
var server = new NamedPipeServerStream("NPtest"); | |
Console.WriteLine("Waiting for connection..."); | |
server.WaitForConnection(); | |
Console.WriteLine("Connected."); | |
var br = new BinaryReader(server); | |
var bw = new BinaryWriter(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from random import random | |
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100 | |
pdata = pd.DataFrame({"a":flow, "b":flow}) | |
pdata.b = pdata.b.shift(9) | |
data = pdata.iloc[10:] * random() # some noise | |
import numpy as np |
OlderNewer