Charting AFL queries

I have a couple of queries on charting.

1] Since I have many plots, I would like them to be visible one below the other on the chart (as seen in the image below).

I use the following afl code:

Plot( O + hodiffma, "\nAvg HO Diff", colorBrightGreen, styleThick );
Plot(H, "\nHigh", colorGreen, styleLine);
Plot( O, "\nOpen", colorYellow, styleLine );
Plot(L, "\nLow", colorPink, styleLine);
Plot( O - oldiffma, "\nAvg OL Diff", colorRed , styleThick );

This works but I get the following warning:
"Warning 513. Using non-printable character \n in the Plot() name is not allowed"

It is a warning and not an error, but I am guessing it's not he best practice? What would be the best practice to achieve the same effect without the warning?

2] As can be seen in the image above, the text is on a solid black background. It is overlapping the chart. Is there a way the background on which the text is printed on the chart can be transparent so that we can see the chart?

3] I would like to have some blank bars on the right of the chart. Through the Preferences - Charting - Blank bars in right margin (default) option I am able to get 10 blank bars on the right. This option is respected when I change the symbol from the Symbols window.

How even when I change the symbol from the exploration window, it does not always respect the blank bars on the right as can be seen in the image below.

Is there a way AmiBroker can respect the blank bars on the right even when the symbol is selected from the Exploration Window?

4] It would be convenient if the last values of some of the indicators on the chart can extend to the right, beyond the latest existing bar by a bar or two.

As an example, in the image above, can the lines in the image above extend by a bar or two to the right retaining the same value? How to achieve this?

Any help would be appreciated.

Thank You.

Plot()'s name must NOT contain control characters (non-printable).

If you want custom title that violates this rule you have to use Title statement:

Title = "Any\nTitle\nYou\nWant\nClose: " + Close;

Also, if you have questions about AmiBroker, direct them to TECHNICAL SUPPORT, which is available by email: support@amibroker.com

1 Like

Got it.

Thank You.