SRC is tripping up, I hope you can get it ok.
By changing the file path to look like the following, you can actually store the closures seperate from the opening files.
if(!WindowScreenShot("shots\\FT_" + Control + "\\_"+filename+".gif",640,480))
BTW: I played around with this idea a little bit more. After getting the ticket of the last closed trade, I also collected info like, was it a buy or sell, was it a profit or a loss, I then used those values in the dir structure to seperate the images according to their condition. I was able to identify how many losers were buys vs sells that were losers, or buys that were winners vs losers. By seperating them, I was also able to quickly identify why the losers lost. They say a pic is worth a 1000, well you get the pic, see if it makes your analysis easier too.
Word to MetaTrader, if something like this was embeded as an option flag in MT4 or 5, it would go a long way to help us improve our quality.
Note: Be sure to keep an eye on your file size usage. You can eat HD space quickly depending on how you use it.
// https://forum.mql4.com/35112 #include <WinUser32.mqh> #import "user32.dll" int GetForegroundWindow(); #import void PauseTest(){ if ( IsTesting() && IsVisualMode() && IsDllsAllowed() ){ int hmain = GetForegroundWindow(); PostMessageA(hmain, WM_COMMAND, 0x57a, 0); } // 1402. Pause }
However, in the tester, if you want to jump to current date and still use the visual, then this tool is ideal for you. Also, in tester, if you are not running the visual, you still get the snapshot. So in tester, it is worth it either way.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have been getting a lot of help in the past, so I would like to give some back. I am going to post a series of tools that may help you with your coding as you have helped me.
This one uses the snapshot feature to help you troubleshoot trade opening and closures. There are a few samples around here, but still needing some helping hands to put it together.