how i can code this ?

 
hello,
i write this post to have some advise how i can code this idea:
i read the lesson post on babypips forum about the ema like dynapic support and resitance; and that is what i want to code:
esample : i have 5 ema 20/50/100/150/200 the price go down , before the brake down for example the 150 ema is the resistance and the 50 the support

how can write a code that recognizing which is the latest ema lower that acted as resistance and one that acted as support .I thought to find the bar that breaks and save index from that analyze the future to determine the new dynamic support , analizando instead by the bar break the bars past which is the ema which was the resistance (esample: After the last break for ema which the price was always below , if the price was alway's belove 100/150/200 the las t resistenze min was the 100 ema period).

this is my question wixh is the best way to realize that :

thanks for info of any example of code
 
Modify the standard MACD Expert.
 
Marco vd Heijden:
Modify the standard MACD Expert.

thanks, what do you mean with modify macd expert?

this part?


 //--- check for long position (BUY) possibility
      if(MacdCurrent<0 && MacdCurrent>SignalCurrent && MacdPrevious<SignalPrevious && 
         MathAbs(MacdCurrent)>(MACDOpenLevel*Point) && MaCurrent>MaPrevious)
 
Marco vd Heijden:

i no understand what you mean could you explain me ?


some else have a idea? or advice?


thanks anyway

 
use the order functionality but change the indicator crossovers to your strategy.
 
thanks
Marco vd Heijden:
use the order functionality but change the indicator crossovers to your strategy.

i 'm looking for a logic that found the ema that could work like dynamic sup/res

however thaks soo much for your answer

Reason: