← К каталогу
Исходный код · ID 4965

ICT SMC Liquidity Master

ict_smc_liquiditymaster.mq5
Вы автор или правообладатель?

Сообщите нам, если считаете, что материал размещён без разрешения.

Краткий обзор

О программе

ICT SMC Liquidity Master — это пользовательский индикатор для MetaTrader 5, портированный с Pine Script. Он анализирует структуру рынка, определяя уровни внешней и внутренней ликвидности (ERL/IRL), а также события пробития структуры (BOS) и изменения характера (CHoCH) на свинговом и внутреннем уровнях. Все расчёты выполняются на закрытых свечах, что обеспечивает нерепликацию сигналов.

Индикатор отображает ликвидностные захваты, равные максимумы и минимумы (EQH/EQL), ордер-блоки и фейр-вэлю-гэпы (FVG). Для каждого события создаются графические объекты: линии, метки и прямоугольники. Доступен информационный дашборд в углу графика, показывающий текущие свинговый и внутренний тренды, а также последнюю цену.

Индикатор предоставляет 26 буферов для считывания данными из советника (CopyBuffer/iCustom), включая уровни, тренды и маркеры событий. Поддерживаются уведомления: всплывающие окна, push-уведомления и электронная почта при наступлении настраиваемых условий.

Настройки программы

НастройкаОписание
Notice Текстовое предупреждение, отображаемое при инициализации индикатора
SimpleForexTeam__ Текстовая строка с информацией о команде разработчика
InpSwingLen Минимальное количество баров для определения свингового пивота (минимум 3)
InpInternalLen Минимальное количество баров для определения внутреннего пивота (минимум 2)
InpShowBOS Отображение маркеров пробития структуры на свинговом уровне
InpShowCHoCH Отображение маркеров изменения характера на свинговом уровне
InpShowInternal Отображение внутренней структуры рынка, включая внутренние BOS/CHoCH
InpHistory Количество сохраняемых исторических событий (от 10 до 200)
InpShowERL Отображение уровней внешней ликвидности (свинговые хай/лоу)
InpShowIRL Отображение уровней внутренней ликвидности (внутренние хай/лоу)
InpShowSweeps Отображение маркеров ликвидностных захватов
InpShowEqual Отображение равных хай и равных лоу (Equal Highs / Equal Lows)
InpShowOB Отображение зон ордер-блоков при пробитии свинговой структуры
InpShowFVG Отображение зон фейр-вэлю-гэпов
InpZoneHistory Максимальное количество одновременно отображаемых зон ордер-блоков и FVG (от 1 до 30)
InpExtendZones Горизонтальное продление зон ордер-блоков и FVG вправо (от 5 до 200 баров)
InpShowDashboard Отображение информационного дашборда с трендами и ценой
InpBullColor Цвет отрисовки бычьих маркеров и зон
InpBearColor Цвет отрисовки медвежьих маркеров и зон
InpInternalColor Цвет отрисовки маркеров внутренней структуры и уровней IRL
InpFont Шрифт для текстовых меток и дашборда
InpAlertStruct Отправка уведомления при формировании свингового BOS или CHoCH
InpAlertErl Отправка уведомления при захвате внешней ликвидности (ERL sweep)
InpAlertIrl Отправка уведомления при захвате внутренней ликвидности (IRL sweep)
InpAlertFvg Отправка уведомления при формировании фейр-вэлю-гэпа
InpAlertPopup Отображение всплывающего окна с уведомлением о событии
InpAlertPush Отправка push-уведомления на устройство
InpAlertEmail Отправка уведомления на электронную почту при наступлении настроенных событий
InpMaxBars Ограничение количества обрабатываемых баров (0 — все доступные)

Поиск по коду файла

#property description "ICT SMC Liquidity Master Pro: ERL / IRL, BOS / CHoCH, sweeps, EQH / EQL, order blocks, FVG."
#property description "Closed-bar logic; 26 buffers for an EA."
#property indicator_chart_window
#property indicator_buffers 26
#property indicator_plots   26

input string Notice = "Trading are risky! Trade only if you can loss your money";
input string SimpleForexTeam__ = "free tools for forex! Join our channel for more free eas";
input string The_our_telegram = "";
input string VIP_group = "";

input group "Market Structure"
input int    InpSwingLen     = 10;              // Swing Length (min 3)
input int    InpInternalLen  = 3;               // Internal Length (min 2)
input bool   InpShowBOS      = true;            // Show bos
input bool   InpShowCHoCH    = true;            // Show choch
input bool   InpShowInternal = true;            // Show Internal Structure
input int    InpHistory      = 80;              // Historical Events (10-200)

input group "Liquidity"
input bool   InpShowERL      = true;            // Show erl
input bool   InpShowIRL      = true;            // Show irl
input bool   InpShowSweeps   = true;            // Show Liquidity Sweeps
input bool   InpShowEqual    = true;            // Show EQH / EQL

input group "Zones"
input bool   InpShowOB       = true;            // Show Order Blocks
input bool   InpShowFVG      = true;            // Show Fair Value Gaps
input int    InpZoneHistory  = 8;               // Number of Active Zones (1-30)
input int    InpExtendZones  = 30;              // Zone Extension (5-200)

input group "Display"
input bool   InpShowDashboard = true;           // Show Dashboard
input color  InpBullColor    = C'8,153,129';    // Bullish Color
input color  InpBearColor    = C'242,54,69';    // Bearish Color
input color  InpInternalColor = C'220,155,55';  // Internal Color
input string InpFont         = "Arial";         // Font

input group "Alerts"
input bool   InpAlertStruct  = true;            // Alert: swing BOS / CHoCH
input bool   InpAlertErl     = true;            // Alert: ERL sweeps
input bool   InpAlertIrl     = false;           // Alert: IRL sweeps
input bool   InpAlertFvg     = false;           // Alert: FVG formed
input bool   InpAlertPopup   = true;            // Popup alert
input bool   InpAlertPush    = false;           // Push notification
input bool   InpAlertEmail   = false;           // E-mail

input group "Calculation"
input int    InpMaxBars      = 0;               // Max bars to calculate (0 = all)

#define NA_BAR      LONG_MIN
#define MAX_LABELS  500           // max_labels_count
#define MAX_LINES   500           // max_lines_count
#define MAX_BOXES   300           // max_boxes_count
#define FS_TINY     7
#define FS_SMALL    8
#define FS_NORMAL   10
#define C_AQUA      C'0,188,212'  // Pine color.aqua
#define N_SITES     10
#define TBL_PAD     6

#define SITE_SW_BULL   0
#define SITE_SW_BEAR   1
#define SITE_INT_BULL  2
#define SITE_INT_BEAR  3
#define SITE_ERL_BUY   4
#define SITE_ERL_SELL  5
#define SITE_IRL_BUY   6
#define SITE_IRL_SELL  7
#define SITE_EQH       8
#define SITE_EQL       9

struct RLine
{
   int    uid;
   long   x1;
   double y1;
   long   x2;
   double y2;
   color  clr;
   int    style;
   bool   created;
   bool   fut;
};

struct RLabel
{
   int    uid;
   long   x;
   double y;
   string txt;
   color  clr;
   int    fs;
   bool   created;
   bool   fut;
};

struct RBox
{
   int    uid;
   long   x1;
   long   x2;
   double top;
   double bot;
   color  bg;
   color  bd;
   bool   created;
   bool   fut;
};

struct AtrSite
{
   int    n;
   double sum;
   double rma;
};

double b0[], b1[], b2[], b3[], b4[], b5[], b6[], b7[], b8[], b9[], b10[], b11[], b12[];
double b13[], b14[], b15[], b16[], b17[], b18[], b19[], b20[], b21[], b22[], b23[], b24[], b25[];

string   g_prefix = "ICTSMC_";
int      g_swingLen = 10, g_intLen = 3, g_history = 80, g_zoneHist = 8, g_extend = 30;
int      g_periodSec = 60;
int      g_ratesTotal = 0;
bool     g_fullPass = true;
int      g_lastIdx = -1;
datetime g_lastTime = 0;
long     g_bi = -1;
long     g_baseIdx = 0;
int      g_uid = 0;
datetime g_time[];
int      g_timeN = 0;

RLine    g_lines[];
RLabel   g_labels[];
RBox     g_boxes[];

int      g_structureLines[];
int      g_structureLabels[];
int      g_sweepLabels[];
int      g_liquidityLines[];
int      g_liquidityLabels[];
int      g_obBoxes[];
int      g_fvgBoxes[];

double   g_swingHigh, g_swingLow, g_intHigh, g_intLow;
long     g_swingHighBar, g_swingLowBar, g_intHighBar, g_intLowBar;
bool     g_swingHighBroken, g_swingLowBroken, g_intHighBroken, g_intLowBroken;
int      g_swingTrend, g_internalTrend;
AtrSite  g_site[N_SITES];

string   g_dashSig = "";

template<typename T>
void PushBack(T &arr[], const T &value)
{
   const int n = ArraySize(arr);
   ArrayResize(arr, n + 1, 64);
   arr[n] = value;
}

template<typename T>
void RemoveAt(T &arr[], const int index)
{
   const int n = ArraySize(arr);
   if(index < 0 || index >= n)
      return;
   for(int k = index; k < n - 1; k++)
      arr[k] = arr[k + 1];
   ArrayResize(arr, n - 1);
}

bool IsNa(const double v) { return (v == EMPTY_VALUE); }

color Blend(const color c, const color bg, const double a)
{
   const double aa = MathMax(0.0, MathMin(1.0, a));
   const int ci = (int)c;
   const int bi = (int)bg;
   const int r = (int)MathRound((ci & 0xFF) * aa + (bi & 0xFF) * (1.0 - aa));
   const int g = (int)MathRound(((ci >> 8) & 0xFF) * aa + ((bi >> 8) & 0xFF) * (1.0 - aa));
   const int b = (int)MathRound(((ci >> 16) & 0xFF) * aa + ((bi >> 16) & 0xFF) * (1.0 - aa));
   return (color)(r | (g << 8) | (b << 16));
}

color ChartBg() { return (color)ChartGetInteger(0, CHART_COLOR_BACKGROUND); }

color Tr(const color c, const double transp) { return Blend(c, ChartBg(), 1.0 - transp / 100.0); }

string Px(const double v) { return DoubleToString(v, _Digits); }

string TfName() { return StringSubstr(EnumToString((ENUM_TIMEFRAMES)_Period), 7); }

void FireAlert(const string text)
{
   if(InpAlertPopup)
      Alert(text);
   if(InpAlertPush)
      SendNotification(StringSubstr(text, 0, 255));
   if(InpAlertEmail)
      SendMail("ICT SMC Master " + _Symbol, text);
}

double AtrNext(AtrSite &s, const double tr)
{
   s.n++;
   if(s.n <= 14)
   {
      s.sum += tr;
      if(s.n < 14)
         return EMPTY_VALUE;
      s.rma = s.sum / 14.0;
      return s.rma;
   }
   s.rma = (s.rma * 13.0 + tr) / 14.0;
   return s.rma;
}

double PivotHigh(const double &src[], const int i, const int L)
{
   const int ctr = i - L;
   if(ctr - L < 0)
      return EMPTY_VALUE;
   for(int k = 1; k <= L; k++)
   {
      if(src[ctr - k] > src[ctr] || src[ctr + k] >= src[ctr])
         return EMPTY_VALUE;
   }
   return src[ctr];
}

double PivotLow(const double &src[], const int i, const int L)
{
   const int ctr = i - L;
   if(ctr - L < 0)
      return EMPTY_VALUE;
   for(int k = 1; k <= L; k++)
   {
      if(src[ctr - k] < src[ctr] || src[ctr + k] <= src[ctr])
         return EMPTY_VALUE;
   }
   return src[ctr];
}

string LineName(const int uid)  { return g_prefix + "L" + IntegerToString(uid); }
string LabelName(const int uid) { return g_prefix + "T" + IntegerToString(uid); }
string BoxName(const int uid)   { return g_prefix + "B" + IntegerToString(uid); }

void DropLineAt(const int k)
{
   if(g_lines[k].created)
      ObjectDelete(0, LineName(g_lines[k].uid));
   RemoveAt(g_lines, k);
}

void DropLabelAt(const int k)
{
   if(g_labels[k].created)
      ObjectDelete(0, LabelName(g_labels[k].uid));
   RemoveAt(g_labels, k);
}

void DropBoxAt(const int k)
{
   if(g_boxes[k].created)
   {
      ObjectDelete(0, BoxName(g_boxes[k].uid) + "f");
      ObjectDelete(0, BoxName(g_boxes[k].uid) + "b");
   }
   RemoveAt(g_boxes, k);
}

int NewLine(const long x1, const double y1, const long x2, const double y2, const color clr, const int style)
{
   RLine r;
   r.uid = ++g_uid;
   r.x1 = x1;
   r.y1 = y1;
   r.x2 = x2;
   r.y2 = y2;
   r.clr = clr;
   r.style = style;
   r.created = false;
   r.fut = true;
   PushBack(g_lines, r);
   while(ArraySize(g_lines) > MAX_LINES)
      DropLineAt(0);
   return r.uid;
}

int NewLabel(const long x, const double y, const string txt, const color clr, const int fs)
{
   RLabel r;
   r.uid = ++g_uid;
   r.x = x;
   r.y = y;
   r.txt = txt;
   r.clr = clr;
   r.fs = fs;
   r.created = false;
   r.fut = true;
   PushBack(g_labels, r);
   while(ArraySize(g_labels) > MAX_LABELS)
      DropLabelAt(0);
   return r.uid;
}

int NewBox(const long x1, const double top, const long x2, const double bot, const color bg, const color bd)
{
   RBox r;
   r.uid = ++g_uid;
   r.x1 = x1;
   r.x2 = x2;
   r.top = top;
   r.bot = bot;
   r.bg = bg;
   r.bd = bd;
   r.created = false;
   r.fut = true;
   PushBack(g_boxes, r);
   while(ArraySize(g_boxes) > MAX_BOXES)
      DropBoxAt(0);
   return r.uid;
}

void DelLine(const int uid)
{
   for(int k = ArraySize(g_lines) - 1; k >= 0; k--)
      if(g_lines[k].uid == uid)
      {
         DropLineAt(k);
         return;
      }
}

void DelLabel(const int uid)
{
   for(int k = ArraySize(g_labels) - 1; k >= 0; k--)
      if(g_labels[k].uid == uid)
      {
         DropLabelAt(k);
         return;
      }
}

void DelBox(const int uid)
{
   for(int k = ArraySize(g_boxes) - 1; k >= 0; k--)
      if(g_boxes[k].uid == uid)
      {
         DropBoxAt(k);
         return;
      }
}

int ShiftInt(int &arr[])
{
   const int v = arr[0];
   RemoveAt(arr, 0);
   return v;
}

void PushInt(int &arr[], const int v)
{
   const int n = ArraySize(arr);
   ArrayResize(arr, n + 1, 64);
   arr[n] = v;
}

void AddStructure(const int ln, const int lb)
{
   PushInt(g_structureLines, ln);
   PushInt(g_structureLabels, lb);
   if(ArraySize(g_structureLines) > g_history)
   {
      DelLine(ShiftInt(g_structureLines));
      DelLabel(ShiftInt(g_structureLabels));
   }
}

void AddSweep(const int lb)
{
   PushInt(g_sweepLabels, lb);
   if(ArraySize(g_sweepLabels) > g_history)
      DelLabel(ShiftInt(g_sweepLabels));
}

void AddLiquidity(const int ln, const int lb)
{
   PushInt(g_liquidityLines, ln);
   PushInt(g_liquidityLabels, lb);
   if(ArraySize(g_liquidityLines) > g_history)
   {
      DelLine(ShiftInt(g_liquidityLines));
      DelLabel(ShiftInt(g_liquidityLabels));
   }
}

void ResetState()
{
   ArrayResize(g_lines, 0);
   ArrayResize(g_labels, 0);
   ArrayResize(g_boxes, 0);
   ArrayResize(g_structureLines, 0);
   ArrayResize(g_structureLabels, 0);
   ArrayResize(g_sweepLabels, 0);
   ArrayResize(g_liquidityLines, 0);
   ArrayResize(g_liquidityLabels, 0);
   ArrayResize(g_obBoxes, 0);
   ArrayResize(g_fvgBoxes, 0);
   g_swingHigh = EMPTY_VALUE;
   g_swingLow = EMPTY_VALUE;
   g_intHigh = EMPTY_VALUE;
   g_intLow = EMPTY_VALUE;
   g_swingHighBar = NA_BAR;
   g_swingLowBar = NA_BAR;
   g_intHighBar = NA_BAR;
   g_intLowBar = NA_BAR;
   g_swingHighBroken = false;
   g_swingLowBroken = false;
   g_intHighBroken = false;
   g_intLowBroken = false;
   g_swingTrend = 0;
   g_internalTrend = 0;
   for(int k = 0; k < N_SITES; k++)
   {
      g_site[k].n = 0;
      g_site[k].sum = 0.0;
      g_site[k].rma = 0.0;
   }
   g_dashSig = "";
   g_lastIdx = -1;
   g_lastTime = 0;
}

void ClearBarBuffers(const int i)
{
   b0[i] = EMPTY_VALUE;  b1[i] = EMPTY_VALUE;  b2[i] = EMPTY_VALUE;  b3[i] = EMPTY_VALUE;
   b4[i] = EMPTY_VALUE;  b5[i] = EMPTY_VALUE;  b6[i] = EMPTY_VALUE;  b7[i] = EMPTY_VALUE;
   b8[i] = EMPTY_VALUE;  b9[i] = EMPTY_VALUE;  b10[i] = EMPTY_VALUE; b11[i] = EMPTY_VALUE;
   b12[i] = EMPTY_VALUE; b13[i] = EMPTY_VALUE; b14[i] = EMPTY_VALUE; b15[i] = EMPTY_VALUE;
   b16[i] = EMPTY_VALUE; b17[i] = EMPTY_VALUE; b18[i] = EMPTY_VALUE; b19[i] = EMPTY_VALUE;
   b20[i] = EMPTY_VALUE; b21[i] = EMPTY_VALUE; b22[i] = EMPTY_VALUE; b23[i] = EMPTY_VALUE;
   b24[i] = EMPTY_VALUE; b25[i] = EMPTY_VALUE;
}

void ProcessBar(const int i, const double &open[], const double &high[], const double &low[], const double &close[])
{
   g_bi++;
   const long   bi   = g_bi;
   g_baseIdx = i - bi;
   const double h    = high[i];
   const double l    = low[i];
   const double c    = close[i];
   const bool   live = (!g_fullPass && i == g_ratesTotal - 2);
   const double tr   = (i == 0) ? h - l : MathMax(h - l, MathMax(MathAbs(h - close[i - 1]), MathAbs(l - close[i - 1])));
   ClearBarBuffers(i);

   const double swingPH    = PivotHigh(high, i, g_swingLen);
   const double swingPL    = PivotLow(low, i, g_swingLen);
   const double internalPH = PivotHigh(high, i, g_intLen);
   const double internalPL = PivotLow(low, i, g_intLen);
   const double prevSwingHigh = g_swingHigh;     // swingHigh[1]
   const double prevSwingLow  = g_swingLow;      // swingLow[1]

   if(!IsNa(swingPH))
   {
      g_swingHigh       = swingPH;
      g_swingHighBar    = bi - g_swingLen;
      g_swingHighBroken = false;
   }
   if(!IsNa(swingPL))
   {
      g_swingLow       = swingPL;
      g_swingLowBar    = bi - g_swingLen;
      g_swingLowBroken = false;
   }
   if(!IsNa(internalPH))
   {
      g_intHigh       = internalPH;
      g_intHighBar    = bi - g_intLen;
      g_intHighBroken = false;
   }
   if(!IsNa(internalPL))
   {
      g_intLow       = internalPL;
      g_intLowBar    = bi - g_intLen;
      g_intLowBroken = false;
   }

   if(InpShowERL && !IsNa(swingPH))
   {
      const int ln = NewLine(g_swingHighBar, g_swingHigh, bi + 10, g_swingHigh, Tr(InpBearColor, 30), STYLE_SOLID);
      const int lb = NewLabel(bi + 2, g_swingHigh, "erl", InpBearColor, FS_TINY);
      AddLiquidity(ln, lb);
   }
   if(InpShowERL && !IsNa(swingPL))
   {
      const int ln = NewLine(g_swingLowBar, g_swingLow, bi + 10, g_swingLow, Tr(InpBullColor, 30), STYLE_SOLID);
      const int lb = NewLabel(bi + 2, g_swingLow, "erl", InpBullColor, FS_TINY);
      AddLiquidity(ln, lb);
   }
   if(InpShowIRL && !IsNa(internalPH))
   {
      const int ln = NewLine(g_intHighBar, g_intHigh, bi + 5, g_intHigh, Tr(InpInternalColor, 35), STYLE_DASH);
      const int lb = NewLabel(bi + 1, g_intHigh, "irl", InpInternalColor, FS_TINY);
      AddLiquidity(ln, lb);
   }
   if(InpShowIRL && !IsNa(internalPL))
   {
      const int ln = NewLine(g_intLowBar, g_intLow, bi + 5, g_intLow, Tr(C_AQUA, 35), STYLE_DASH);
      const int lb = NewLabel(bi + 1, g_intLow, "irl", C_AQUA, FS_TINY);
      AddLiquidity(ln, lb);
   }

   const bool bullSwingBreak    = !IsNa(g_swingHigh) && c > g_swingHigh && !g_swingHighBroken;
   const bool bearSwingBreak    = !IsNa(g_swingLow) && c < g_swingLow && !g_swingLowBroken;
   const bool bullInternalBreak = !IsNa(g_intHigh) && c > g_intHigh && !g_intHighBroken;
   const bool bearInternalBreak = !IsNa(g_intLow) && c < g_intLow && !g_intLowBroken;
   string structMsg = "";

   if(bullSwingBreak)
   {
      g_swingHighBroken = true;
      const bool reversal = (g_swingTrend == -1);
      const string tag = reversal ? "choch" : "bos";
      if(reversal)
         b1[i] = g_swingHigh;
      else
         b0[i] = g_swingHigh;
      if((reversal && InpShowCHoCH) || (!reversal && InpShowBOS))
      {
         const long   mid = (long)MathRound((g_swingHighBar + bi) / 2.0);
         const int    ln  = NewLine(g_swingHighBar, g_swingHigh, bi, g_swingHigh, InpBullColor, STYLE_SOLID);
         const double a   = AtrNext(g_site[SITE_SW_BULL], tr);
         const int    lb  = NewLabel(mid, IsNa(a) ? EMPTY_VALUE : g_swingHigh + a * 0.12, tag, InpBullColor, FS_SMALL);
         AddStructure(ln, lb);
      }
      g_swingTrend = 1;
      structMsg += "Bullish swing " + (reversal ? "CHoCH" : "BOS") + " @ " + Px(g_swingHigh) + "  ";
   }
   if(bearSwingBreak)
   {
      g_swingLowBroken = true;
      const bool reversal = (g_swingTrend == 1);
      const string tag = reversal ? "choch" : "bos";
      if(reversal)
         b3[i] = g_swingLow;
      else
         b2[i] = g_swingLow;
      if((reversal && InpShowCHoCH) || (!reversal && InpShowBOS))
      {
         const long   mid = (long)MathRound((g_swingLowBar + bi) / 2.0);
         const int    ln  = NewLine(g_swingLowBar, g_swingLow, bi, g_swingLow, InpBearColor, STYLE_SOLID);
         const double a   = AtrNext(g_site[SITE_SW_BEAR], tr);
         const int    lb  = NewLabel(mid, IsNa(a) ? EMPTY_VALUE : g_swingLow - a * 0.12, tag, InpBearColor, FS_SMALL);
         AddStructure(ln, lb);
      }
      g_swingTrend = -1;
      structMsg += "Bearish swing " + (reversal ? "CHoCH" : "BOS") + " @ " + Px(g_swingLow) + "  ";
   }

   if(InpShowInternal && bullInternalBreak)
   {
      g_intHighBroken = true;
      const bool reversal = (g_internalTrend == -1);
      const string tag = reversal ? "choch" : "bos";
      if(reversal)
         b5[i] = g_intHigh;
      else
         b4[i] = g_intHigh;
      const long   mid = (long)MathRound((g_intHighBar + bi) / 2.0);
      const int    ln  = NewLine(g_intHighBar, g_intHigh, bi, g_intHigh, Tr(InpBullColor, 45), STYLE_DASH);
      const double a   = AtrNext(g_site[SITE_INT_BULL], tr);
      const int    lb  = NewLabel(mid, IsNa(a) ? EMPTY_VALUE : g_intHigh + a * 0.22, tag, InpBullColor, FS_TINY);
      AddStructure(ln, lb);
      g_internalTrend = 1;
   }
   if(InpShowInternal && bearInternalBreak)
   {
      g_intLowBroken = true;
      const bool reversal = (g_internalTrend == 1);
      const string tag = reversal ? "choch" : "bos";
      if(reversal)
         b7[i] = g_intLow;
      else
         b6[i] = g_intLow;
      const long   mid = (long)MathRound((g_intLowBar + bi) / 2.0);
      const int    ln  = NewLine(g_intLowBar, g_intLow, bi, g_intLow, Tr(InpBearColor, 45), STYLE_DASH);
      const double a   = AtrNext(g_site[SITE_INT_BEAR], tr);
      const int    lb  = NewLabel(mid, IsNa(a) ? EMPTY_VALUE : g_intLow - a * 0.22, tag, InpBearColor, FS_TINY);
      AddStructure(ln, lb);
      g_internalTrend = -1;
   }

   const bool erlBuySweep  = !IsNa(g_swingHigh) && h > g_swingHigh && c < g_swingHigh;
   const bool erlSellSweep = !IsNa(g_swingLow) && l < g_swingLow && c > g_swingLow;
   const bool irlBuySweep  = !IsNa(g_intHigh) && h > g_intHigh && c < g_intHigh;
   const bool irlSellSweep = !IsNa(g_intLow) && l < g_intLow && c > g_intLow;
   if(erlBuySweep)
      b8[i] = g_swingHigh;
   if(erlSe

Показано первые 50% кода (символов: 26909)