I am trying to configure a trailing stop in my strategy.
I want to enable trailing stop, after a certain ticks have been made in the right direction. I added an integer variable TrailProfitTrigger that I want to use as an offset between the Average position price and the current close[0].
The problem is that the trailing stop is always executed without any reference to the offset in the averge position price and the current close.
It acts as if I have a fixed TrailingStop that is always been added simultaneously with the orde.
Here is the code that I am using for my long entries...
if (Position.MarketPosition == MarketPosition.Long
&& Position.AvgPrice + TrailProfitTrigger * TickSize <= Close[0])
{
SetTrailStop("EnterLong", CalculationMode.Ticks, TrailingProfitTaker, false);
}
Any Ideas?
Comment