Working with plots

Hello people,

I have (probably) a very basic question regarding the plot function and the visual display in the graph. Currently I'm able to plot the prices and indicators from my code in a single chart. This looks like the following:


Part of code:

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Plot(MA(C,20),"Moving average", colorblue, styleLine);

Unfortunately I can't seem to figure out how to plot a second graph under the main one. For example the RSI indicator ranging from 0-100. If I import a separate indicator from the charts list then it's possible but I can't seem to integrate a "make new graph under main one" code.

Second question: when adding a new blanc chart, I get 8 sheets. Is it possible to select and plot on sheet 2,3, ... ?

Any direct help or references would be greatly appreciated!

File > New > Blank Pane
Then Edit that and add your code.

1 Like

@RobinG, the basic chart operativity is explained in the Tutorial first chapters:

User interface topics:

Additionally, on the main site, under "Support" you'll find some old video clips that show how to operate:

Video Tutorials

The following are video tutorials showing various areas of AmiBroker.


To create charts in Sheets 2, 3, 4, etc., select the one you want to modify and apply the above-explained techniques.

If, on the other hand, you want to do some more fancy stuff (multiple charts in the same pane), you can find an example here or here.


Thank you Beppe and nsm51, this already helped. As for some additional questions (you might have already answered it but I can't get it functional yet):

  1. How do I move my indicator to the blank pane (orange line to blank pane, see screenshot below)?
  2. Currently the plot code is in the same .afl file so this might be the problem. Do I need to work with a separate afl file to create my ATR% indicator and then work with drag and drop?
  3. In addition to constantly have the correct parameters I could work with getstaticvar to communicate between the 2 afl files, is this approach correct?


Suddenly I found the answer to my own question. Currently solved by making another AFL file for calculating the new pane and linking it.

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