When I assigned a strategy on an instrument,it executes when the conditions are met. But it executes again and again on the same instrument when the target is completed. But I want it execute only ones. Please see the code and attached picture for clarification.
protected override void OnBarUpdate()
{
if ( (Close[0] > Close[1] * (1 + 0.0025)) && CrossAbove(RSI(10, 3), 30, 1))
{
EnterLongLimit(100, GetCurrentBid(), "");
SetProfitTarget("", CalculationMode.Percent, 0.01);
SetStopLoss("", CalculationMode.Percent, 0.01, false);
}
}
Thanks
Imran.

Comment