This is my code snippet:
protected override void OnBarUpdate()
{
EnterLongLimit(54.2, "");
SetProfitTarget(CalculationMode.Price, 54.36);
}
So, m question is, how to let the strategy to enter market, only when the price is higher than or equal to X? I tried if Close[0] >= X, but in backtest, the Close[0] is referring to the close of bar, instead of the price at that moment.
Thanks, and sorry if my question is not clear enough. I will provide more info and explanation if needed.

Comment