Visible buffers
Overview
To display indicator values on the chart in Forex Tester Online, you need to use buffers. Buffers store the calculated values and define how they should be visualized (e.g., lines, histograms, dots).
Each buffer is created as a TIndexBuffer
and configured through API calls.
Step-by-Step Guide
1. Declare the Buffer
All buffers must be declared as class fields using the TIndexBuffer
type.
2. Create the Buffer in Init()
Init()
Create the buffer instance using the CreateIndexBuffer()
method.
3. Register the Number of Buffers
Tell the API how many buffers you plan to use. In this case — one:
This must be called before setting buffer styles or assignments.
4. Bind the Buffer to an Index
Each buffer must be assigned a unique index:
5. Configure the Buffer
You can now customize how the buffer will appear on the chart:
Full Example
Notes
Each buffer must be declared, created, and registered properly to be visible on the chart.
Indices must be unique and zero-based (
0
,1
,2
, etc.).You can use multiple buffers to display several lines or visual elements.
Last updated