ChartWindowFind
The function returns the number of a subwindow where an indicator is drawn.
1. The function searches in the indicated chart for the subwindow with the specified "short name" of the indicator (the short name is displayed in the left top part of the subwindow), and it returns the subwindow number in case of success.
int ChartWindowFind( long chart_id, // chart identifier string indicator_shortname // short indicator name, see INDICATOR_SHORTNAME );
2. The function must be called from a custom indicator. It returns the number of the subwindow where the indicator is working.
int ChartWindowFind();
- docs.mql4.com
ChartWindowFind
The function returns the number of a subwindow where an indicator is drawn.
1. The function searches in the indicated chart for the subwindow with the specified "short name" of the indicator (the short name is displayed in the left top part of the subwindow), and it returns the subwindow number in case of success.
2. The function must be called from a custom indicator. It returns the number of the subwindow where the indicator is working.
You are absolutely correct Sir. But I want to change the period of the sub-window. Hence I am trying to get the ID with the help of ChartWindowFind() function so that I can change the time period of the indicator window only without disturbing the symbol chart period.
That is my intention behind this. Please help me.
ChartSetSymbolPeriod
Sets the Chart Symbol/Period.
Not the subwindow, or at least the chart and the subwindow given that ChartID() == 0.
You can just use data from a differnt timeframe to plot into the subwindow.Sets the Chart Symbol/Period.
Not the subwindow, or at least the chart and the subwindow given that ChartID() == 0.
You can just use data from a differnt timeframe to plot into the subwindow.Thank you Sir, for the advise and references.
- 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 tried using the following line in OnInit event of my Indicator.
I am getting the right values of the window, but the output of the above statement is
I want to change the subwindow or the indicator window time period.
Please let me know what I have missed.