Can someone help me writing the code for an EA please?

[Deleted]  

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.

Thanks,

Jorge

jurcekmpt
594
jurcekmpt  

Hello!

How do you define your price line?

[Deleted]  

like this:

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[0] > ma )
{
ordersend=(buy.....)
else
ordersend=(sell..)
}

ok..

[Deleted]  
01005379:

Hello!

How do you define your price line?


I want to define the price line by entering yesterdays high. I want to enter the price line entering the price, not by a formula.
qjol
3200
qjol  

yesterdays high

iHigh (Symbol(), PEROID_D1, 1);