I am developing a strategy with Strategy Builder, which does the following:
- calculate on close
- if a bunch of rules are met
- then enter with a stop market order 1 tick above the high of the current bar
This leads sometimes (actually quite often) to the case that the submitted stop order is rejected with the following error:
"An order has been ignored since the stop price ‘15767.75’ near the bar stamped ‘11/13/2023 12:14:59’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored."
As I understand it, when the stop order is submitted, the ask price is already above the stop order, which must not be the case. This usually happens, when the close price is very near or at the high of the bar.
This seems to be a very common problem. How is it typically solved or circumvented?
I have tried the following logic, but am unsure, if that is correct:
Added another condition, that checks, if the ask price is above or below the high of the entry bar. If it is already above, enter with a market order. If it is below submit the stop order.
Thanks for some help, how this problem can be solved best, ideally using Strategy Builder, since I am not writing NS code myself. Thanks.
Best regards
Philipp

Comment