Re: Various Indicators - (MT5)
Posted: Wed Sep 03, 2025 6:29 am
mrtools wrote: Wed Sep 03, 2025 6:15 am Hello this is the buffer list
and enums:Code: Select all
SetIndexBuffer(0, bli, INDICATOR_DATA); SetIndexBuffer(1, sli, INDICATOR_DATA); SetIndexBuffer(2, zli, INDICATOR_DATA); SetIndexBuffer(3, vals,INDICATOR_DATA); SetIndexBuffer(4, val, INDICATOR_DATA); SetIndexBuffer(5, valc, INDICATOR_CALCULATIONS); SetIndexBuffer(6, count,INDICATOR_CALCULATIONS);
Code: Select all
enum enTimeFrames { tf_cu = PERIOD_CURRENT, // Current time frame tf_m1 = PERIOD_M1, // 1 minute tf_m2 = PERIOD_M2, // 2 minutes tf_m3 = PERIOD_M3, // 3 minutes tf_m4 = PERIOD_M4, // 4 minutes tf_m5 = PERIOD_M5, // 5 minutes tf_m6 = PERIOD_M6, // 6 minutes tf_m10 = PERIOD_M10, // 10 minutes tf_m12 = PERIOD_M12, // 12 minutes tf_m15 = PERIOD_M15, // 15 minutes tf_m20 = PERIOD_M20, // 20 minutes tf_m30 = PERIOD_M30, // 30 minutes tf_h1 = PERIOD_H1, // 1 hour tf_h2 = PERIOD_H2, // 2 hours tf_h3 = PERIOD_H3, // 3 hours tf_h4 = PERIOD_H4, // 4 hours tf_h6 = PERIOD_H6, // 6 hours tf_h8 = PERIOD_H8, // 8 hours tf_h12 = PERIOD_H12, // 12 hours tf_d1 = PERIOD_D1, // daily tf_w1 = PERIOD_W1, // weekly tf_mn = PERIOD_MN1, // monthly tf_cp1 = -1, // Next higher time frame tf_cp2 = -2, // Second higher time frame tf_cp3 = -3 // Third higher time frame }; input enTimeFrames inpTimeFrame = tf_cu; // Time frame input string inpButtonID = "adxt b1"; // Button unique ID input int inpLength = 35; // Average length enum enDouble { avgs_regular, // Regular averages avgs_double, // Double smoothed averages }; input enDouble inpDouble = avgs_double; // Averages calculating mode input bool inpUseRegMa = false; // Regularized ma? input double inpLambda = 5; // Lambda (if using regularized ma's) enum enRmaTypes { ma_rema, // Regularized exponential moving average ma_rrma, // Regularized relative maving average ma_remaf, // Regularized fast exponential moving average ma_errema, // Efficiency ratio regularized exponential moving average ma_errrma, // Efficiency ratio regularized relative moving average ma_erremaf // Efficiency ratio regularized fast exponential moving average }; input enRmaTypes inpReMaType = ma_rema; // Regularized Ma type enum enMaTypes { ma_adxvma, // Adxvma ma_aema, // Adaptive exponential moving average - AEMA ma_arma, // Adaptive relative moving average - ARMA ma_ahr, // Ahrens moving average ma_alma, // Arnaud Legoux Moving Average - ALMA ma_alxma, // Alexander moving average - ALXMA ma_dema, // Double exponential moving average - DEMA ma_dfema, // Double fast exponential moving average - DFEMA ma_dsema, // Double smoothed exponential moving average - DSEMA ma_dsema2, // Double smoothed EMA (variation) ma_dsemaf, // Double smoothed fast exponential moving average - DSFEMA ma_dswema, // Double smoothed Wilders exponential moving average - DSWEMA ma_dscma, // Deviation scaled MA - DSCMA ma_dwma, // Double weighted MA - DWMA ma_dpwma, // Double parabolic weighted ma - DPWMA ma_edic, // Ehlers distance coefficient filter - EDIC ma_emas, // Ema derivative - EMAD ma_ema, // Exponential moving average - EMA ma_epma, // End point moving average - EPMA ma_emaf, // Fast exponential moving average - FEMA ma_eotf, // Ehlers Optimal tracking filter ma_eoef, // Ehlers Optimal ellipitic filter ma_erema, // Efficiency ratio exponential moving average - EREMA ma_erdsema, // Efficiency ratio double smooth EMA - ERDSEMA ma_ertema, // Efficiency ratio triple EMA - ERTEMA ma_evwma, // Elastic volume weighted MA - EVWMA ma_frama, // Fractal adaptive moving average - FRAMA ma_gchan, // G Channel average - GCHAN ma_hull, // Hull moving average - HMA ma_hulle, // Hull moving average EMA based - HMAe ma_hullf, // Hull moving average Fast EMA based - HMAf ma_hullr, // Hull moving average RMA based - HMAr ma_hulls, // Hull moving average Slow ma based - HMAs ma_ie2, // IE/2 ma_ilinr, // Integral of linear regression slope ma_itl, // Instantaneous trendline ma_jur, // Jurik smoothing ma_kijun, // Kijun sen ma_lagg, // Laguerre filter ma_leade, // Leader exponential moving average; ma_leadf, // Leader fast exponential moving average ma_leadr, // Leader relative moving average ma_linr, // Linear regression value - LSMA ma_slwma, // Smoothed linear weighted moving average - SLWMA ma_lwma, // Linear weighted moving average - LWMA ma_mcg, // McGinley Dynamic ma_mcg2, // McGinley Dynamic 2 ma_mcma, // McNicholl ema ma_nlma, // Non lag moving average ma_nma, // Natural moving average - NMA ma_pdfma, // Probability density funcion ma (pdfma) ma_pema, // Progressive exponential moving average ma_ptema, // Pentuple exponential moving average ma_ptrma, // Pentuple relative moving average ma_pfma, // Progressive fast exponential moving average ma_prma, // Progressive relative maving average ma_pwma, // Parabolic weighted moving average - PWMA ma_qema, // Quadruple exponential moving average - QEMA ma_qma, // Quantile moving average average - QMA ma_qurma, // Quadruple relative moving average - QURMA ma_qrma, // Quadratic regression average ma_qwma, // Quadratic weighted average ma_rlma, // Relative moving average - RLMA ma_rma, // Rolling moving average - RMA ma_rms, // Root mean square - RMS ma_rmta, // Recursive moving trendline - RMTA ma_rwavg, // Range weighted average - RWAVG ma_rwema, // Range weighted EMA - RWEMA ma_rwerema, // Range weighted Efficiency ratio EMA - RWEREMA ma_rwemads, // Range weighted EMA double smooth - RWDSEMA ma_rwerdsema, // Range weighted efficiency ratio DSEMA - RWERDSEMA ma_rwrma, // Range weighted RMA - RWRMA ma_rwrmads, // Range weighted RMA double smooth - RWDSRMA ma_sma, // Simple moving average - SMA ma_sid, // Simple decycler - SDEC ma_sine, // Sine weighted moving average ma_smma, // Smoothed moving average - SMMA ma_smoo, // Smoother ma_smoo2, // Smoother JMA like ma_ssm, // Super smoother ma_b3p, // Three pole Ehlers Butterworth ma_s3p, // Three pole Ehlers smoother ma_mt3r, // Fulks/Matulich T3 r adaptive - MT3R; ma_tt3r, // Tillson T3 R adaptive ma_tma, // Triangular moving average - TMA ma_tema, // Triple exponential moving average - TEMA ma_trma, // Triple relative moving average - TRMA ma_tsema2, // Triple smoothed EMA (variation) ma_tserema2, // Triple smoothed efficiency ratio EMA (variation) ma_twema, // Triple wilders exponential moving average - TWEMA ma_b2p, // Two pole Ehlers Butterworth ma_s2p, // Two pole Ehlers smoother ma_vidya, // Vidya ma_vema, // Volume weighted ema ma_vfma, // Volume weighted fast ema ma_vrma, // Volume weighted relative moving average ma_vwma, // Volume weighted moving average - VWMA ma_zldema, // Zero lag dema ma_zlhulle, // Zero lag Hull ema based - ZLHMAe ma_zlhullf, // Zero lag Hull fast ema - ZLHMAf ma_zlhulls, // Zero lag Hull slow ma - ZLHMAs ma_zlma, // Zero lag moving average ma_zltema, // Zero lag tema ma_zlertema // Zero lag efficiency ratio tema }; input enMaTypes inpMethod = ma_jur; // Ma method(if not using REMA'S) enum enPrices { pr_close, // Close pr_open, // Open pr_high, // High pr_low, // Low pr_median, // Median pr_typical, // Typical pr_weighted, // Weighted pr_average, // Average (high+low+open+close)/4 pr_medianb, // Average median body (open+close)/2 pr_tbiased, // Trend biased price pr_tbiased2, // Trend biased (extreme) price pr_haclose, // Heiken ashi close pr_haopen, // Heiken ashi open pr_hahigh, // Heiken ashi high pr_halow, // Heiken ashi low pr_hamedian, // Heiken ashi median pr_hatypical, // Heiken ashi typical pr_haweighted, // Heiken ashi weighted pr_haaverage, // Heiken ashi average pr_hamedianb, // Heiken ashi median body pr_hatbiased, // Heiken ashi trend biased price pr_hatbiased2, // Heiken ashi trend biased (extreme) price pr_habclose, // Heiken ashi (better formula) close pr_habopen, // Heiken ashi (better formula) open pr_habhigh, // Heiken ashi (better formula) high pr_hablow, // Heiken ashi (better formula) low pr_habmedian, // Heiken ashi (better formula) median pr_habtypical, // Heiken ashi (better formula) typical pr_habweighted, // Heiken ashi (better formula) weighted pr_habaverage, // Heiken ashi (better formula) average pr_habmedianb, // Heiken ashi (better formula) median body pr_habtbiased, // Heiken ashi (better formula) trend biased price pr_habtbiased2 // Heiken ashi (better formula) trend biased (extreme) price }; input enPrices inpPrice = pr_close; // Price input int inpLookBack = 35; // Zone look back input double inpUpBandPercent = 90; // Upper band percent input double inpMdBandPercent = 50; // Middle band percent input double inpDnBandPercent = 10; // Lower band percent input string __dis__01 = ""; //.Display settings input bool ShowMidLine = true; // Show channel middle line enum enColorOn { cc_onSlope, // on slope change cc_onMiddle, // on middle line cross cc_onLevels // on outer levels cross }; input enColorOn inpColorOn = cc_onSlope; // Change color: input string __alr__00 = ""; //.Alerts settings input bool inpAlertsOn = false; // Alerts on? input bool inpAlertsOnCurrent = true; // Alerts open bar? input bool inpDivAlert = true; // Divergence alerts on? input int inpDivMaxBar = 2; // Divergence alerts for bars less than : input bool inpAlertsMessage = true; // Alerts message? input bool inpAlertsSound = false; // Alerts sound? input bool inpAlertsEmail = false; // Alerts email? input bool inpAlertsPush = false; // Alerts notification? input string __arr__01 = ""; //.Arrows settings input bool inpDisplayArrows = true; // Arrows on chart? input string inpObjID = "adxt o1"; // Objects unique ID input bool inpArrowsOnLast = true; // Arrows on mtf bar? input color upArrowClr = clrBlue; // Bullish arrow color input color dnArrowClr = clrCrimson; // Bearish arrow color enum enArrowsUp { arr_00 = 108, // Ball arr_01 = 116, // Medium diamond arr_02 = 159, // Dot arr_03 = 217, // Fractal up arr_04 = 241, // Hollow up arr_05 = 246, // Hollow right up arr_06 = 225, // Thin up arr_07 = 228, // Thin right up arr_08 = 233, // Heavy up arr_09 = 236, // Heavy right up arr_10 = 200, // Curled up arr_11 = 221 // Up in a circle }; input enArrowsUp upArrowCode = arr_02; // Bullish arrows code enum enArrowsDn { ard_00 = 108, // Ball ard_01 = 116, // Medium diamond ard_02 = 159, // Dot ard_03 = 218, // Fractal down ard_04 = 242, // Hollow down ard_05 = 248, // Hollow right down ard_06 = 226, // Thin down ard_07 = 230, // Thin right down ard_08 = 234, // Heavy down ard_09 = 238, // Heavy right down ard_10 = 202, // Curled down ard_11 = 222 // Down in a circle }; input enArrowsDn dnArrowCode = ard_02; // Bearish arrows code input int arrowsSize = 2; // Arrows size input string __div__00 = ""; //.Divergence settings input bool inpDivVisible = true; // Divergence visible? input bool inpDivValuesVisible = true; // Indicator divergence visible? input bool inpDivChartVisible = true; // Chart divergence visible? input bool inpDivArrowsVisible = true; // Divergence arrows visible? input bool inpDivRegular = true; // Display regular divergence? input bool inpDivHidden = true; // Display hidden divergence? input int inpDivArrowsSize = 1; // Divergence arrows size input int inpDivLinesWidth = 2; // Regular divergence line width input enArrowsUp inpDivArrowsCodeUp = arr_10; // Divergence arrows bullish code input enArrowsDn inpDivArrowsCodeDn = ard_10; // Divergence arrows bearish code input color inpDivBullishColor = clrDodgerBlue; // Divergence bullish color input color inpDivBearishColor = clrDarkOrange; // Divergence bearish color input int inpNumBars = 500; // Number of bars to display enum enIterpolate { interolate_yes = (int)true, // Interpolate data when in multi time frame interolate_no = (int)false // Do not interpolate data when in multi time frame }; input enIterpolate inpInterpolate = interolate_yes; // Interpolation input string __butt__00 = ""; //.Button settings input int inpButtWindow = 0; // Window input ENUM_BASE_CORNER inpButtCorner = CORNER_RIGHT_UPPER; // Corner input int inpButtXPos = 35; // Horizontal shift input int inpButtYPos = 35; // Vertical shift input int inpButtXSize = 90; // Width input int inpButtYSize = 22; // Height input string inpButtFont = "Arial"; // Font input int inpButtFontSize = 10; // Font size input color inpButtColorBorder = clrBlack; // Border color input color inpButtColorBack = clrDimGray; // Background color input color inpButtColorText = clrLime; // Text color input string inpButtText = "Dz AdxT"; // Text to display
Thank you
