Mistake number 1: The worst and worst mistake:
//we calculate a EMA for All 5 double MyMovingAverageYellow = iMA ( _Symbol , _Period , 5 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); double MyMovingAverageRed = iMA ( _Symbol , _Period , 13 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); double MyMovingAverageAqua = iMA ( _Symbol , _Period , 50 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); double MyMovingAverageGrey = iMA ( _Symbol , _Period , 200 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); double MyMovingAverageBlue = iMA ( _Symbol , _Period , 800 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); //Identifiys pip difference
Remember - in MQL5 the indicator handle is created once (in OnInit ()). Then they get the data using CopyBuffer (in OnInit ()).
Read the help: the indicator handle has the 'int' type.
Error 2:
OrderSend
Error 3:
Close[0] >= Open[0] && Close[1] < Open[1];
Mistake number 1: The worst and worst mistake:
Remember - in MQL5 the indicator handle is created once (in OnInit ()). Then they get the data using CopyBuffer (in OnInit ()).
Read the help: the indicator handle has the 'int' type.
Error 2:
Error 3:
Thank you for your response what is wrong with the orderSend?
Read the help:
OrderSend
The OrderSend() function is used for executing trade operations by sending requests to a trade server.
bool OrderSend( MqlTradeRequest& request, // query structure MqlTradeResult& result // structure of the answer );
But first, fix the main mistake - the indicator handle should be created only once (in OnInit ()).
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, hope everyone is well.
I am new to mql5 and for some reason when i go to test my EA it doesn't execute any buy or sell positions. There are no syntax errors
Here is my code. Thank you in advance for your help :)
vo }