Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Libraries | Making and Saving Graphic Charts from the MT5 Strategy Tester

This Expert Advisor demonstrates how to create and save graphic charts to a .bmp file  from the MT5 Strategy Tester.   The Graphic.mqh package (Include/Graphics/) is used.  In MT4 this operation can be done very easily as the ResourceSave()  function can create the .bmp file directly from  the Strategy Tester.  In MT5, this method does not work.  As a workaround, raw x, y chart data is saved to the Terminal/Common/Files folder.  After the Strategy Tester is run, the EA is removed from th chart forcing  the Deint function to run in the Terminal mode.  The x, y data file is then read, plots are created and a .bmp file is saved using the ResourceSave() function. 

MetaTrader Experts, Indicators, Scripts and Libraries

36486