Portfolio Trader Question

Questions about MultiCharts and user contributed studies.
ctu1121
Posts: 135
Joined: 05 Jul 2012
Has thanked: 10 times
Been thanked: 4 times

Portfolio Trader Question

Postby ctu1121 » 18 Sep 2014

Hi there,
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;
The code is very simple, only for testing. I note my observation as below:
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
Attachments
Port.jpg
(222.94 KiB) Downloaded 317 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Portfolio Trader Question

Postby Andrew MultiCharts » 24 Sep 2014

Hello ctu1121,

Please check the Order table of the Order and Position Tracker tab in Portfolio Trader. If the time when the orders are generated for both DAX and ESTX50 is identical, then the delay is caused by some external factors like queue at broker, absence of required prices, ets. The same for the exits + if there is no exiting order for ESTX50 in the table at all, it means that for a reason the strategy did not generate the order.


Return to “MultiCharts”