Thank you for your post.
Please confirm the following: Are you placing the BarsInProgress check within OnBarUpdate()?
1. How can we code the strategy to submit an order limit +- n ticks from the close of a bar where DeltaHigh>Limit or DeltaLow<-Limit?
To have your strategy submit a limit order +/- N ticks from the Close of a bar, you could add a check for your condition to compare the cumulativeDelta.DeltaHigh[0] or .DeltaLow[0] to the DeltaLimit you specified in your script followed by calling EnterLongLimit to place an order if the condition is met. Please see the example code snippet below for how this could be accomplished.
if (cumulativeDelta.DeltaHigh[0] > DeltaLimit)
{
EnterLongLimit(Convert.ToInt32(DefaultQuantity), (Close[0] + (4 * TickSize)) , @"LongEntryStrong");
}
2. I suppose that if next bars conditions are not met the order will cancel as normal.
If the limit order isLiveUntilCanceled property is set to false or is not used and the order is not filled and not submitted again on the next bar, the order will automatically be canceled.
Please review this help guide link for information about the isLiveUntilCanceled property - https://ninjatrader.com/support/help...tlonglimit.htm
Let us know if we may further assist.
Comment