Conversion of adx and di indicator

MQL4 Indicadores

Trabalho concluído

Tempo de execução 5 horas
Comentário do desenvolvedor
Спасибо!

Termos de Referência

 I want an adx and di indicator to place alerts based on heieken ashi data, buy condition would be DI +ve crosses up DI -ve, sell condition will be DI -ve crosses up DI +ve.

i have made two circles, DI+ve is green DI -ve is red, now you understand? AGAIN AS ABOVE, ONLY WORKS ON HEIKEN ashi, so code heiken ashi so that this indicator bases data from within the charts, and alert will ONLY BE GENERATED AT BAR CLOSURE, hence the trade will be executed on the new bar  forming provided that the condition is met. Mt4 doesnt support heiken ashi hence i am saying that i only want heiken ashi chart data to be used to generate the above. I am attaching the code below to be used to convert it into mt4 indicator. 

In the pic that i have attached DI+ve is the green line, DI-ve is the red line


study("ADX and DI")

len = input(title="Length", type=integer, defval=3)

len1 = input(title="Length1", type=integer, defval=1)

th = input(title="threshold", type=integer, defval=20)


TrueRange = max(max(high-low, abs(high-nz(close[1]))), abs(low-nz(close[1])))

DirectionalMovementPlus = high-nz(high[1]) > nz(low[1])-low ? max(high-nz(high[1]), 0): 0

DirectionalMovementMinus = nz(low[1])-low > high-nz(high[1]) ? max(nz(low[1])-low, 0): 0



SmoothedTrueRange = nz(SmoothedTrueRange[1]) - (nz(SmoothedTrueRange[1])/len) + TrueRange

SmoothedDirectionalMovementPlus = nz(SmoothedDirectionalMovementPlus[1]) - (nz(SmoothedDirectionalMovementPlus[1])/len) + DirectionalMovementPlus

SmoothedDirectionalMovementMinus = nz(SmoothedDirectionalMovementMinus[1]) - (nz(SmoothedDirectionalMovementMinus[1])/len) + DirectionalMovementMinus


DIPlus = SmoothedDirectionalMovementPlus / SmoothedTrueRange * 100

DIMinus = SmoothedDirectionalMovementMinus / SmoothedTrueRange * 100

DX = abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100

ADX = sma(DX, len)

//Skuska

crosscall = (DIPlus > DIMinus)

crossput = (DIMinus > DIPlus)

DIPcross = sma(crosscall, len1)

DIPput = sma(crossput, len1)

DIPOVB = (DIPlus > 60)

DIMOVS = (DIMinus > 60)



bgcolor(DIMOVS ? lime : na, transp=40)

bgcolor(DIPOVB ? orange : na, transp=20)

plot(DIPlus, color=green, linewidth=3, title="DI+")

plot(DIMinus, color=red, linewidth=3, title="DI-")

plot(ADX, color=white, linewidth=1, title="ADX")

hline(th, color=white, linewidth=1, linestyle=dashed)

bgcolor(DIPcross ? green : na, transp=60)

bgcolor(DIPput ? red : na, transp=60)

Arquivos anexados:

Respondido

1
Desenvolvedor 1
Classificação
(636)
Projetos
1007
47%
Arbitragem
33
36% / 36%
Expirado
99
10%
Trabalhando
Publicou: 6 códigos
2
Desenvolvedor 2
Classificação
(851)
Projetos
1464
72%
Arbitragem
122
29% / 48%
Expirado
358
24%
Trabalhando
Publicou: 3 artigos
3
Desenvolvedor 3
Classificação
(574)
Projetos
945
47%
Arbitragem
309
58% / 27%
Expirado
125
13%
Livre
4
Desenvolvedor 4
Classificação
(564)
Projetos
845
73%
Arbitragem
15
53% / 13%
Expirado
193
23%
Livre
5
Desenvolvedor 5
Classificação
(48)
Projetos
91
31%
Arbitragem
28
29% / 43%
Expirado
42
46%
Livre
Publicou: 1 código
6
Desenvolvedor 6
Classificação
(1156)
Projetos
1462
63%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
Pedidos semelhantes
Indicador Maximas e Minimas + Super Trend O Indicador MAX/MIN é um indicador de análise técnica para o MetaTrader 5 , desenvolvido para ajudar você a identificar regiões importantes de preço e possíveis oportunidades de compra e venda. O que ele faz MAX/MIN: identifica máximas e mínimas relevantes do mercado e mostra os preços no gráfico. HH / HL / LH / LL: ajuda a visualizar a estrutura do mercado, mostrando quando
Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
I'm looking for an experienced developer to create an automated gold trading bot. The bot should be compatible with MetaTrader 4/5 and TradingView. Key Requirements: - Automated trading bot - Compatible with MetaTrader 4/5 and TradingView - Implement scalping and swing trading strategies Ideal Skills and Experience: - Proficiency in trading algorithms - Experience with gold trading - Familiarity with MetaTrader and
I need a robust optimization of my MT5 EA, mainly for XAUUSD (Gold). Please optimize the existing adjustable parameters such as entry/exit settings, SL/TP, trailing/break-even settings, and any other strategy parameters that are appropriate. I want the optimization focused on stable profitability, low/moderate drawdown, and robustness rather than simply the highest possible profit. Please use out-of-sample testing
NinjaTrader 8 / NinjaScript Phase 1 build: convert an existing Auction Market Theory (AMT) strategy into objective, alert-only decision-support logic. Not a bot, no auto-execution — trades stay manual. Covers NQ/MNQ, ES, CL, MGC using 30-min TPO/Volume Profile context with 5-min confirmation: one 5-min close outside VAH/VAL = acceptance, close back inside = rejection. Dashboard shows bias, auction state, location
Hello, I need a custom NON-REPAINT MT5 indicator that gives sell/buy arrow signals 1–2 candlesticks before a spike on Crash and boom indices respectively occurs. Requirements: Works perfectly on MT5 Shows arrows before the spike (1–2 candles earlier). Non-repaint – once the arrow appears, it must stay. Should be accurate, not quantity — only quality signals. Must work on both demo and live accounts. I want the
Hello, I saw an indicator on TradingView and would like to know if you will be able to convert it for use on Thinkorswim platform? Thanks. if anyone can help me with it kindly do well to bid it urgent thanks looking forward too see you
calcVolume( void ) { //--- MqlRates rates[]; if ( CopyRates ( _Symbol , PERIOD_CURRENT , startTime, endTime, rates) > 0 ) { double rangeHigh = rates[ 0 ].high, rangeLow = rates[ 0 ].low; int count = MathAbs ( iBarShift ( _Symbol , PERIOD_CURRENT , startTime) - iBarShift ( _Symbol , PERIOD_CURRENT , endTime)) + 1 ; //---VERTICAL PRICE RANGE for ( int b = 0
Create an MT5 Expert Advisor (EA) for trading Gold (XAUUSD). The EA should provide BUY and SELL signals based on trend direction, market momentum, and price action. It should automatically place trades only when the entry conditions are met. Risk management: Use a small adjustable lot size. Include Stop Loss (SL) and Take Profit (TP). Include a maximum daily loss limit. Include a maximum number of open trades. Do not

Informações sobre o projeto

Orçamento
30+ USD
Prazo
para 5 dias