Custom Indicator: max difference, in absolute value, between two SMA's for a fixed number of periods

MQL4 Indicateurs

Tâche terminée

Temps d'exécution 2 heures
Commentaires du client
Excellent! He asks the right questions, and works really fast. Highly recommended.
Commentaires de l'employé
Good customer, very nice, I hope cooperate again.

Spécifications

Hi, Thanks for taking a look at this simple Custom Indicator job. I know how to do it on R, but don't have the MQL skills.  The excel file of the screenshot is attached.


Description:

I need an indicator that evaluates the maximum difference, in absolute value,  between two simple moving averages for a fixed number of periods.


custom indicator will be named:   

"MA delta max"


Indicator format:  line in separate window


3 configurable input variables:

  • MA1    example 200 for SMA200
  • MA2    example   50 for SMA50
  • p         example  150 to look 150 periods back   (ex 150 days if  chart is Daily)

* both are Simple Moving Averages, at close, no shift


formula possible syntax (no specific programming language): 

Max( Abs( MA1[(now-p) : (now)]   - MA50[(now-p) : (now)]))


It should match the picture here below, where indicator fetches the maximum value in p range:

* notice that a p value of 0 (as in current value)  is always included.  So p =3 actually reads 4 data points.


Dossiers :

Répondu

1
Développeur 1
Évaluation
(611)
Projets
713
33%
Arbitrage
45
49% / 42%
En retard
14
2%
Occupé
2
Développeur 2
Évaluation
(117)
Projets
138
41%
Arbitrage
30
7% / 77%
En retard
17
12%
Gratuit
3
Développeur 3
Évaluation
(169)
Projets
204
30%
Arbitrage
25
40% / 44%
En retard
12
6%
Gratuit
4
Développeur 4
Évaluation
(206)
Projets
333
35%
Arbitrage
66
12% / 58%
En retard
87
26%
Gratuit
5
Développeur 5
Évaluation
(312)
Projets
521
47%
Arbitrage
29
10% / 45%
En retard
139
27%
Travail
Commandes similaires
Hello, I want a simple bot for NinjaTrader8. I need a bot that operates automatically on Nasdaq (NQ/MNQ). Requirements: open buys and sells following a simple trend strategy, configurable stop loss and take profit, risk per trade of 1 to 2% of capital, if it loses 3% in a day, stop trading until the next day. Compatible with backtesting, delivery of the source code and the working bot in NinjaTrader 8. My initial
[8/4/2026 4:54 AM] DR.HassaN: AI Gold Analysis Web Platform Requirements Hello, I would like to build a professional AI-powered web platform dedicated exclusively to Gold (XAU/USD) analysis . This is NOT a trading platform or broker . It is an intelligent analysis platform that provides high-quality trading signals and detailed market analysis. The platform should have a modern, premium design with my own branding
Ema100+Fibo 30+ USD
I need a robot that sends me a notification when the price aligns with the EMA and my Fibonacci levels—using specific Fibonacci settings—and then either opens a trade based on the Fibonacci SL and TP or simply sends me a notification. And I want the robot to run in both the Strategy Tester and on a demo account, so I can test it beforehand
I need a custom technical indicator that generates an equidistant channel with two specific structural features: 1. Vertical Multi-Intervals: The ability to plot more than 5 parallel, able to allow me to put intervals 2. Horizontal Angle Input: The ability to manually input geometric angle to strictly define the horizontal slope of the channel or allow me to pick two points manually. i am looking for something like
//+------------------------------------------------------------------+ //| DX_Structure_H1.mq5 | //| Copyright 2026, Seu Nome | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026" #property link " https://www.mql5.com " #property version "1.00" #property strict // Parâmetros de Entrada input string InpSymbol = "DX.F"; // Nome do Ativo
Hola, traders e inversores: Desarrollamos soluciones de trading algorítmico para MetaTrader 4 y MetaTrader 5. Creamos bots, indicadores y herramientas a medida que convierten estrategias manuales en sistemas automáticos, configurables y orientados a una gestión de riesgo sólida. Hemos trabajado en automatizaciones que integran entradas y salidas por reglas, cálculo de lotaje, control de drawdown, filtros de horario y
> "I am looking for a reliable and profitable Expert Advisor (EA) or trading robot for MetaTrader. The EA should have a proven track record, good risk management, and stable performance in live market conditions. Please share the name of the EA, a brief explanation of how its strategy works, and any relevant performance statistics or backtest reports to help me evaluate it."
I have an MT4 custom indicator (.ex4) that I use regularly, and I would like an identical MT5 version. Important: I do not have the source code (.mq4). I only have the compiled MT4 indicator. I am looking for an experienced MQL developer who can recreate the indicator's functionality and appearance for MT5 by analyzing its behavior. The MT5 version should match the MT4 version as closely as possible, including
I have a technical specification ready for a custom alert indicator in NinjaTrader 8 (NinjaScript / C#). Important clarification: it is NOT an automatic trading bot, it is solely a visual indicator (arrows/lines on the chart) and sound alerts (notifications) based on EMA crossovers and range breakouts (ORB 15m) on lower timeframes for futures (MES). I already have the exact rules written out unambiguously
A good trend predicting indicator is the one which can identify the trend change as soon as it happens on the chart. when a new candle is formed it should tell whether its going to go up or down. I have already seen a lot of repainting trend predictors so if your indicator is repainting then please don't bother contacting. I would like to see the demo version and then if satisfied , I would want the source code too

Informations sur le projet

Budget
30+ USD
Délais
à 1 jour(s)