Help writing EA

 

Hi all,

I am new with forex and EA.

I read Mql4 manual but write an EA is quite difficult.

I need one EA that use only one market order (no two or more orders and no pending orders) and follow this condition:

_When ADX signal cross upward the ADX main and the next bar is more than one point from the previus EA, automatically, open a buy position

_When ADX signal cross downward the ADX main and the next bar is more than one point from the previus EA, automatically, open a sell position

_When MacD signal cross upward or downward MacD main EA, automatically, close all position

I need this for testing purpose and for understand how I can write an EA.

In the EA if it is possible I would introduce also

_Automatic StopLoss (If I lose 30 point)

_Automatic TakingProfit (If i "win" 50 point)

_Send email when EA open a position and when close a position

Thanks!

 
use trendlines and wait for signals and trade them and forget EA this programms make the most people not satisfied.
 

Thanks PipTraderTim for your answer.

Why you think so?

Can you, however, help me to write the EA?

Thanks

Reason: