PTF Trader Time Frame

Questions about MultiCharts and user contributed studies.
no erocla
Posts: 134
Joined: 31 May 2013
Has thanked: 60 times
Been thanked: 7 times

PTF Trader Time Frame

Postby no erocla » 14 Dec 2015

Portfolio trader is calculated every tick and this, in my opinion, can give some loop problems.

To avoid this, i programmed all signals to 1 minute timeframe inserting the following string in each of them:

Code: Select all

pmm_set_my_named_num("FLAG",1);
then i check on portfolio trader signal if all minute bars are closed:

Code: Select all

var:idx(0),allow(0);

pmms_strategies_deny_entries_all;

for idx = 0 to pmms_strategies_count -1 BEGIN
ALLOW = ALLOW+pmms_get_strategy_named_num(idx,"FLAG");
END;


IF ALLOW = pmms_strategies_count THEN BEGIN

FOR IDX = 0 TO pmms_strategies_count-1 BEGIN
pmms_strategy_allow_entries(idx);
pmms_set_strategy_named_num(IDX,"FLAG",0);
end;

PRINT("ALLOW ",ALLOW);
END;

ALLOW = 0;
But sometimes happen that somethink doesn't work and Signals does not enter their trades at market.
Any idea to solve this ?

Thank you very much for any response
Best regards
No Erocla

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: PTF Trader Time Frame

Postby Henry MultiСharts » 17 Dec 2015

Hello no erocla,

Please add output to your code to find out why it does not work as expected for you:
https://www.multicharts.com/trading-sof ... t_Executed
viewtopic.php?f=16&t=10397


Return to “MultiCharts”