After I entered a position, I would like to set a trailing stop based on the EMA(p). To do that, I wrote in OnBarUpdate():
SetTrailStop(CalculationMode.Price, EMA(p)[0])
but it doesn't work (even if it appears in the TraceOrders).
How can I obtain such behaviour?
Thank you

Comment