EA of ZigZag and MA combinaion

 

hi guys

i need help with coding an EA that has ZigZag and moving average  with the following funtions


//BUY CONDITION

-ZigZag at lower candlesticks

-Moving average below candlesticks 

//ENTRY POINT

-1st close candle below MA




//SELL CONDITION

-ZigZag at higher candle

-Moving average above candlesticks

//ENTRY POINT  

1st close canlde below MA


with  adjustable Stop Loss,Take Profit,Lotsize by user

Files:
 

Interesting and can be done. 

What are the characteristics of your MA ? 

What are the slop loss and Take profit conditions ?

 
iyadC:

Interesting and can be done. 

What are the characteristics of your MA ? 

What are the slop loss and Take profit conditions ?

I am not really good at coding thats why i needed help 

 
MA

ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,0);

STOP LOSS AND TAKE PROFIT
 
if(StopLoss > 0)
      {
       ShortSL = Bid + (StopLoss * Point);
       LongSL = Ask + (StopLoss * Point);
      }
      
    if(TakeProfit > 0)
      {
        ShortTP = Bid + (TakeProfit * Point);
        LongTP = Ask + (TakeProfit * Point);
      } 


i hope i provided the right thing that you requested