-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. - Robert Ozsvath: "SYMBOL_msg" is a variable that gets his value from parsed Telegram messages. Is there a way to bypass this? Or to somehow trick the function into thinking it is a const?
When in doubt, think! Pass what you want. It is constant for the duration of the call.
- You use the predefined symbol Ask. That will not work unless the symbol passed is the current chart.
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Hi!
I am coding an EA that would help me manage multiple Forex Accounts.
My EA is almost it connects with a Telegram Bot and I send him a message and the EA calculates my lot size, opens the trade, sometimes with more than one TP and it even moves SL to BE when TP1 hits, so very nice and easy.
Problems comes here:
"SYMBOL_msg" is a variable that gets his value from parsed Telegram messages. Is there a way to bypass this? Or to somehow trick the function into thinking it is a const?
The EA works great if I manually set the SYMBOL_msg before compiling but as soon as I get it from the Telegram messages it does not work.
Thanks!
Can't be done. The terminal is only connected to one account.
Hello all!
Thanks for all the information you have given me. I managed to solve this problem by making the EA change the chart before my ExecuteOrder() is called.
If anyone needs it
void ChartChange() { string s=SYMBOL_msg; for (long i = ChartFirst(); i!=-1; i = ChartNext(i)) { ChartSetSymbolPeriod(i,s,ChartPeriod(i)); } }
I got it from a forum. This way I pass everything from the chart except the TP and SL
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
I am coding an EA that would help me manage multiple Forex Accounts.
My EA is almost it connects with a Telegram Bot and I send him a message and the EA calculates my lot size, opens the trade, sometimes with more than one TP and it even moves SL to BE when TP1 hits, so very nice and easy.
Problems comes here:
"SYMBOL_msg" is a variable that gets his value from parsed Telegram messages. Is there a way to bypass this? Or to somehow trick the function into thinking it is a const?
The EA works great if I manually set the SYMBOL_msg before compiling but as soon as I get it from the Telegram messages it does not work.
Thanks!