For a rotational system, I am trying to filter out or exclude certain stocks with a Close < 10 or RSI(14) > 60
The positionscore is based on a different indicator.
Does "Filter" work here or is that only for exploration?
i.e. Filter = Close < 10;
Would this require a custom back test?
thanks in advance,
@djjazzy213 Filter
is a Reserved Variable. Probably best to not use it as a user created variable in your formula. You can incorporate the ideas you have while building your PositionScore. An example might be something like this,
Score = ... // your forumula for creating a ranking
PositionScore = IIf(C > 10 OR RSI(14) > 60, 0, Score);
3 Likes
fxshrat
September 25, 2020, 9:02am
3
Technically there is not a problem in using Filter
in backtest (or elsewhere) and doing this:
SetBacktestMode(backtestRotational);
SetPositionSize(1, spsPercentOfEquity);
Score = 100-RSI();
Filter = C > 10 OR RSI(14) > 60;
PositionScore = IIf(Filter, 0, Score);
Upper code would have same outcome as this code:
SetBacktestMode(backtestRotational);
SetPositionSize(1, spsPercentOfEquity);
Score = 100-RSI();
MyFilter = C > 10 OR RSI(14) > 60;
PositionScore = IIf(MyFilter, 0, Score);
Filter
would function like any other user variable. It will not filter (in backtest) but will just store array in upper example.
Only in Exploration Filter
would have additional/main function of... well, filtering result output. It is essential part there.
2 Likes
system
Closed
January 3, 2021, 9:02am
4
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.