Hi, i would like a straight forward conversion of this indicator to MT4. the exact same functionality
doesnt exist in MT4 despite many simular.
thanks,
Mark
//----
Length = input(9,title="Period of Evaluation", type=input.integer)
Smooth = input(3,title="Period of Smoothing", type=input.integer)
show_histo = input(true, title="Show Histogam", type=input.bool)
//----
src = input(close,title="Source")
Mode = input(title="Indicator Method", type=input.string, defval="RSI", options=["RSI",
"STOCHASTIC","ADX"])
ma_type = input(title="MA", type=input.string, defval="WMA", options=["ALMA", "EMA", "WMA", "SMA",
"SMMA", "HMA"])
alma_offset = input(defval=0.85, title="* Arnaud Legoux (ALMA) Only - Offset Value", minval=0, step=0.01)
alma_sigma = input(defval=6, title="* Arnaud Legoux (ALMA) Only - Sigma Value", minval=0)
ma(type, src, len) =>
float result = 0
if type=="SMA" // Simple
result := sma(src, len)
if type=="EMA" // Exponential
result := ema(src, len)
if type=="WMA" // Weighted
result := wma(src, len)
if type=="SMMA" // Smoothed
w = wma(src, len)
result := na(w[1]) ? sma(src, len) : (w[1] * (len - 1) + src) / len
if type=="HMA" // Hull
result := wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
if type=="ALMA" // Arnaud Legoux
result := alma(src, len, alma_offset, alma_sigma)
result
//----
Price = src
//----
Price1 = ma("SMA",Price,1)
Price2 = ma("SMA",Price[1],1)
//RSI
Bulls0 = 0.5*(abs(Price1-Price2)+(Price1-Price2))
Bears0 = 0.5*(abs(Price1-Price2)-(Price1-Price2))
//STOCHASTIC
Bulls1 = Price1 - lowest(Price1,Length)
Bears1 = highest(Price1,Length) - Price1
//ADX
Bulls2 = 0.5*(abs(high-high[1])+(high-high[1]))
Bears2 = 0.5*(abs(low[1]-low)+(low[1]-low))
//
Bulls = Mode == "RSI" ? Bulls0 : Mode == "STOCHASTIC" ? Bulls1 : Bulls2
Bears = Mode == "RSI" ? Bears0 : Mode == "STOCHASTIC" ? Bears1 : Bears2
AvgBulls=ma(ma_type,Bulls,Length)
AvgBears=ma(ma_type,Bears,Length)
//----
SmthBulls=ma(ma_type,AvgBulls,Smooth)
SmthBears=ma(ma_type,AvgBears,Smooth)
difference = abs(SmthBulls - SmthBears)
bull_trend_color = (SmthBulls<SmthBulls[1])?color.lime:color.green
bear_trend_color = (SmthBears<SmthBears[1])?color.orange:color.red
difference_color = difference > SmthBulls ? ((SmthBears<SmthBears[1])?color.orange:color.red) :
difference > SmthBears ? ((SmthBulls<SmthBulls[1])?color.lime:color.green) : color.gray
plot(difference, style=plot.style_histogram, linewidth=3, color=show_histo ? difference_color : na, transp=45,
title="Strength")
//----
A = plot(SmthBulls,color=bull_trend_color,linewidth=4,transp=0)
B = plot(SmthBears,color=bear_trend_color,linewidth=4,transp=0)
//fill(A,B,color=trend==1?color.aqua:color.fuchsia,transp=80)
Benzer siparişler
Chciał bym w tej grze poznać dużo i zrozumieć ciężko bez języka mam tylko sms na gry nie mam kieszonkowych i kiepsko się trzymam finansowo żeby czasem myślę gdzie będę
Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). Buy Signal: When Fast MA crosses above Slow MA. Sell Signal: When Fast MA crosses below Slow MA. Risk Management & Parameters: Customizable Lot Size (Default: 0.01). Stop Loss (SL) and Take Profit (TP) in pips. Trailing Stop options. Max Spread filter. Platform: MetaTrader 5 (MQL5)
Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). Buy Signal: When Fast MA crosses above Slow MA. Sell Signal: When Fast MA crosses below Slow MA. Risk Management & Parameters: Customizable Lot Size (Default: 0.01). Stop Loss (SL) and Take Profit (TP) in pips. Trailing Stop options. Max Spread filter. Platform: MetaTrader 5 (MQL5)
I am looking for an experienced MQL5/MT5 developer to develop a custom Expert Advisor based on a complete technical architecture already prepared by the client. This is not a request to design a trading strategy from scratch . The strategy architecture, entry/exit concepts, filters, risk-management requirements and testing requirements are already documented. The main responsibility will be MQL5 development
seller must provide the following to be considered... i will answer to all who fit this description, and can purchase more than 1 EA... - brief strategy description - overall EA expectancy - 1 week limited trial version, with whatever settings you consider best (can be blocked on demo, i don't really care) - investor password from a reputable broker (if history is available... live / demo, same thing, doesn't really
can you help me use a Tickblaze Algo NRBO on the NT platform? I have it somewhat set up, but I have other questions about running it & knowing how to operate it in NT. Thank you if anyone have experience in this kindly bib and let do it asap
I need a fully automated custom Expert Advisor for MetaTrader 5 (MQL5). The EA is intended for use on a The5ers $100,000 2-Step prop-firm account. IMPORTANT DELIVERY REQUIREMENT: I must receive the complete editable .mq5 source code as well as the compiled .ex5 file. Compiled-only delivery is NOT acceptable. The EA must be coded specifically for this project and must not copy trades, use external trading signals or
Le robot devra : Respecter strictement les règles de risque des comptes FTMO : perte journalière maximale, perte maximale totale, taille des positions, etc. Intégrer un système de gestion du risque automatique. Être capable de gérer différents types de comptes et tailles de capital. Être basé sur ma stratégie et mes règles de trading que je fournirai au développeur. Être entièrement automatisé pour l’exécution des
I need a trading system similar to the attached files. Check attachment for details on the indicator. i guess the indicator contains some of (Rainbow MA , MTF Dashboard , Symbol Switcher , and Trend Histogram), though may not be exactly as listed
So, im a beginner and I'm pleading you to built me a bot that runs 24hrs and that can buy and sell at the same time, choose a better and profitable strategy. I will do anything thing it takes to get the bot. I hope you take my request into consideration