Hello, im new in EA coding and i want to make a simple trading system automated. The system only uses one Simple MA oof 13 periods and a price line that will be defined by me.
I want the EA open a buy when the Simple MA crosses over the price line and make a sell when the Simple MA crosses below the price Line. If there exists an open position i want the EA close it and open the new one. I want to use it in 1 Min chart and in EUR/USD.
I will really appreciate if someone can help me. If you have questions please ask me, i will find the way to compensate you for your help.
How do you define your price line?
double ma= iMA(NULL,0,13,0,MODE_SMMA,PRICE_CLOSE,0);
it's for get the sma value at current bar..
now want to buy or sell when price cross the sma like this:
if ( High > ma )
iHigh (Symbol(), PEROID_D1, 1);
Please enable the necessary setting in your browser, otherwise you will not be able to log in.