Page 1 of 1

Pairs trading strategy

PostPosted: Tue Feb 02, 2016 1:33 pm
by cbshanghailive
EURUSD W1 (02-04-2016 0925).png

Hello I am new to Lua language. Can anyone help me develop a strategy for pairs trading? Currently I have developed indicators for pairs trading. But I don't know how to write codes that can trade two different commodities. My opinion is that when pairs trading signals exceed upper line, then sell commodities with relatively high price while buy commodities with relatively low price automatically.But how to achieve that in code? Attachment is indicator for pairs trading for your reference.
as4.lua
indicator for pairs trading
(11.05 KiB) Downloaded 680 times

Re: Pairs trading strategy

PostPosted: Thu Feb 04, 2016 4:04 am
by Apprentice
Your request is added to the development list.

Re: Pairs trading strategy

PostPosted: Mon Aug 28, 2017 5:40 am
by Apprentice
Can you define this with pseudo code.
If ... then buy
if ... and ... then...

How is related to the indicator.

If indicator > Top Line buy 1, sell 2 ....
if indicator < Bototm Line buy 2, sell 1 ....

Re: Pairs trading strategy

PostPosted: Tue Sep 18, 2018 6:55 am
by Apprentice
The Indicator was revised and updated.