I have an indicator that highlights various turning point highs and lows using arrow symbols (namely wingding symbols 140 through 145 with varying widths). Fairly often one or more of these objects will overlap and so in such cases I offset them by some factor. For example, if on a 1 minute chart symbols 141 and 142 resolve to the same index within the timeseries, and in both cases they call for the price to rise, I would place symbol 141 at say two pips below the Low and symbol 142 at 5 pips below the low at the same time index. Doing this in a hardcoded manner like this is ok if the zoom level isn't changed, but if I need to change the zoom level - say zoom out by 2 clicks - they end up displaying on top of each other since the 3 pip offset is insufficient after the zoom out. If there is a way to retrieve a chart's zoom level/setting I could then add a small amount of code to adjust the pip offsets to be applied to the arrow symbols and redraw them, resulting in a clean and readable display. So the question is, is there any way to obtain the zoom level of a chart?
- arrow over candle error
- Anchor indicator ChartEvent
- How to add objects to a chart that does NOT have focus??
// work with visible bars.
int bars_count=WindowBarsPerChart();
int bar=WindowFirstVisibleBar();
for(int i=0; i<bars_count; i++,bar--)
{
// ...
}
This from book ,
zoom out - more visible bars.
Enjoy
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register