I am trying to write a very simple breakout strategy but I don't know why I am having so much difficulty. All I want to do is lokk at first 60 bars on any chart and store Highest high and the lowest Low of the first 60 bars. Then, go long if price moves 1 tick above highestHigh or go short if price move below lowestLow by 1 tick. Profit target and stoploss are 30 ticks and I want to do this trade only once per trading session. attached is my Ninjascript .txt file which I think is very close but it is not working as outlined above objective. It is ignoring to not trade until after 60 bars and starts to go long or short from second bar. Also, it trades multiple times a day ignoring the tradecounter. Can someone please help me what I need to change?
Thanks.
Comment