how put one order if have signal - page 3

Simon Gniadkowski
17411
RaptorUK:
How do you know when the signal has gone ?

??
phipho
167
phipho  
RaptorUK:
?


when EMA 14 cut EMA 100. i will order one command.
Simon Gniadkowski
17411
phipho:

when EMA 14 cut EMA 100. i will order one command.

So when your signal is set place your trade and toggle a flag . . . 

SignalSet = true;

 but only place the trade

if(SignalSet == false)

// or 

if(!SignalSet)

 So now your SignalSet flag will be true and you won't have any more trades placed for the same signal . . .  

When you have detected that your signal has gone  . . .

SignalSet = false;

  . . . and next time you have a signal to place the trade you can . . .

phipho
167
phipho  
RaptorUK:

So when your signal is set place your trade and toggle a flag . . . 

 but only place the trade

 So now your SignalSet flag will be true and you won't have any more trades placed for the same signal . . .  

When you have detected that your signal has gone  . . .

  . . . and next time you have a signal to place the trade you can . . .


now i must put this code where my EA
SignalSet = true
Simon Gniadkowski
17411
phipho:

now i must put this code where my EA
Think about it and figure it out . . .
phi nuts
2092
phi nuts  
phipho:
because i'm new guy learn write code mql4. I must learn write a easy EA. 

Do you know what moving average is ?.

If you do what I said, you will be able to answer RaptorUK's question "How do you know when the signal has gone ?" and you won't have many orders on every bars.