Override Default Blank Bar Margin with AFL on Specific Chart

I already know about how to set up default blank bar margin using Tools > Preferences > Blank bars in right margin (default).

The problem is, I don't want those default setting applied to all of my charts. I only want to apply them into my specific chart.

I've tried this code also:

SetChartOptions( 0, 0, chartGridMiddle, 0, 0, 50 );

But, whenever I switch current symbol to another then those margin will revert back to default blank bar margin in preferences. I also don't want to use End button to get desired blank bar margin because it's not productive when switching symbol one by one. What I want is consistent blank bar margin on specific chart only. Is that possible using AFL?

If specified value is less than value set in preferences, it is ignored, so you
can not decrease the blank bars below value set in preferences.

From the manual, are you running into this scenario by any chance?

No, value set in AFL is larger than in preferences. Here is my preferences:

and in AFL:

SetChartOptions( 0, 0, chartGridMiddle, 0, 0, 50 );

Here is my chart when press End multiple times manually:

Then after I tried change symbol to another, and then back to this symbol again, black bar margin reverted back to value set in preferences (10):

This is obsolete functionality. It was introduced before multithreading. With multithreading enabled each pane is running separate thread and such dependencies between threads are unwelcome. It is advised NOT to use it anymore.

If you really have to use it, you need to use only one pane. Otherwise as you can see on the screenshot, one pane (the one where you call SetChartOptions( 0, 0, chartGridMiddle, 0, 0, 50 );) works fine, but the other pane (where you don't call it) is not synced unless you touch scroll bar. Again this is because of the fact that chart panes are now totally asynchronous for maximum multithreading performance.

Also notes that extra bars ARE there, but scroll bar is not in the right-most position.

Thanks @Tomasz. I even didn't notice that scroll is not there.

As the solution for myself, I use autohotkey shortcut to always scrolling at the end of the chart. Works beautifully.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.