Manual / 7.3. Buffers for Expert Advisors
7.3. Buffers for Expert Advisors
15 values for each bar: they show in the Data Window of MT5 (Ctrl+D) and are read by an Expert Advisor with iCustom and CopyBuffer.
| # | Name in the Data Window | Value |
|---|---|---|
| 0 | Clustra delta | The delta of the bar: buys minus sells |
| 1 | Clustra volume | The volume of the bar |
| 2 | Clustra CVD | The cumulative delta from the first bar loaded |
| 3 | Clustra bar POC | The price of the POC of the bar |
| 4 | Clustra ask volume | The volume of buys (at the ask) |
| 5 | Clustra bid volume | The volume of sells (at the bid) |
| 6 | Clustra pattern | A reversal pattern: +1 / −1, 0 none |
| 7 | Clustra divergence | A divergence: +1 / −1, 0 none |
| 8 | Clustra search matches | Cells found by the cluster search |
| 9 | Clustra burst ticks/10s | The most ticks in 10 seconds inside the bar |
| 10 | Clustra developing POC | The developing POC of the day |
| 11 | Clustra VWAP | VWAP (the VWAP layer) |
| 12–14 | Clustra rates 1 / 2 / 3 | Sets 1–3 of "My rates" (2.10): +1 Long, −1 Short, 0 none; closed bars. A set off or missing — empty |
- An Expert Advisor gets its own copy of Clustra: the bars of the chart's timeframe with the default settings, nothing drawn; the Clustra on the chart does not change. While the copy loads the history, the buffers are empty (EMPTY_VALUE).
- In the copy 0–5, 9 and 10 are filled; 6, 7, 8 are 0; 11–14 are empty: only the Clustra on the chart counts them, with their layers and sets on.
- Index 0 in CopyBuffer is the bar not closed yet; the closed ones start at 1.
int h = iCustom(_Symbol, _Period, "Clustra\\Clustra");
double d[];
if(CopyBuffer(h, 0, 1, 1, d) == 1 && d[0] != EMPTY_VALUE) // the delta of the last closed bar
Print("Delta: ", d[0]);