Tampa Florida
Posts: 1 since Feb 2023
Thanks Given: 0
Thanks Received: 0
|
I am having trouble writing a very simple ninjatrader 8 strategy in the strategy builder.
I am trying to write it for instrument NQ on a 1000 tick chart, but would like this to be modified by the user to be able to select any instrument and any chart type/time frame
The parameters/conditions are;
Trading hours between 8 AM and 4 PM EST
Enter long position if tick bar close above 50 period SMA
Enter short position if tick bar close below 50 period SMA
inital profit target set at 120 ticks
initial stop loss set at 80 ticks
(I would like the user to adjust these profit target and stop loss values)
and I would like the strategy to not enter a new long until a short position is triggered (this is the part I am getting hung up on) right now I have been trying to write this strategy but after it hits profit target it enters a new long trade after that bar close because it is still above the 50 SMA and vice versa for the short side
I'd like the strategy to be able to "reset" itself so that it does not enter a new trade after profit target until it closes back over the other side of the 50 period SMA.
Any and all help would be greatly appreciated.
|