Clustra

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 WindowValue
0Clustra deltaThe delta of the bar: buys minus sells
1Clustra volumeThe volume of the bar
2Clustra CVDThe cumulative delta from the first bar loaded
3Clustra bar POCThe price of the POC of the bar
4Clustra ask volumeThe volume of buys (at the ask)
5Clustra bid volumeThe volume of sells (at the bid)
6Clustra patternA reversal pattern: +1 / −1, 0 none
7Clustra divergenceA divergence: +1 / −1, 0 none
8Clustra search matchesCells found by the cluster search
9Clustra burst ticks/10sThe most ticks in 10 seconds inside the bar
10Clustra developing POCThe developing POC of the day
11Clustra VWAPVWAP (the VWAP layer)
12–14Clustra rates 1 / 2 / 3Sets 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]);