fxcodebase-backup

Pairs trading strategy

Source: https://fxcodebase.com/code/viewtopic.php?f=17&t=63096
Forum: 17 · Topic 63096 · 4 post(s)


Pairs trading strategy

cbshanghailive · Tue Feb 02, 2016 1:33 pm

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


Re: Pairs trading strategy

Apprentice · Thu Feb 04, 2016 4:04 am

Your request is added to the development list.


Re: Pairs trading strategy

Apprentice · Mon Aug 28, 2017 5:40 am

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

Apprentice · Tue Sep 18, 2018 6:55 am

The Indicator was revised and updated.