i have some code, very simple! It is to limit the number of positions that PT can open, the first part of the code which is to limit the number of positions works, but the second part which allow PT to begin executing new positions once open positions drops back below the MaxPositions threshold does not:
pmms_strategy_allow_entries(idx);
I realise this function is not correct and is to allow a strategy with an idx to begin trading, yet i can not find the correct reserve word which does the opposite to this:
pmms_strategies_deny_entries_all();
Many thanks.
Code: Select all
inputs: MaxPositions(25);
Variables:
PositionHeld(0),
idx(0);
array: Indexes[](0);
PositionHeld = Portfolio_CurrentEntries;
if PositionHeld > MaxPositions then begin
pmms_strategies_deny_entries_all();
end;
if positionheld < maxpositions then begin
pmms_strategy_allow_entries(idx);
end;