Hi.
How can i use this indicator as filer in a strategy?
Average Filter Regression
You can embed the whole code in your strategy, like this one https://www.prorealcode.com/prorealtime-trading-strategies/optimization-ma-cross-machine-learning/, or you can CALL it this way:
Periods = 15
MAtype = 2
indicator1 = CALL "Average Filter Regression"[Periods, MAtype](close)
Thanks Rob.
Another questing same topic.
Timeframe(4h)
A = call "My Indicator"[filter](close)
Timeframe (default)
filter, A, B, C = Call "My indicator"
FILTER=RSI[14]
A=1
B=2
C=3
return filter, A, B ,C
Problem: Your indicator return 4 values, but your code need 1
Line 2 and line 5 in your strategy must match (with different variable names as they belong to different TFs):
X,Y,Z,W = call "My Indicator"[filter](close)
If you don’t need all of them, you can replace the ones unneeded with IGNORED:
ignored,Y,ignored,ignored = call "My Indicator"[filter](close)