if ( ( MacdCurrent<0 && MacdCurrent>MACDSignalCurrent && MacdPrevious<MACDSignalPrevious ) || ( MacdCurrent>0 && MacdCurrent<MACDSignalCurrent && MacdPrevious>MACDSignalPrevious ) && ( StochasticCurrent>StochasticSignalCurrent && StochasticPrevious<StochasticSignalPrevious ) && ( MA_Rapide>MA_Lente ) ) //can be re-written as if ( MacdCurrent<0 ) //and if (MacdCurrent>MACDSignalCurrent) //and if (MacdPrevious<MACDSignalPrevious) //Then { //do action whats_happening_dude } // or if (MacdCurrent>0) //and if (MacdCurrent<MACDSignalCurrent) //and if (MacdPrevious>MACDSignalPrevious) //and if ( StochasticCurrent>StochasticSignalCurrent ) //and if ( StochasticPrevious<StochasticSignalPrevious ) //and if (MA_Rapide>MA_Lente) //then { //do action whats_happening_dude }
Hello,
If this code can help a newbie than me.
below my new code following remarks.
if( ( (MacdCurrent>0 && MacdPrevious<0) || (MacdCurrent<0 && MacdCurrent>MacdPrevious && MacdCurrent>MACDSignalCurrent) || (MacdCurrent>0 && MacdCurrent>MacdPrevious && MacdCurrent>MACDSignalCurrent) ) && ( (StochasticCurrent<80) && (StochasticCurrent>StochasticPrevious) && (StochasticSignalCurrent>StochasticSignalPrevious) && (StochasticCurrent>StochasticSignalCurrent) && (StochasticPrevious>StochasticSignalPrevious) ) && (MA_Rapide>MA_Lente)) { //+------------------------------------------------------------------+ //| Buy Achat_1 et BuyLimit Achat_2 | //+------------------------------------------------------------------+ }
Thanks.
I create a other topic for a new question

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
Sorry for my bad English, if you can give me a little advice on my code. I think it can be used also to other newbie.
I created a EA that works correctly (no error), however, I would like to be inserted on conditions.
I joined the conditions of two moving averages, a MACD and stochastic.
It is on this point that I beseech you, I'm not putting on good conditions on the MACD
Thanks for your help.
Arsouille