That is not evaluating to true, ever.
When you defined flagbarlong in #var, you defined it as an int and set it to 0 yes?
Try removing the && flagbarlong == 0 from above, just to make sure the condition starts working.
Sorry I can't just run the code on my side, but I haven't even opened NinjaTrader in 2 weeks and it feels good
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.