I made a code as usual.
But, SetProfitTarget() and SetStopLoss() not triggered a all.
if( is_flat && Is_Long_Signal_Entry )
{
SetProfitTarget("", CalculationMode.Ticks, 100 );
SetStopLoss(CalculationMode.Ticks, 17 );
EnterLong();
}
if( is_flat && Is_Short_Signal_Entry )
{
SetProfitTarget("", CalculationMode.Ticks, 100 );
SetStopLoss(CalculationMode.Ticks, 17 );
EnterShort();
}
I tried to use CalculationMode.Ticks and CalculationMode.Price - same result.
While this work normally:
if( Position.GetUnrealizedProfitLoss(PerformanceUnit.Ticks, Close[0]) < -17 )
{
if( is_long ) ExitLong();
if( is_shrt ) ExitShort();
}
What it can be?
Theoretically, what can be the reason?
Comment