Hi, I can't get the EA to work with live trading. I am getting "incorrect parameters" error code 32767. How can I get it to work with live trading?
Thank you in advance!
Hi, I can't get the EA to work with live trading. I am getting "incorrect parameters" error code 32767. How can I get it to work with live trading?
Thank you in advance!
There is no such mistake.
Please provide more information: Do you get an error immediately when launching the EA? Or do you get an error while working? Please attach log files from two tabs: from the "Experts" tab and from the "Journal" tab.
Hi,
Thank you for the swift reply, Vladimir!
I found that the ExtArrSymbols function causes the bot to error out when running it on a live account (anything other than the MetaQuotes Demo account). I tried figuring out why it was erroring out (sorry for the delayed reply!). When troubleshooting, I found that when I delete that parameter, the bot will "run" but won't get any information for symbol two. This defeats the purpose since it won't make any trades. But, I was able to narrow it down to maybe save you some time.
Thanks for putting in so much work and effort into these bots. I've tried a couple of yours, and I can tell there's a lot of effort and experience in all of them. To be honest, this bot is amazing and I would love to test it out on a live account!
Below is a picture of the journal log.
Edit: The bot shuts down immediately after running it.
Hope to hear from you soon!

- www.mql5.com
Hi,
Thank you for the swift reply, Vladimir!
I found that the ExtArrSymbols function causes the bot to error out when running it on a live account (anything other than the MetaQuotes Demo account ). I tried figuring out why it was erroring out (sorry for the delayed reply!). When troubleshooting, I found that when I delete that parameter, the bot will "run" but won't get any information for symbol two. This defeats the purpose since it won't make any trades. But, I was able to narrow it down to maybe save you some time.
Thanks for putting in so much work and effort into these bots. I've tried a couple of yours, and I can tell there's a lot of effort and experience in all of them. To be honest, this bot is amazing and I would love to test it out on a live account!
Below is a picture of the journal log.
Edit: The bot shuts down immediately after running it.
Hope to hear from you soon!
1. The log file DOES NOT NEED TO BE ATTACHED AS A PICTURE! The log file must be taken from the "Log" tab and from the "Experts" tab and attached to the message. That is, I should be able to open the log file in NotePad.
2. Read your picture - the reason for the error is printed in it - you have specified a non-existent trading symbol.
Apologies!
I've been using the EUR/GBP (11) as the secondary currency. I've tried multiple others but they all fail with the same error.
Here is the journal log:
2020.08.06 04:15:47.210 MetaTester 5 started on 127.0.0.1:3000 2020.08.06 04:15:47.215 initialization finished 2020.08.06 04:15:47.304 login (build 2568) 2020.08.06 04:15:47.320 4372 bytes of account info loaded 2020.08.06 04:15:47.320 1482 bytes of tester parameters loaded 2020.08.06 04:15:47.320 2236 bytes of input parameters loaded 2020.08.06 04:15:47.321 1338 bytes of symbols list loaded (194 symbols) 2020.08.06 04:15:47.321 expert file added: Experts\EURGBP1.ex5. 92553 bytes loaded 2020.08.06 04:15:47.335 11262 Mb available, 140 blocks set for ticks generating 2020.08.06 04:15:47.335 calculate profit in pips, initial deposit 3000, leverage 1:100 2020.08.06 04:15:47.339 successfully initialized 2020.08.06 04:15:47.339 94 Kb of total initialization data received 2020.08.06 04:15:47.339 Intel Core i7-10510U @ 1.80GHz, 16182 MB 2020.08.06 04:15:47.654 EURGBP.: symbol to be synchronized 2020.08.06 04:15:47.654 EURGBP.: symbol synchronized, 3800 bytes of symbol info received 2020.08.06 04:15:47.657 EURGBP.: history synchronization started 2020.08.06 04:15:47.659 EURGBP.: load 29 bytes of history data to synchronize in 0:00:00.001 2020.08.06 04:15:47.659 EURGBP.: history synchronized from 2015.07.14 to 2020.08.04 2020.08.06 04:15:47.662 EURGBP.: ticks synchronization started 2020.08.06 04:15:47.663 EURGBP.: load 36 bytes of tick data to synchronize in 0:00:00.000 2020.08.06 04:15:47.663 EURGBP.: history ticks synchronized from 2018.01.28 to 2020.08.03 2020.08.06 04:15:47.665 EURGBP.,M1: history cache allocated for 774969 bars and contains 455 bars from 2017.01.02 00:00 to 2018.07.13 00:00 2020.08.06 04:15:47.665 EURGBP.,M1: history begins from 2017.01.02 00:00 2020.08.06 04:15:47.679 EURGBP.,M1 (BitForex-MetaTrader5): generating based on real ticks 2020.08.06 04:15:47.679 testing with execution delay 127 milliseconds 2020.08.06 04:15:47.679 EURGBP.,M1: testing of Experts\EURGBP1.ex5 from 2018.07.14 00:00 to 2020.08.04 00:00 started with inputs: 2020.08.06 04:15:47.679 InpTimeFrame=15 2020.08.06 04:15:47.679 InpSymbolTwo=11 2020.08.06 04:15:47.679 InpProfitFoClose=100 2020.08.06 04:15:47.679 m_magic=130108500 2020.08.06 04:15:47.712 2018.07.14 00:00:00 CSymbolInfo::CheckMarketWatch: Unknown symbol 'EURGBP' 2020.08.06 04:15:47.712 tester stopped because OnInit reports incorrect input parameters 2020.08.06 04:15:47.712 log file "C:\Users\zackr\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\logs\20200806.log" written 2020.08.06 04:15:47.712 test Experts\EURGBP1.ex5 on EURGBP.,M1 thread finished 2020.08.06 04:15:47.732 prepare for shutdown

- www.mql5.com
The Expert Advisor informs you that you have made a mistake in the input parameters:
2020.08.06 04:15:47.679 m_magic=130108500 2020.08.06 04:15:47.712 2018.07.14 00:00:00 CSymbolInfo::CheckMarketWatch: Unknown symbol 'EURGBP' 2020.08.06 04:15:47.712 tester stopped because OnInit reports incorrect input parameters 2020.08.06 04:15:47.712 log file "C:\Users\zackr\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\logs\20200806.log" written 2020.08.06 04:15:47.712 test Experts\EURGBP1.ex5 on EURGBP.,M1 thread finished 2020.08.06 04:15:47.732 prepare for shutdown
//+------------------------------------------------------------------+ //| Multi Arbitration 1.1xx.mq5 | //| Copyright © 2017, Vladimir Karputov | //| http://wmua.ru/slesar/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2017, Vladimir Karputov" #property link "http://wmua.ru/slesar/" #property version "1.104" #property description "Run ONLY ON PERIOD_M1" #property description "New strategy (1.1xx):" #property description "https://www.mql5.com/en/forum/189685/page24#comment_5420669" #property description "For \"BUY\": the next position \"BUY\" can be opened below the lowest \"BUY\"" #property description "For \"SELL\": the next position \"SELL\" can be opened above the highest \"SELL\"" #include <Trade\PositionInfo.mqh> #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\AccountInfo.mqh> CPositionInfo m_position; // trade position object CTrade m_trade; // trading object CSymbolInfo m_symbol_one; // symbol info object CSymbolInfo m_symbol_two; // symbol info object CAccountInfo m_account; // account info wrapper //--- input parameters input ENUM_TIMEFRAMES InpTimeFrame=PERIOD_M15;// Time frame input uchar InpSymbolTwo = 0 ; // from "0" to 19 input double InpProfitFoClose = 100; // Profit Fo Close input ulong m_magic = 130108500;// magic number ulong m_slippage = 30; // slippage string ExtArrSymbols[20]= { "EURUSD","GBPUSD","USDCHF","USDJPY","USDCAD", "AUDUSD","AUDNZD","AUDCAD","AUDCHF","AUDJPY", "CHFJPY","EURGBP","EURAUD","EURCHF","EURJPY", "EURNZD","EURCAD","GBPCHF","GBPJPY","CADCHF" }; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { if(Period()!=PERIOD_M1) { return(INIT_PARAMETERS_INCORRECT); } //--- if(!m_symbol_one.Name(Symbol())) // sets symbol name return(INIT_PARAMETERS_INCORRECT); if(!m_symbol_two.Name(ExtArrSymbols[InpSymbolTwo])) // sets symbol name return(INIT_PARAMETERS_INCORRECT); Print("Symbol two: ",m_symbol_two.Name()); RefreshRates(m_symbol_one); RefreshRates(m_symbol_two); m_symbol_one.Refresh(); m_symbol_two.Refresh(); //--- m_trade.SetExpertMagicNumber(m_magic); //--- if(IsFillingTypeAllowed(m_symbol_one.Name(),SYMBOL_FILLING_FOK)) m_trade.SetTypeFilling(ORDER_FILLING_FOK); else if(IsFillingTypeAllowed(m_symbol_one.Name(),SYMBOL_FILLING_IOC)) m_trade.SetTypeFilling(ORDER_FILLING_IOC); else m_trade.SetTypeFilling(ORDER_FILLING_RETURN); //--- m_trade.SetDeviationInPoints(m_slippage); //--- m_trade.SetAsyncMode(true); //--- bool result_one=false,result_two=false; while(!result_one) result_one=m_trade.Buy(m_symbol_one.LotsMin(),m_symbol_one.Name()); while(!result_two) result_two=m_trade.Buy(m_symbol_two.LotsMin(),m_symbol_two.Name()); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- we work only at the time of the birth of new bar static datetime prevtime=0; datetime time_0=iTime(m_symbol_one.Name(),InpTimeFrame,0); if(time_0==prevtime) return; prevtime=time_0; if(!IsTradeAllowed()) { prevtime=iTime(m_symbol_one.Name(),InpTimeFrame,0); return; } //--- Search for the highest "SELL" and the lowest "BUY" ulong symbol_TICKET_buy_one=0; ulong symbol_TICKET_sell_one=0; ulong symbol_TICKET_buy_two=0; ulong symbol_TICKET_sell_two=0; double price_lowest_buy_one=DBL_MAX; double price_lowest_buy_two=DBL_MAX; double price_highest_sell_one=DBL_MIN; double price_highest_sell_two=DBL_MIN; int count_buys_one=0,count_sells_one=0,count_buys_two=0,count_sells_two=0; for(int i=PositionsTotal()-1;i>=0;i--) if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties if(m_position.Magic()==m_magic) if(m_position.Symbol()==m_symbol_one.Name() || m_position.Symbol()==m_symbol_two.Name()) { if(m_position.PositionType()==POSITION_TYPE_BUY) { if(m_position.Symbol()==m_symbol_one.Name()) { symbol_TICKET_buy_one=m_position.Ticket(); if(m_position.PriceOpen()<price_lowest_buy_one) price_lowest_buy_one=m_position.PriceOpen(); count_buys_one++; } else if(m_position.Symbol()==m_symbol_two.Name()) { symbol_TICKET_buy_two=m_position.Ticket(); if(m_position.PriceOpen()<price_lowest_buy_two) price_lowest_buy_two=m_position.PriceOpen(); count_buys_two++; } } if(m_position.PositionType()==POSITION_TYPE_SELL) { if(m_position.Symbol()==m_symbol_one.Name()) { symbol_TICKET_sell_one=m_position.Ticket(); if(m_position.PriceOpen()>price_highest_sell_one) price_highest_sell_one=m_position.PriceOpen(); count_sells_one++; } else if(m_position.Symbol()==m_symbol_two.Name()) { symbol_TICKET_sell_two=m_position.Ticket(); if(m_position.PriceOpen()>price_highest_sell_two) price_highest_sell_two=m_position.PriceOpen(); count_sells_two++; } } } if(symbol_TICKET_buy_one!=0 && symbol_TICKET_sell_one!=0) if(count_buys_one>1 && count_sells_one>1) m_trade.PositionCloseBy(symbol_TICKET_buy_one,symbol_TICKET_sell_one); if(symbol_TICKET_buy_two!=0 && symbol_TICKET_sell_two!=0) if(count_buys_two>1 && count_sells_two>1) m_trade.PositionCloseBy(symbol_TICKET_buy_two,symbol_TICKET_sell_two); if(!RefreshRates(m_symbol_one) || !RefreshRates(m_symbol_two)) return; CalculatePositions(count_buys_one,count_sells_one,count_buys_two,count_sells_two); Comment("count buys ",m_symbol_one.Name(),": ",count_buys_one,"\n", "count sells ",m_symbol_one.Name(),": ",count_sells_one,"\n", "count buys ",m_symbol_two.Name(),": ",count_buys_two,"\n", "count sells ",m_symbol_two.Name(),": ",count_sells_two); //--- int limit=m_account.LimitOrders(); if(!RefreshRates(m_symbol_one) || !RefreshRates(m_symbol_two)) return; if(count_buys_one+count_sells_one+count_buys_two+count_sells_two<limit-15) { if(m_symbol_one.Ask()<price_lowest_buy_one) // trend down m_trade.Buy(m_symbol_one.LotsMin(),m_symbol_one.Name()); else if(m_symbol_one.Bid()>price_highest_sell_one) // trend up m_trade.Sell(m_symbol_one.LotsMin(),m_symbol_one.Name()); else if(count_buys_one==0 && count_sells_one==0) m_trade.Buy(m_symbol_one.LotsMin(),m_symbol_one.Name()); if(m_symbol_two.Ask()<price_lowest_buy_two) // trend down m_trade.Buy(m_symbol_two.LotsMin(),m_symbol_two.Name()); else if(m_symbol_two.Bid()>price_highest_sell_two) // trend up m_trade.Sell(m_symbol_two.LotsMin(),m_symbol_two.Name()); else if(count_buys_two==0 && count_sells_two==0) m_trade.Buy(m_symbol_two.LotsMin(),m_symbol_two.Name()); } else { if(m_account.Profit()>0.0) CloseAllPositions(); } //--- CalculatePositions(count_buys_one,count_sells_one,count_buys_two,count_sells_two); Comment("count buys ",m_symbol_one.Name(),": ",count_buys_one,"\n", "count sells ",m_symbol_one.Name(),": ",count_sells_one,"\n", "count buys ",m_symbol_two.Name(),": ",count_buys_two,"\n", "count sells ",m_symbol_two.Name(),": ",count_sells_two); if(m_account.Equity()-m_account.Balance()>InpProfitFoClose) CloseAllPositions(); } //+------------------------------------------------------------------+ //| Refreshes the symbol quotes data | //+------------------------------------------------------------------+ bool RefreshRates(CSymbolInfo &m_symbol) { //--- refresh rates if(!m_symbol.RefreshRates()) return(false); //--- protection against the return value of "zero" if(m_symbol.Ask()==0 || m_symbol.Bid()==0) return(false); //--- return(true); } //+------------------------------------------------------------------+ //| Checks if the specified filling mode is allowed | //+------------------------------------------------------------------+ bool IsFillingTypeAllowed(string symbol,int fill_type) { //--- Obtain the value of the property that describes allowed filling modes int filling=(int)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE); //--- Return true, if mode fill_type is allowed return((filling & fill_type)==fill_type); } //+------------------------------------------------------------------+ //| Gets the information about permission to trade | //+------------------------------------------------------------------+ bool IsTradeAllowed() { if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)) { Alert("Check if automated trading is allowed in the terminal settings!"); return(false); } if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)) { Alert("Check if automated trading is allowed in the terminal settings!"); return(false); } else { if(!MQLInfoInteger(MQL_TRADE_ALLOWED)) { Alert("Automated trading is forbidden in the program settings for ",__FILE__); return(false); } } if(!AccountInfoInteger(ACCOUNT_TRADE_EXPERT)) { Alert("Automated trading is forbidden for the account ",AccountInfoInteger(ACCOUNT_LOGIN), " at the trade server side"); return(false); } if(!AccountInfoInteger(ACCOUNT_TRADE_ALLOWED)) { Comment("Trading is forbidden for the account ",AccountInfoInteger(ACCOUNT_LOGIN), ".\n Perhaps an investor password has been used to connect to the trading account.", "\n Check the terminal journal for the following entry:", "\n\'",AccountInfoInteger(ACCOUNT_LOGIN),"\': trading has been disabled - investor mode."); return(false); } //--- return(true); } //+------------------------------------------------------------------+ //| Calculate profit positions Buy and Sell | //+------------------------------------------------------------------+ void CalculateProfitPositions(double &profit_buys_one,double &profit_sells_one, double &profit_buys_two,double &profit_sells_two) { profit_buys_one = 0.0; profit_sells_one = 0.0; profit_buys_two = 0.0; profit_sells_two = 0.0; for(int i=PositionsTotal()-1;i>=0;i--) if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties if(m_position.Magic()==m_magic) if(m_position.Symbol()==m_symbol_one.Name() || m_position.Symbol()==m_symbol_two.Name()) { if(m_position.PositionType()==POSITION_TYPE_BUY) { if(m_position.Symbol()==m_symbol_one.Name()) profit_buys_one+=m_position.Profit(); else if(m_position.Symbol()==m_symbol_two.Name()) profit_buys_two+=m_position.Profit(); } if(m_position.PositionType()==POSITION_TYPE_SELL) { if(m_position.Symbol()==m_symbol_one.Name()) profit_sells_one+=m_position.Profit(); else if(m_position.Symbol()==m_symbol_two.Name()) profit_sells_two+=m_position.Profit(); } } //--- return; } //+------------------------------------------------------------------+ //| Close all positions | //+------------------------------------------------------------------+ void CloseAllPositions() { //m_trade.SetAsyncMode(true); for(int i=PositionsTotal()-1;i>=0;i--) // returns the number of current positions if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties if(m_position.Magic()==m_magic) if(m_position.Symbol()==m_symbol_one.Name() || m_position.Symbol()==m_symbol_two.Name()) m_trade.PositionClose(m_position.Ticket()); // close a position by the specified symbol //m_trade.SetAsyncMode(false); } //+------------------------------------------------------------------+ //| Calculate positions Buy and Sell | //+------------------------------------------------------------------+ void CalculatePositions(int &count_buys_one,int &count_sells_one,int &count_buys_two,int &count_sells_two) { count_buys_one = 0; count_sells_one= 0; count_buys_two = 0; count_sells_two= 0; for(int i=PositionsTotal()-1;i>=0;i--) if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties if(m_position.Magic()==m_magic) if(m_position.Symbol()==m_symbol_one.Name() || m_position.Symbol()==m_symbol_two.Name()) { if(m_position.PositionType()==POSITION_TYPE_BUY) { if(m_position.Symbol()==m_symbol_one.Name()) count_buys_one++; else if(m_position.Symbol()==m_symbol_two.Name()) count_buys_two++; } if(m_position.PositionType()==POSITION_TYPE_SELL) { if(m_position.Symbol()==m_symbol_one.Name()) count_sells_one++; else if(m_position.Symbol()==m_symbol_two.Name()) count_sells_two++; } } //--- return; } //+------------------------------------------------------------------+
If you look at the second symbol, I changed it to the basic EURUSD but runs the same error.
Do you have any thoughts as to why this is?
2020.08.06 07:22:48.328 MetaTester 5 started on 127.0.0.1:3000 2020.08.06 07:22:48.332 initialization finished 2020.08.06 07:22:48.440 login (build 2568) 2020.08.06 07:22:48.452 4372 bytes of account info loaded 2020.08.06 07:22:48.452 1482 bytes of tester parameters loaded 2020.08.06 07:22:48.452 2236 bytes of input parameters loaded 2020.08.06 07:22:48.452 1338 bytes of symbols list loaded (194 symbols) 2020.08.06 07:22:48.453 expert file added: Experts\MultiArbi10.ex5. 91493 bytes loaded 2020.08.06 07:22:48.465 11760 Mb available, 146 blocks set for ticks generating 2020.08.06 07:22:48.465 calculate profit in pips, initial deposit 3000, leverage 1:100 2020.08.06 07:22:48.467 successfully initialized 2020.08.06 07:22:48.467 93 Kb of total initialization data received 2020.08.06 07:22:48.467 Intel Core i7-10510U @ 1.80GHz, 16182 MB 2020.08.06 07:22:48.650 GBPUSD.: symbol to be synchronized 2020.08.06 07:22:48.653 GBPUSD.: symbol synchronized, 3800 bytes of symbol info received 2020.08.06 07:22:48.676 GBPUSD.: history synchronization started 2020.08.06 07:22:48.682 GBPUSD.: load 29 bytes of history data to synchronize in 0:00:00.001 2020.08.06 07:22:48.682 GBPUSD.: history synchronized from 2015.01.02 to 2020.08.04 2020.08.06 07:22:48.684 GBPUSD.: ticks synchronization started 2020.08.06 07:22:48.685 GBPUSD.: load 36 bytes of tick data to synchronize in 0:00:00.000 2020.08.06 07:22:48.685 GBPUSD.: history ticks synchronized from 2018.01.28 to 2020.08.03 2020.08.06 07:22:48.892 GBPUSD.,M1: history cache allocated for 1341147 bars and contains 567532 bars from 2017.01.01 22:01 to 2018.07.13 20:58 2020.08.06 07:22:48.892 GBPUSD.,M1: history begins from 2017.01.01 22:01 2020.08.06 07:22:48.917 GBPUSD.,M1 (BitForex-MetaTrader5): generating based on real ticks 2020.08.06 07:22:48.917 testing with execution delay 127 milliseconds 2020.08.06 07:22:48.917 GBPUSD.,M1: testing of Experts\MultiArbi10.ex5 from 2018.07.14 00:00 to 2020.08.04 00:00 started with inputs: 2020.08.06 07:22:48.917 InpTimeFrame=15 2020.08.06 07:22:48.917 InpSymbolTwo=0 2020.08.06 07:22:48.917 InpProfitFoClose=100 2020.08.06 07:22:48.917 m_magic=130108500 2020.08.06 07:22:48.947 2018.07.14 00:00:00 CSymbolInfo::CheckMarketWatch: Unknown symbol 'EURUSD' 2020.08.06 07:22:48.948 tester stopped because OnInit reports incorrect input parameters 2020.08.06 07:22:48.948 log file "C:\Users\zackr\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\logs\20200806.log" written 2020.08.06 07:22:48.948 test Experts\MultiArbi10.ex5 on GBPUSD.,M1 thread finished 2020.08.06 07:22:48.964 prepare for shutdown
If you look at the second symbol, I changed it to the basic EURUSD but runs the same error.
Do you have any thoughts as to why this is?
There is only one answer - you do not read what they write to you: You have neither the 'EURGBP' symbol, nor the 'EURUSD' symbol. Work on a normal trade server.
Hello,
Could you please explain the meaning of the numbers 0-19?
Thank you very much

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Multi Arbitration 1.1xx:
Buy a security (open BUY positions) at a lower price, sell (open SELL positions) at a higher price.
Author: Vladimir Karputov