Exit point of the first trade is sometimes exactly at the same moment that a new outside bar occurs and thus a new entry trade should be entered.
This is not a problem.
However, i have noticed that sometimes Ninjatrader can’t handle this and will try to exit the initial position TWICE ! + also enter into a new position....In the end i will be left with a position that will not be exited...
Also... In my code i have defined : short, exit short, long and exit long....
I don’t know where the “Close position” that is causing the problem comes from, because it is not in the code...
In this example i made one short entry, one short exit, one long entry and one long exit..
However, dus to an extra BUY order to "Close position"of the initial short trade, i am left in the end with a buy position...
INTC Sell 1 25.69 20:29:30 short
INTC Buy 1 25.73 20:31:35 close position
INTC Buy 1 25.73 20:31:35 long
INTC Buy 1 25.73 20:31:35 exit short
INTC Sell 1 25.73 20:35:34 exit long
Does anybody know if i am doing something wrong ?
I have added a screenshot of the conditions to enter or exit a position
Comment