#include <Trade\Trade.mqh> CTrade Trade; void OnInit() { Trade.SetMarginMode(); Trade.SetDeviationInPoints(5); Trade.SetTypeFillingBySymbol(_Symbol); Trade.SetExpertMagicNumber(12345); Trade.LogLevel(LOG_LEVEL_ERRORS); // bool Buy(const double volume,const string symbol=NULL,double price=0.0,const double sl=0.0,const double tp=0.0,const string comment=""); if( !Trade.Buy(0.1, _Symbol, SymbolInfoDouble(_Symbol,SYMBOL_ASK)) ) Print( "Could not take BUY position" ); }Buy

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
What do I need to add/change to the code above so that it executes a buy order only once after I run the EA? I'm only newbie. Thanks!