LiquidityLines
- Göstergeler
- Sürüm: 3.10
- Etkinleştirmeler: 5
1. How It Works
-
Pivot Source ( "PivotStructured" ): ZigZag special points.
-
Structure Direction & Breakout Logic ( OnCalculate ):
-
Carries forward ILQBuffer , TLQBuffer , StructureDirection , TLQTimeBuffer , and ILQTimeBuffer from index [2] to [1] when a new bar forms (prev_calculated != rates_total ).
-
Bearish state ( StructureDirection[1] < 0 ): If high[0] > TLQBuffer[1] , it registers an upward structure shift, places a marker dot in Points[] (Wingdings arrow 159 ), updates TLQBuffer , ILQBuffer , and their anchor timestamps, and sets StructureDirection[1] = 1 . Otherwise, if ArraySize(h) > 1 && h[0].price < lastZZH , it updates ILQBuffer[1] from h[0] and TLQBuffer[1] from h[1] .
-
Bullish state ( StructureDirection[1] >= 0 ): Symmetrically, if low[0] < TLQBuffer[1] , it registers a downward shift, places a marker dot in Points[] , updates buffers/timestamps, and sets StructureDirection[1] = -1 . Otherwise, if ArraySize(l) > 1 && l[0].price > lastZZL , it updates ILQBuffer[1] from l[0] and TLQBuffer[1] from l[1] .
-
-
Chart Objects & Tester Optimization: Uses OBJ_TREND horizontal segments (RAY_RIGHT = false ) prefixed with ILQ_<TF>_ , TLQ_<TF>_ , and BOS_<TF>_ , updated up to time[1] . Object creation is automatically disabled in non-visual Strategy Tester runs (g_disegna ).
2. Indicator Buffers
| Buffer | Array | Data Window | Purpose |
| 0 | Points[] | Visible ( DRAW_ARROW , code 159 ) | Marked structural swing high/low prices ( EMPTY_VALUE otherwise) |
| 1 | ILQBuffer[] | Visible ( DRAW_NONE ) | Current ILQ price level |
| 2 | TLQBuffer[] | Visible ( DRAW_NONE ) | Current TLQ price level |
| 3 | StructureDirection[] | Visible ( DRAW_NONE ) | Structure direction state ( 1 bullish break, -1 bearish break) |
| 4 | TLQTimeBuffer[] | Hidden ( PLOT_SHOW_DATA = false ) | TLQ anchor datetime cast to double |
| 5 | ILQTimeBuffer[] | Hidden ( PLOT_SHOW_DATA = false ) | ILQ anchor datetime cast to double |
3. MQL5 Integration Snippet
input ENUM_TIMEFRAMES InpPivotTF = PERIOD_CURRENT; // TF PIVOTS input color InpClrILQ = clrDodgerBlue; input color InpClrTLQ = clrOrangeRed; input color InpClrBOS = clrLime; input int InpLineWidth = 1; int indHandle = INVALID_HANDLE; int OnInit() { indHandle = iCustom(_Symbol, _Period, "liquiditylines", InpPivotTF, InpClrILQ, InpClrTLQ, InpClrBOS, InpLineWidth); return (indHandle == INVALID_HANDLE) ? INIT_FAILED : INIT_SUCCEEDED; } void OnDeinit(const int reason) { if(indHandle != INVALID_HANDLE) IndicatorRelease(indHandle); } void OnTick() { double ilq[], tlq[], dir[], tlqTime[], ilqTime[]; ArraySetAsSeries(ilq, true); ArraySetAsSeries(tlq, true); ArraySetAsSeries(dir, true); ArraySetAsSeries(tlqTime, true); ArraySetAsSeries(ilqTime, true); // Read index 1 (last closed bar) if(CopyBuffer(indHandle, 1, 1, 1, ilq) != 1 || CopyBuffer(indHandle, 2, 1, 1, tlq) != 1 || CopyBuffer(indHandle, 3, 1, 1, dir) != 1 || CopyBuffer(indHandle, 4, 1, 1, tlqTime) != 1 || CopyBuffer(indHandle, 5, 1, 1, ilqTime) != 1) return; double currentILQ = ilq[0]; double currentTLQ = tlq[0]; double structDir = dir[0]; datetime anchorTLQTime = (datetime)tlqTime[0]; datetime anchorILQTime = (datetime)ilqTime[0]; }

