Need help combine 2 indicators to an EA

 

Hi guys, I recently just started studying EA and indicator scripts only. I have 2 indicators in my hand and currently using them as they are. I had tried to combine them but I failed. I know nuts about this language... Hope to meet some nice guy who is willing to help me combine these 2 indicators to an EA which is able to make automated trades.

Here's how I work with these 2 indicators. Both of them uses ema crossess. One of them identifies the middle term trend by drawing only white arrows and the other indentifies the current trend by drawing orange arrows for up trend and red arrows for down trend.

Using the default values of the original indicators and still drawing the exact arrow signals like the original indicators, I hope the combined EA would be able to make trades under the following conditions:

Place a buy position when

-Mid trend = up

-plus whenever current trend triggers up trend

Close the buy position when

-Mid trend = up

-plus whenever current trend triggers down trend

Place a sell position when

-Mid trend = down

-plus whenever current trend triggers down trend

Close the sell position when

-Mid trend = down

-plus whenever current trend triggers up trend

Also just to make it more complete, hope it allows users to enter lot amount to trade and has a trailing stop loss option. Thanks to all that helps out . The original alerts can be remove and hopefully alerts me only when it opens or close any positions. Thanks so much...