Portfolio Trader Spread System

Questions about MultiCharts and user contributed studies.
Posts: 20
Joined: 21 Jul 2015
Has thanked: 2 times
Been thanked: 1 time

Portfolio Trader Spread System

Postby GiuseppeM » 21 Jul 2015

Schermata 2015-07-21 alle 22.33.06.png
(20.07 KiB) Downloaded 398 times
Schermata 2015-07-21 alle 22.35.25.png
(70.93 KiB) Downloaded 397 times
i have this problem with portfolio trader using the basic Pair Trading Strategy included in the strategy library of Multicharts.

When i backtest the strategy every pair trade is perfectly synchronized and simoultaneous.

Unfortunately when i do a Foward Testing things the positions are unsinchronized for the duration of an entire bar or sometimes 2 bars and sometimes they don't even re-synchronize at all.
Actually the unsinchronized operations outnumber the others wich are correct.
The problem persist also when i automate the order execution with a demo account on IB.

So i am wondering why and i have attached my strategy settings and the data resolution with 2 futures on crude oil both master and slave in 1 minute resolution.
Any Help? thank you very much in advance..

The only thing that i have modified in the code is the exit criteria that goes like this:

Code: Select all

if ratio < AvgRatio and cur_pos = -1 then begin
cur_pos = 0;
buytocover this bar c;
if ratio > AvgRatio and cur_pos = 1 then begin
cur_pos = 0;
sell this bar c;

Return to “MultiCharts”