Please help me complete this code

Forums ProRealTime English forum General trading discussions Please help me complete this code

Viewing 3 posts - 1 through 3 (of 3 total)
  • #194483

    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.

    Thank you for your help everyone.

     

    #194493

    Try replacing lines 7-13 (and you can remove line 1) with these:

     

    #194494

    If you still want to use the WHILE iteration, change line 7 this way:

Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login