Pairs trading strategy

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Pairs trading strategy

Postby 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
indicator for pairs trading
(11.05 KiB) Downloaded 673 times
cbshanghailive
 
Posts: 1
Joined: Tue Feb 02, 2016 1:22 pm

Re: Pairs trading strategy

Postby Apprentice » Thu Feb 04, 2016 4:04 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Pairs trading strategy

Postby 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 ....
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Pairs trading strategy

Postby Apprentice » Tue Sep 18, 2018 6:55 am

The Indicator was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 45 guests