My objective is to initiate a signal when close is less than an EMA for a certain number of bars.
I have never used FOR/WHILE loops before and need help resetting my counter when a trade is initiated. So far, I can only get it to reach the counter once, enter a trade then every time it closes a trade it will immediately re-open a trade as the counter has not reset.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue