- I've never dragged on the time axes, just press +/-
- You can try catching an event, or use a timer, or just check a tick.
int OnInit(){ width = (int) ChartGetInteger(0,CHART_SCALE); SetIndexStyle(0, DRAW_HISTOGRAM, EMPTY, width); : int OnCalculate(...){ if(ChartGetInteger(0,CHART_SCALE) != width) OnInit();
whroeder1:
- I've never dragged on the time axes, just press +/-
- You can try catching an event, or use a timer, or just check a tick.
Thanks very much @whroeder1 for pointing out CHART_SCALE. That'll do the trick very nicely indeed! :)
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
Hi,
I've attached a couple of images. One is where I have the bars small and one where the bars are larger. If I drag on the time axis on the chart window, going left makes the bars smaller, going right makes them bigger.
In the images, there is an indicator that I have programmed that has "wave" labels showing numbers. I'd like to programmatically change the numbers to a smaller font when the bars are made smaller and, vice versa.
Could anyone tell me whether these step bar/chart sizes can be captured in some kind of event so that I can adjust my label size?
Cheers and thanks! :)