Please write to ServiceDesk on mql5.com.
Hi,
I think I might have tumbled upon an ObjectsTotal(chart_id) bug in MT4 (build 840) . When looping thru all charts, the function only return object id's of the currently opened chart.
Here is a little script to demonstrate:
void OnStart() {
long chartId = ChartNext(0);
while (chartId != -1) {
for (int i = 0; i < ObjectsTotal(chartId, EMPTY, EMPTY); i++) {
Alert(StringConcatenate(ChartSymbol(chartId), ": has object ", ObjectName(i)));
}
chartId = ChartNext(chartId);
}
}
I used two charts(EURUSD, USDCHF) for this demo and the following is the output in the log file. Please note the EURUSD is the chart opened in the client terminal and ObjectsTotal(USDCHF id) will return only object id's for EURUSD. I have also attached the charts, if anyone wish to replicate the problem.
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:A1:ReviewedDate]
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:EURUSD:MN:TrendLine:A]
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:EURUSD:MN:TrendLine:B]
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:EURUSD:MN:TrendLine:C]
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:EURUSD:MN:TrendLine:X]
0 17:15:18.559 MQL4_Bug_Demo EURUSD,Monthly: Alert: EURUSD: has object [S:EURUSD:MN:TrendLine:Y]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:A1:ReviewedDate]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:EURUSD:MN:TrendLine:A]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:EURUSD:MN:TrendLine:B]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:EURUSD:MN:TrendLine:C]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:EURUSD:MN:TrendLine:X]
0 17:15:18.575 MQL4_Bug_Demo EURUSD,Monthly: Alert: USDCHF: has object [S:EURUSD:MN:TrendLine:Y]
Can anyone confirm and maybe suggest a workaround? Thanks.
Hi,
I think I might have tumbled upon an ObjectsTotal(chart_id) bug in MT4 (build 840) . When looping thru all charts, the function only return object id's of the currently opened chart.
As Ange posted above, you have to go to MQL5.com site and use service desk to report the bug(s). You get there from your user profile page, left hand side.
Edit: If you do not have an MQL5.com account, and wish to report bugs to someone who has the capability to do something about it, then you need to get an MQL5 account.
- I don't see how you expect to get objects from other charts using ObjectName(i). The example shows its use on the current chart. So I would expect half of the calls to have failed.
- This is a user's forum not Metaquotes.
- Can someone please advise where I send a Request for Support to Metaquotes. - MQL4 forum
- Get in touch with developers using Service Desk! - MQL5 forum
- Report it to the service desk. 'MQL5.community - User Memo' - an article about the algorithmic/automated trading in MetaTrader
- Report it to the Service Desk, not us users.
Got it. Thanks JD4.
How I can send a below bug to MT4 platform developers?
A simplest thing it's stop working on MT4 build 1090
It's impossible now to bring object from back of chart.
For lines:
ObjectSetInteger(0, "line", OBJPROP_BACK, false); // not working at all!!!
You can test it on standart exmple script:
https://docs.mql4.com/constants/objectconstants/enum_object/obj_hline
and for rectangles it's mismatch in between two properties:
In below scenario it will create fulfilled rectangles
ObjectSet(oName, OBJPROP_BACK, true);
ObjectSet(oName, OBJPROP_FILL, false);
- docs.mql4.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
HI,
MT4 version is 4.0.0 B509. I've figured it out, this is a bug: if you move mouse and hover on a S/L line in chart, there should be a small popup showing "drag to modify... xxx $ loss....". But if there is any SEPARATE WINDOW indicator, this popup will never show up when mouse hovering there.
Please fix this.