Scorenorotate specific for a symbol


I am doing a rotational strategy with the following settings:

  1. a score that identifies best trades
  2. a confirmation (should be used on entry only) that will change score to 0 if it's not true.

I am using the following line to check for the confirmation:

PositionScore = IIf(confirmation, PositionScore,0);

But when the confirmation is False anytime it exists the trade, is there any way that I can force the backtester to consider that line of code only at entry of a position ?

I tried using ScoreNoRotate but found it freezing the whole rotation as mentioned in the documentation.


In rotational testing, the PositionScore is used to determine both entries and exits. So the only way to prevent it being used conditionally for an entry only would be via the mid-level custom backtester.

This KB article demonstrates something similar to what you're after, so you should be able to use it as a starting point to get what you need.

If your "confirmation" is symbol specific, you'll need to store the result in symbol specific static variables to pass in to the CBT code for use in determining which signals to exclude.

1 Like