Only enter on first signal

 
I want my EA to only enter on the first signal, e.g. when the 3 MA crosses the 8 MA when both are above the 200 MA. At the moment the EA will do this on every cross above the 200 MA, but I would like to set it to ONLY enter on the first 3/8 cross above/below the 200MA. If I can find out how to do this it would be great as I could then apply it to other indicators, to only take the trade on the frist instance of a technical analysis.
 
gangsta1: I want my EA to ...
  1. So code it that way.
  2. Since there are no slaves here, you have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt and the nature of your problem.
 
gangsta1:
I want my EA to only enter on the first signal, e.g. when the 3 MA crosses the 8 MA when both are above the 200 MA. At the moment the EA will do this on every cross above the 200 MA, but I would like to set it to ONLY enter on the first 3/8 cross above/below the 200MA. If I can find out how to do this it would be great as I could then apply it to other indicators, to only take the trade on the frist instance of a technical analysis.

In beginning of EA, define a static bool variable and set it to false. Now along with the cross condition, check if variable is false. set that variable to true when cross happens. 


Reason: