Hi.
My ATR based (end of day) trailing stop loss code works well in ProBacktest:
close<(Highest[BarIndex-TradeIndex+1](high)-(ATR*2.5))
However, when I try to code it as an indicator on charts, the following error message is displayed:
BUY/STOP orders are only allowed in ProBackTest
Why is this trailing SL not allowed as an indicator?
Can you suggest an alternative solution?
Thanks in anticipation,
As your post reports, indicators do not support BUY/STOP orders.
Indicators can only RETURN data/signals. Orders are not their goal.
Remove any trading order and add RETURN.
It is because indicators cannot have code in them that is do with orders. TRADEINDEX is a PrOrder code word and not a ProBuilder code word.
The best way to display the stop level is to do it in the strategy by using GRAPHONPRICE.