It works well at my tests with and withoud commented //Print("Flag: ",Flag); The code is ok and since I am MQL programmer I have not notice such problems related with Print function. The problem seems to be somewhere else. Make sure you have available all backhisroty that your indicators require. Start your testing from a later date and note if that makes a difference.
Also try using control points or every tick testing modes at visual mode and lower speeds. This may give us a clue.
Finaly test it on another terminal because at the moment your one can be buggy.
Are there issues/limitations with the Print function that someone can clue me into? Depending on the speed of the back-tester, the Print command does-not print all instances to the Journal. However, all instances should be Printed within the Log. Tester Log is located within the tester folder. Comment() can help you see real-time values on screen, and can become a good sub depending.....
Thanks to all those who replied. As ubzen wrote, there is an issue with what is printed to the Journal, however all is printed to the Log, and the results are correct.
Thanks to all those who replied. As ubzen wrote, there is an issue with what is printed to the Journal, however all is printed to the Log, and the results are correct.
actually, no.
i have seen the strategy tester miss large chunks of print output sent to the log file.
there are some definite issues there, which if meta trade were honestly interested in providing a reliable platform, they would fix.
but it's our word against their's so what can you do?
actually, no.
i have seen the strategy tester miss large chunks of print output sent to the log file.
there are some definite issues there, which if meta trade were honestly interested in providing a reliable platform, they would fix.
but it's our word against their's so what can you do?
If you can re-create the issue. You can send a bug-report to meta-quotes and they'll fix.[ in most cases ]
lets put this way: I am a windows developer, i have many tools in my arsenal. when something does not work, i fall back to something that i know does work, and check.
in my code, if i substitute calls to Print() with calls to the windows kernel OutputDebugString(), everything is printed, as expected. items that are missing from the journal and the log file appear as expected.
i don't use print any more, instead i use an external viewer ( http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx , http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs.85).aspx )
i should not need to re-create something that should have been picked up in metatrade's basic unit testing.
if anyone else wants to use my workaround until metatrade get their act together, here it is: (the mql4: prefix is just so you can apply a filter in the viewer to mask out other messages sent by other programs). if you are debugging a dll, it can call OutputDebugString itself directly, and those messages end up in the same place.
/* void WINAPI OutputDebugString( _In_opt_ LPCTSTR lpOutputString); */ #import "Kernel32.dll" int OutputDebugStringA(string szText); #import bool debugPrint(string msg) { OutputDebugStringA(StringConcatenate("mql4:",msg)); }
in my code, if i substitute calls to Print() with calls to the windows kernel OutputDebugString(), everything is printed, as expected. items that are missing from the journal and the log file appear as expected.
i don't use print any more, instead i use an external viewer ( http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx , http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs.85).aspx )
i should not need to re-create something that should have been picked up in metatrade's basic unit testing.
if anyone else wants to use my workaround until metatrade get their act together, here it is: (the mql4: prefix is just so you can apply a filter in the viewer to mask out other messages sent by other programs). if you are debugging a dll, it can call OutputDebugString itself directly, and those messages end up in the same place.
Like this one here:
https://www.mql5.com/en/forum/136080 &&
https://www.mql5.com/en/forum/142099 &&
https://www.mql5.com/en/forum/143511 &&
https://www.mql5.com/en/forum/126497
I could go on-and-on but i guess it's much easer for people to make accusations about how meta-quotes sucks. When Rosh [of Meta-Quotes] ask for reproducibility to track the so-called bugs. Your kind of response is alway given. It's cool I don't need you to do meta-quotes job for them. Just don't give us fire, we're already standing in hell. ;-)
nice
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Trying to debug an EA by adding Print statements:
I have 11 Print statements that should print every bar (in this case daily bars). The problems are:
1. For day one only 7 items print,
2. For days 2-5 nothing is printed,
3. Only 6 items print for day 6.
everything is ok after that.
I found out that when I remove (i.e. comment out) my last print statement [ Print("Flag: ",Flag); ] then everything works as you'd expect...I'm running from 1 Jan 2012 to 4 Feb 2012.
There is nothing ground breaking in this code (just calculating MACDs), but I'm going crazy trying to figure out what's going wrong.
Are there issues/limitations with the Print function that someone can clue me into?
Thanks.