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

MQL4 지표

작업 종료됨

실행 시간 2 시간
고객의 피드백
Excellent! He asks the right questions, and works really fast. Highly recommended.
피고용인의 피드백
Good customer, very nice, I hope cooperate again.

명시

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.


응답함

1
개발자 1
등급
(611)
프로젝트
713
33%
중재
45
49% / 42%
기한 초과
14
2%
바쁜
2
개발자 2
등급
(117)
프로젝트
138
41%
중재
30
7% / 77%
기한 초과
17
12%
무료
3
개발자 3
등급
(169)
프로젝트
204
30%
중재
25
40% / 44%
기한 초과
12
6%
무료
4
개발자 4
등급
(206)
프로젝트
333
35%
중재
66
12% / 58%
기한 초과
87
26%
무료
5
개발자 5
등급
(312)
프로젝트
521
47%
중재
29
10% / 45%
기한 초과
139
27%
작업중
비슷한 주문
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

프로젝트 정보

예산
30+ USD
기한
 1 일