Download MetaTrader 5

Visual Test Chart Limitations

To add comments, please log in or register
Trade like successful traders - subscribe to their signals!
rodesh
115
rodesh 2011.10.06 14:33 

The following limitations/short-comings with the Visual Test chart negate it's usefullness for me in some of the common scenarios I find myself needing to test under that may be difficult/impossible to realistically test real-time in forward-testing only.

It would be helpful if the some consideration could be made to bring the Visual Test chart more in-line with the supported features of the regular charts. 

  • Cannot override the default behavior of automatically adding indicators to the Visual Test chart.  With more than a few indicators used (unless they just so happen to play nicely with each other, visually) I almost always find everything to be a jumbled mess of indicators on top of each other or enough sub-windows that each is small and unreadable anyway, and many may not be useful or relevant in the Visual Test anyway. 
  • Cannot work around the above, by any method I can conceive, i.e. none of the following functions are supported: 
// Always returns 0
int ChartGetInteger(ChartID(), CHART_WINDOWS_TOTAL);  

// Runtime Error - ERR_FUNCTION_NOT_ALLOWED [4014]
//     Not supported in Visual Test Chart
int ChartIndicatorsTotal(ChartID(), sub_window);
string ChartIndicatorName(ChartID(), sub_window, index);
bool ChartIndicatorAdd(ChartID(), sub_window, indicator_handle);
bool ChartIndicatorDelete(ChartID(), sub_window, ind_shortname);
  • Cannot interact with Graphical Objects (like OBJ_BUTTON), just shows a tooltip with the object name/price over the object, and no OnChartEvent raised
  • Haven't found any documention of any sort regarding these limitations, and I'm sure there are other unsupported functions I haven't come across yet. 
  • And finally, though not related to the Visual Test chart and not really a problem per se but more of a minor annoyance with the functioning of ChartIndicatorsTotal function (when on chart other than Visual Test chart)
//Runtime Error - ERR_CHART_WINDOW_NOT_FOUND [4113], 
//     If no indicators added to chart (ChartIndicatorAdd) or the last indicator is removed from the chart (ChartIndicatorDelete) 
//     Results in the Runtime Error, rather than simply returning 0, for what appears to be an otherwise valid sub_window 
//     (i.e. the main chart sub-window denoted by sub_window = 0)
int ChartIndicatorsTotal(ChartID(), sub_window); 

Thanks,
Jay

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Properties - Documentation on MQL5
To add comments, please log in or register