Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Programmierung MQL4 (http://www.expert-advisor.com/forum/forumdisplay.php?f=220)
-   -   Fehler: "... bytes of leaked memory" (http://www.expert-advisor.com/forum/showthread.php?t=5320)

Dick_Turpin 29.11.16 15:44

Fehler: "... bytes of leaked memory"
 
Liste der Anhänge anzeigen (Anzahl: 1)
da bin ich mal wieder mit einem neuen Problem...

Und zwar bekomme ich o.g. Fehlermeldung im Experten-Log.

Der Fehler tritt nur auf, wenn ich den "Slope Direction Line"-Indikator auslese.

Im Netz habe ich folgende Lösung dazu gefunden, möchte mich aber nochmal vergewissern, dass diese Lösung in Ordnung ist.

Um das Problem zu beheben soll man einfach die Zeile

"int e = Bars - counted_bars + period + 1;"

durch diese Zeile ersetzen

"int e = Bars - MathMax(counted_bars, period);"

Wenn ich das mache, ist der Fehler weg, aber ist das auch richtig so?

Kann mal einer von den Profis noch mal ein Auge drauf werfen...

Anbei der Slope-Indikator

Gruß
Dick

MA-EA 29.11.16 16:00

Wenns funkt wirds wohl korrekt sein. :confused:

Dick_Turpin 29.11.16 18:35

ja, die Werte der beiden SDL stimmen, bis auf gelegentliche Unterschiede in den Nachkommastellen, überein (SDL=alt SDn=neu):

Bar 0 >>> SDL_Up_M5_B0: 2147483647.0000000000 SDL_Dn_M5_B0: 141.1243009430 SDL_Map_M5_B0: 141.1243009430
Bar 0 >>> SDn_Up_M5_B0: 2147483647.0000000000 SDn_Dn_M5_B0: 141.1246410009 SDn_Map_M5_B0: 141.1246410009
Bar 1 >>> SDL_Up_M5_B1: 2147483647.0000000000 SDL_Dn_M5_B1: 141.1385249506 SDL_Map_M5_B1: 141.1385249506
Bar 1 >>> SDn_Up_M5_B1: 2147483647.0000000000 SDn_Dn_M5_B1: 141.1385249502 SDn_Map_M5_B1: 141.1385249502
Bar 0 >>> SDL_Up_M5_B0: 2147483647.0000000000 SDL_Dn_M5_B0: 141.1242685565 SDL_Map_M5_B0: 141.1242685565
Bar 0 >>> SDn_Up_M5_B0: 2147483647.0000000000 SDn_Dn_M5_B0: 141.1246410009 SDn_Map_M5_B0: 141.1246410009
Bar 1 >>> SDL_Up_M5_B1: 2147483647.0000000000 SDL_Dn_M5_B1: 141.1385249506 SDL_Map_M5_B1: 141.1385249506
Bar 1 >>> SDn_Up_M5_B1: 2147483647.0000000000 SDn_Dn_M5_B1: 141.1385249502 SDn_Map_M5_B1: 141.1385249502
Bar 0 >>> SDL_Up_M5_B0: 2147483647.0000000000 SDL_Dn_M5_B0: 141.1242523632 SDL_Map_M5_B0: 141.1242523632
Bar 0 >>> SDn_Up_M5_B0: 2147483647.0000000000 SDn_Dn_M5_B0: 141.1246410009 SDn_Map_M5_B0: 141.1246410009
Bar 1 >>> SDL_Up_M5_B1: 2147483647.0000000000 SDL_Dn_M5_B1: 141.1385249506 SDL_Map_M5_B1: 141.1385249506
Bar 1 >>> SDn_Up_M5_B1: 2147483647.0000000000 SDn_Dn_M5_B1: 141.1385249502 SDn_Map_M5_B1: 141.1385249502

Übrigens, der Memory-Leak-Fehler tritt nicht auf allen PC's auf?!?!

Gruß
Dick


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:23 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum