自动线性回归通道指标(源码)——MT4
知识星球板块内容预览:点击查看
自动线性回归通道指标(源码)——MT4

该指标自动统计价格落在回归通道各个区间内的出现次数。这有助于在趋势行情中突出显示值得关注的价格区域。

价格在哪些区间停留最多
趋势中潜在的支撑/阻力密集区

#property strict#property indicator_chart_window//---- Inputsinput ENUM_TIMEFRAMES InpTF = PERIOD_CURRENT; // Timeframe (MTF)input int InpLength = 100; // Length (max 500)input int InpBins = 10; // Bins Numberinput double InpMult = 2.0; // Multinput int InpSrcPrice = PRICE_CLOSE; // Source (applied price)input bool InpShowHist = true; // Show Histogram// Labelsinput bool InpShowLabels = true; // Show Labelsinput string InpLabelFont = "Dubai Medium";input int InpLabelSize = 9;input int InpLabelOffset = 1; // Extra bars to the right of HIST endinput bool InpLabelShowCnt = true; // Show count in label (e.g. 3129.28 (17))// Colors (Pine defaults: dn=#ff1100 up=#2157f3 hist=#ff5d00)input color InpDnCol = C'255,17,0';input color InpUpCol = C'33,87,243';input color InpHistCol = C'255,93,0';// Line widthsinput int InpRegWidth = 1;input int InpHistWidth = 2;//---- Globalsstring g_prefix = "";string g_regNames[];string g_histNames[];string g_lblNames[];datetime g_lastKeyTime = 0;//+------------------------------------------------------------------+//| Utilities |//+------------------------------------------------------------------+int TFSeconds(ENUM_TIMEFRAMES tf)
夜雨聆风
