Skip to content

Instantly share code, notes, and snippets.

@juankof21
juankof21 / MTF-HMAmlades.mq4
Created December 15, 2024 15:34
MTF hull moving average 2025
//Creado por MLADEN y optimizado porChatgpt 2025
#property copyright ""
#property link ""
//------------------------------------------------------------------
#property indicator_separate_window
#property indicator_buffers 2
#property strict
#property indicator_minimum 0.001
#property indicator_maximum 0.01
@juankof21
juankof21 / MTF-HMA.mq4
Created July 2, 2023 14:35
Hull Moving Average MTF Metatrader4
//+------------------------------------------------------------------+
//| HMA color nrp.mq4 |
//| mladen |
//+------------------------------------------------------------------+
//------------------------------------------------------------------
//
// divisor modification idea by SwingMan
//
#property copyright ""
#property link ""
#property description "primer indicador triple bufer"
#property tester_indicator "MTF-RSIOMA"
#include <stdlib.mqh>
#include <stderror.mqh>
//--- indicator settings
#property indicator_separate_window
#property indicator_buffers 3
if( LastSignal != Time[0] ) //Segunda LINEA Refresh 1minuto
{ //Tercera Linea Refresh 1Minuto
//--- main loop
for(int i = limit-1; i >= 0; i--)
{
if (i >= MathMin(1000-1, rates_total-1-50)) continue; //omit some old rates to prevent "Array out of range" or slow calculation
// CONFIG A: MTF-HMAPrice", 5, 34, 8, 5, 1.8, 9, /// Average.Median.Body(open+close)/2 - 5MIN.P34 --- Linear Regresion Value
// CONFIG B: MTF-HMAPrice", 5, 34, 28, 0, 1.8, 9, /// Heiken.Ashi.Better.Formula.Weighted - 5Min.P34 --- Simple Mpving Average