You can't change the Symbol of a chart, you only can switch to another chart.
You can't change the Symbol of a chart, you only can switch to another chart.
it's works fine on changing time period,
but not with symbol.
what do i mistake here ??
this for changing time period, worked correct.
and this for changing symbol, where do i mistake here ??
Check if the value returned is true or false, if false check the error code.
Don't forget that changing current chart symbol will "restart" your current running EA or indicators.
- forextime8: it's works fine on changing time period, but not with symbol. what do i mistake here ??If the naming pattern of your charts isn't exactly "BasQuo" then it can't work. See SymbolName/Symbol. end - MQL4 and MetaTrader 4 - MQL4 programming forum
input string Button_Symbol_01 = "EURUSD" ;
- The real question is why do you want to do this. I recommend:Do not trade multiple currencies in one EA.
- You can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems, e.g. A problem with iBarShift - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 2
- You must handle 4066/4073 errors.
- Code it to trade the chart pair only. Look at the others if you must. (Don't assume that Time[i] == iTime(otherPair,TF, i) always use iBarShift.)
- Then put it on other charts to trade the other pairs. Done.
You can't change the Symbol of a chart, you only can switch to another chart.
https://www.forexfactory.com/showthread.php?p=10125057#post10125057
post #2
im trying to learn from it.
- If the naming pattern of your charts isn't exactly "BasQuo" then it can't work. See SymbolName/Symbol. end - MQL4 and MetaTrader 4 - MQL4 programming forum
- The real question is why do you want to do this. I recommend:
because too much chart opened making pc so lag.
if this done, then just open 1-2 chart and switch to another chart by just clicking it.
I have 30 charts open. CPU is running at 40% (10% of 4 cores). If your PC lags, it is because of your attached indicators/EAs. Fix them.
ChartSetSymbolPeriod(0, ObjectGetString(0, "EURUSD", OBJPROP_TEXT), _Period);
@whroeder1 - rather help the OP than impose your options
If OP can't open more than one/two charts, and my 7 year old laptop can open 30, there's a problem. Instead of OP kludging he needs to find the real problem.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
it's works fine on changing time period,
but not with symbol.
what do i mistake here ??
this for changing time period, worked correct.
and this for changing symbol, where do i mistake here ??