I am testing Portfolio Trader. I try to long DAX and ESTX50 future on Portfolio Trader
(Pls see attached photo) My code is as below:
Code: Select all
var:intrabarpersist p1(0), intrabarpersist p2(0);
p1= close of data1*25;
p2= close of data2*10;
value10=p1+p2;
if marketposition=0 and value10>0 then buy 1 contract this bar at close;
Value51 = pmms_strategy_openprofit(0);
if value51 >60 then begin
sell 1 contract next bar at market;
end;
if value51 <-60 then begin
sell 1 contract next bar at market;
end;
1.Sometimes, Dax will be executed first, ESTX50 will be executed after 10-15 seconds.
2.While exit condition is satisfied, only DAX will be sold. ESTX50 is still live.
3.DAX & ESTX50 P/L value on TWS is not the same as P/L value on Portfolio Trader.
May I know is there solution for my questions? My computer is Win7 Intel i7, 256G SSD, 16GDRAM. I guess the performance should be ok.
Thanks for your answer and suggestion.
Charles