I am new to coding and am coding in NinjaScript. I'm using multiple time frames in my strategy and I'm entering in trades on 2 of those timeframes. Some of my exits are getting triggered immediately after I enter a trade. I'm trying to fix this by adding to my exits the criteria for there to be at least 2 bars since entry. I've been trying different variations of the below but it either doesn't fix my issue or I don't enter into any trades. Below is the last variation I've tried and it's still not correct. Sigh. Can someone please tell me what I'm doing wrong? Thanks for any guidance you can provide.
&& ((BarsSinceEntryExecution() > 2) || BarsSinceEntryExecution() == -1)

Comment