I currently have a multitimeframe strategy setup on 4 range and 1 range bars. 4 range handle the entry conditions and initial entry order, while the 1 range series handles order cancellation if the close price moves 2 ticks away from entry order.
The problem im having is that once an order has been placed, a cancellation preceeds it immediately.
if (Position.MarketPosition == MarketPosition.Flat && BarsInProgress == 0) {
if (Bla Bla) {
entryOrder1 = EnterLongLimit(0, true, DefaultQuantity, Close[0] - 2 * TickSize, "Long 1a");
Buy = true;}
if (Position.MarketPosition == MarketPosition.Flat && BarsInProgress == 1) {
if (Buy == true && entryOrder1 != null && entryOrder1.LimitPrice != null && Close[0] == entryOrder1.LimitPrice + 2 * TickSize) {
CancelOrder(entryOrder1);
Buy = false;}
I cannot use Indicator(BarsArray[1])[0] command as the indicator is custom 3rd party.
CalculateonBar close is true.
Any ideas on how to combat this?
Thanks
James
Comment