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
using System; | |
using System.Net.Http; | |
using System.Security.Cryptography; | |
using System.Text; | |
/* | |
* This gist shows a sample of signing a GET request for shrimpy.io | |
* based on Pyton sample on https://developers.shrimpy.io/docs/?python#creating-a-request | |
*/ |
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
# | |
# All credits of this source code to https://www.investingdev.com/en/statarb-in-forex/ | |
# | |
######################################################################################## | |
## Imports and set working directory ## | |
######################################################################################## | |
require(tseries) |
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
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "RemoteSigned" | |
$jforex3Jnlp = 'jforex_3.jnlp' | |
$baseURL = 'http://platform.dukascopy.com/demo_3/' | |
$sourceJnlpURL = "$baseURL$jforex3Jnlp" | |
$appFrameworkXPath = '//jnlp/resources/extension[@name="AppFramework"]' | |
$jarsXPath = '//jnlp/resources/jar' | |
$outFileJForex3Jnlp = "$PSScriptRoot\jforex_3.jnlp" | |
$outFileLibs3Jnlp = "$PSScriptRoot\libs_3.jnlp" | |
$localLibSubDir = "jforex3libs" |
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 |
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
# 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
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
# 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
rm(list = ls()) | |
gc() | |
library(knitr) | |
library(blotter) | |
if (!exists('.blotter')) .blotter <- new.env() | |
suppressWarnings(try(rm(list=c("account.forex","portfolio.forex"),pos=.blotter),silent=TRUE)) | |
suppressWarnings(try(rm(list=c("b.strategy","myTheme","EURUSD",".getSymbols")),silent=TRUE)) |
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\\" |