Hello!
How do you define your price line?
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..
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.
yesterdays high
iHigh (Symbol(), PEROID_D1, 1);
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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