I'm at an impasse with what I'm trying to code and am really frustrated.
When I enter a trade on the 25 tick, I have exit criteria and pass criteria (both based on the 25 tick). If my exit criteria is triggered first, then I should exit the trade. However, if my pass criteria is triggered first, then I should only exit the trade based on criteria that gets triggered on the 200 tick chart.
The problem I'm having occurs when I enter a trade and my pass criteria gets triggered first (which means I should now only exit based on the 200 tick chart criteria), BUT, the 25 exit criteria gets triggered at least once before I can exit based on the 200 tick criteria. So, I end up exiting the trade much earlier and based on the 25 exit criteria instead of exiting based on the 200 tick criteria. I hope that wasn't confusing.

To alleviate this problem, I've tried using variables in numerous ways but am unable to get the correct results. I don't think what I'm trying to do is very difficult, but I do think it requires the use of variables, and I don't think I'm coding or resetting the variables correctly.
I am coding via NinjaScript. Can someone please be patient and explain how to accomplish the above results using variables OR if you can explain how to accomplish this without using variables, I would be eternally grateful!
Thank you.
Ttrade12

Comment