Skip to content
Level 2 · AmiBroker AnalystLessonPart 03 · page 7 of 822 min
22Minutes
8AFL functions
7Sources
StandardRequires
AFL functions taught here8

Navigating and Scaling Charts

A chart in AmiBroker is not a picture. It is a view onto a database, and every property of that view — how many bars, over what interval, on what scale, drawn by which formula — is under your control and is stored somewhere. This lesson is about operating that view fluently, because the difference between a fast analyst and a slow one is mostly this.

It also covers two things that regularly get misread as faults. The zoom controls are named the opposite way round from what most people expect, and the scaling control that everyone hunts for on the View menu is not there.

Working outwards from the middle: the chart area in the centre; the date axis along the bottom; below that a scroll bar, and below that the chart sheet tabs. On the right is the Y-axis area showing the scale and the value labels. To the right of that is the Draw toolbar with the drawing tools, and along the top a formatting toolbar for the colour and style of whatever drawing object is selected.

Two of those deserve a note.

Value labels are the coloured fields on the Y axis showing the “last value” of each plot. The documented definition matters: last value means the value at the last currently displayed bar — the rightmost one on screen — not necessarily the newest bar in the database. Scroll back in time and the value labels follow the view, not the data.

The Y-axis area is also a handle. It is how you move and resize the chart vertically, which is the subject of a section below.

Intervals live on the View menu: Daily, Weekly, Monthly, Quarterly, Yearly, and an Intraday submenu. The toolbar uses a shorthand — i for intraday, h for hourly, d for daily, w for weekly, m for monthly — and the i button means the base intraday interval as defined in File -> Database Settings, not intraday in general.

The built-in intervals the charting guide lists are daily, weekly, monthly, hourly, 15-minute, 5-minute, 1-minute, and — for real-time intraday databases only — 15-second, 5-second and tick. On top of those you can define five custom n-minute intervals and five custom n-tick intervals in Tools -> Preferences, on the Intraday tab. Since version 5.60 there is also an interval combo box that accepts any interval typed by hand.

Three properties of interval selection are worth internalising.

The interval affects the active window only. Each chart window can show a different interval, which is the entire basis of a multi-timeframe layout.

Intraday intervals are unavailable unless the database’s base time interval is below end-of-day. This is the greyed-out menu from the previous lesson, seen from the chart side. Set the base interval to 5-minute and every periodicity from five minutes upward becomes available — and nothing below it ever does.

Custom intervals never appear on the toolbar. They are reachable only from View -> Intraday. People define one, look at the toolbar, and conclude it did not save.

Two intraday preferences change what your bars mean, and they are worth knowing before you meet them in Part 20 rather than after. Align custom minute bars to regular market hours decides whether 45-minute bars start at 9:00, 9:45, 10:30 or at 9:30, 10:15, 11:00 for a 9:30 open. And Time compressed bars show chooses whether a compressed bar is stamped with its first tick, its last tick, the start of the interval or the end of it — which changes what every TimeNum() comparison in your AFL sees.

Also on the View menu: Pad non-trading days, which fills Saturdays, Sundays and holidays with the previous close, and Price Chart Style with its Auto, Line, Candlesticks and Bars options.

View -> Zoom offers In, Out, All, Normal, Range, Shorter bars and Longer bars.

The mouse behaves in the opposite way to most applications, too. Rolling the plain wheel scrolls; Ctrl plus the wheel zooms. You can also zoom by dragging the left or right edge of the scroll bar, which is the fastest method once it becomes a habit. Scrolling by exactly one bar is what the < and > arrows at the ends of the scroll bar do.

Zoom -> All shows every available bar for the current symbol. Zoom -> Normal resets to the bar count in Tools -> Preferences, Charting tab, under Default number of quotations in a chart — teach yourself the pair together, because Normal is meaningless until you know what it restores to.

Switch to Select mode — the red arrow in the Draw toolbar — and click in the chart area, away from any drawing object. A vertical line marks the bar; the chart title shows that bar’s quote, and every indicator pane shows its value at that bar. The left and right arrow keys step the selection one bar at a time, which is the most useful thing in this section and the one people most often do not know.

Switch selection off by clicking the line again, by clicking in the date-axis area, or by clicking in the blank right margin. With selection off, the title shows the last visible bar.

Marking a range is different from selecting a quote. Double-click at the start of the range and double-click again at the end. Or, in Select mode, select a bar and press F12 for the start and Shift+F12 for the end. Ctrl+F12 switches the range marker off, as does double-clicking twice in the same place.

If the selection line has “stopped working”, check Tools -> Preferences, Charting tab, for Quote selection only by CTRL+LMB. With it checked you must hold Ctrl to get the selection line at all.

Here is where the terminology needs stating carefully, because this course’s own curriculum line calls it “semi-log” and AmiBroker does not.

AmiBroker’s word is “Logarithmic”. It appears as the Type of the Y-axis scaling, with Linear as the alternative. The string “semi-log” does not appear in the User’s Guide chapters this course checked. Since only the price axis is logarithmic while the time axis stays linear, an AmiBroker “Logarithmic” chart is precisely what the rest of the industry calls semi-log — but when you are looking for the control, look for Logarithmic.

And the control is not on the View menu. Right-click the chart, choose Parameters, go to the “Axes & Grid” tab.

What the Axes & Grid tab contains, exactly:

Group Setting Notes
Axes Scaling Automatic or Custom
Axes Minimum / Maximum Locked while Scaling is Automatic — switch to Custom to unlock
Axes Type Linear or Logarithmic
Axes Show date axis Turns the X-axis date display on and off
Grid Show middle lines, Show upper/lower limits, Show % values, Levels Levels offers fixed popular pairs: 30/70, 20/80, 10/90, -100/+100, 0
Miscellaneous Show trading arrows See the warning below
Miscellaneous File path, Chart ID Read-only

The read-only Chart ID on that tab is the value you pass as the second argument to Study() when you are not using GetChartID(), which is how AFL reads a hand-drawn trend line, which is how a level you drew by hand becomes a condition a formula can test.

Three mouse gestures in the Y-axis area, all documented:

  • Hover until the cursor becomes an up/down arrow, then drag to move the scale.
  • Shift, click and drag to shrink or expand the scale.
  • Double-click to reset both scale and position.

That third one is the escape hatch. Once you know it, experimenting with the first two costs nothing.

To add a pane, open Window -> Charts and double-click an indicator name, or use Insert from its context menu. A new pane appears and the Parameters dialog opens showing only that indicator’s parameters — by design, so a beginner is not confronted with everything at once. Choosing Parameters from the context menu later shows all of them.

To overlay one indicator onto an existing pane, drag its name onto that pane.

Insert and Insert Linked are not the same. Insert — and double-clicking — copies the formula into a hidden drag-and-drop folder, so your original is never touched. Insert Linked points the pane at the original file, so later edits and overlays modify it. If you want to experiment, use Insert. If you want one formula shared by several panes, use Insert Linked.

To close a pane: click it, then View -> Pane -> Close, or right-click and choose Close, or use the Close button in the small menu at the pane’s top-right. To remove one plot from a pane without closing the pane, right-click the chart title and select the plot, or use Delete Indicator from the context menu. The View -> Pane submenu also offers Arrange All, Move Down, Move Up, Maximize and Restore.

Chart parameters and the formulas behind them

Section titled “Chart parameters and the formulas behind them”

Everything in the Parameters dialog is put there by the formula. A chart formula declares its own parameters with Param() and its relatives, and AmiBroker builds the dialog from those declarations:

Fragment — not a complete formula

_SECTION_BEGIN( "Price" );
Periods = Param( "Periods", 20, 2, 300, 1 );
ShowBands = ParamToggle( "Show bands", "No|Yes", 1 );
Plot( Close, "Price", colorDefault, ParamStyle( "Price style", styleCandle ) );
Plot( MA( Close, Periods ), "Average", colorBlue, styleLine );
_SECTION_END();

Two things about that fragment are conventions rather than syntax, and both matter.

_SECTION_BEGIN and _SECTION_END are not decoration. They let AmiBroker identify and modify code sections through the drag-and-drop interface, and they namespace the parameters. Two sections can each have a parameter called “Periods” without colliding, precisely because the section names differ. AmiBroker auto-numbers duplicate section names — MA, then MA1. Never delete them from a chart formula.

Every configurable number should be a Param(), declared at the top. A hard-coded 20 buried in an expression is a formula that has to be edited to be changed; a Param() is a formula that can be explored from the dialog. Part 10 builds on this properly.

Reset All in the Parameters dialog resets all parameters. There is no single-parameter reset.

What to save, depending on what you want to keep

  1. One pane configured the way you likeIts Param values are stored per chart automatically
  2. A set of panes on a sheetRight-click the chart -> Template -> Save
  3. The set as the starting point for new windowsRight-click the chart -> Template -> Save as default
  4. Every open window, symbol, interval and sheetWindow -> Layouts, right-click, Save As
  5. All of it, moved to another computerTemplate -> Save, choosing the complete .chart format

Two settings decide whether any of this survives closing the program. Tools -> Preferences, Miscellaneous tab, has Save on exit checkboxes for Preferences, Templates and Layouts. With the Layouts one off, your arrangement disappears silently. Turn it on, and also save your layout explicitly under a name — automatic saving covers the most recently used layout, not a named one you can return to.

You can now move around a chart deliberately rather than by trial and error: change interval knowing what is available and why, zoom knowing that In means fewer bars, select a bar and step through history with the arrow keys, and mark a range that AFL can read.

You know that scaling is a per-pane setting reached by right-clicking, that AmiBroker calls it Logarithmic, and that Minimum and Maximum are deliberately locked until you switch Scaling to Custom.

You know the difference between Insert and Insert Linked, why an overlaid oscillator draws as a flat line and what fixes it, and — the one that will save you the most time — that missing trading arrows are usually a Parameters setting rather than a broken formula.

The next page puts all of it together into a workspace you keep.

Check your understanding

Question 1. Your formula sets Buy and Sell but no arrows appear on the chart. What is the most likely cause?
Show the answer and why

Answer: Show trading arrows is off in Parameters -> Axes & Grid

Show trading arrows defaults to off, and the symptom is indistinguishable from a formula producing no signals. Checking a display setting before doubting the logic saves a great deal of time, and this specific setting is called out in AmiBroker’s own drag-and-drop FAQ for exactly that reason.

Question 2. You drag RSI onto the price pane and get a flat line along the bottom. What fixes it?
Show the answer and why

Answer: Setting the plot to styleOwnScale in Parameters -> Style

The plot is being drawn against the price axis, where a value of 50 sits near the bottom of a range running to hundreds. styleOwnScale gives the plot an independent scale. It is the canonical example in the documentation because everybody hits it.

Question 3. Which of these change how many bars are visible on the chart? Select all that apply.
Show the answer and why

Answer: View -> Zoom -> In, Ctrl plus the mouse wheel, Dragging the edge of the scroll bar

Shorter bars and Longer bars change the vertical size of the bars drawn, not the horizontal count. The other three all change the number of bars displayed — and note that Zoom In reduces that number rather than increasing it.

Question 4. True or false: you set linear or logarithmic price scaling from the View menu.
Show the answer and why

Answer: False

False. Scaling type is a per-pane setting, reached by right-clicking the chart and opening Parameters, on the Axes & Grid tab. There is no View-menu toggle. Being per-pane is deliberate: a price pane and an oscillator pane in the same window can reasonably want different scale types.

Sources for this lesson

7 verified · checked 2026-08-31

  1. 01AmiBroker User's Guide — Beginners' charting guideamibroker.com/guide/h_charting.html2026-08-31
  2. 02AmiBroker User's Guide — Parameters windowamibroker.com/guide/w_param.html2026-08-31
  3. 03AmiBroker User's Guide — View menuamibroker.com/guide/m_view.html2026-08-31
  4. 04AmiBroker User's Guide — Preferences§ Charting tabamibroker.com/guide/w_preferences.html2026-08-31
  5. 05AmiBroker User's Guide — Drag-and-drop chartingamibroker.com/guide/h_dragdrop.html2026-08-31
  6. 06AmiBroker User's Guide — Working with chart sheets and window layoutsamibroker.com/guide/h_sheets.html2026-08-31
  7. 07AmiBroker User's Guide — Chart themesamibroker.com/guide/h_themes.html2026-08-31

Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.