NO LINKS OR MQL SOURCE CODE REQUESTS. Please follow the rules.


Re: Trend Indicators for MT4

#1112
This is Trend indicator B-V2 from Dziwne (translated from TradingView)

Code: Select all

//@version=4
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

//————————————————————————————————————————————————————————————————————————————
//——————————————————————————— Auteur | © Dziwne ——————————————————————————————
//————————————————————————————————————————————————————————————————————————————

study(title="Trend Indicator B-V2 (Momentum mesuring) [Dziwne]", shorttitle="Dziwne Trend Indicator B-V2 [Dziwne]", resolution="")

//————————————————————————————————————————————————————————————————————————————
//—————————————————————————————— I. Paramètres ———————————————————————————————
//————————————————————————————————————————————————————————————————————————————

ema = input(defval=14, minval=1, title="EMA Length")
ema_smooth = input(defval=14, minval=1, title="EMA Length (Smoothing)")

colors = input(title = "Color Scheme", defval="Classic", options=["Classic", "Dziwne Color Scheme"])
show = input(true, "Show Lines & Filling")

//————————————————————————————————————————————————————————————————————————————
//——————————————————————————— II.1. Calcules, EMA ————————————————————————————
//————————————————————————————————————————————————————————————————————————————

o = ema(open, ema)
c = ema(close, ema)
h = ema(high, ema)
l = ema(low, ema)

//————————————————————————————————————————————————————————————————————————————
//————————————————————————— II.2. Calcules, Heikin Ashi ——————————————————————
//————————————————————————————————————————————————————————————————————————————

ha_t = heikinashi(syminfo.tickerid)

ha_o = security(ha_t, timeframe.period, o)
ha_c = security(ha_t, timeframe.period, c)
ha_h = security(ha_t, timeframe.period, h)
ha_l = security(ha_t, timeframe.period, l)

//————————————————————————————————————————————————————————————————————————————
//————————————————— II.3. Calcules, EMA (Réduction du bruit) —————————————————
//————————————————————————————————————————————————————————————————————————————

ha_o_smooth = ema(ha_o, ema_smooth)
ha_c_smooth = ema(ha_c, ema_smooth)
ha_h_smooth = ema(ha_h, ema_smooth)
ha_l_smooth = ema(ha_l, ema_smooth)

//————————————————————————————————————————————————————————————————————————————
//—————————————————— II.4. Calcules, Echelle %, Puissance  ———————————————————
//————————————————————————————————————————————————————————————————————————————

dif_oc = ha_c_smooth - ha_o_smooth
dif_hl = ha_h_smooth - ha_l_smooth

variable_oc_percent = dif_oc * 100 / dif_hl

//————————————————————————————————————————————————————————————————————————————
//————————————————— II.5. Calcules, Définition des couleurs ——————————————————
//————————————————————————————————————————————————————————————————————————————

couleur_positive = colors == "Classic" ? #26A69A : #FFBE3D
couleur_negative = colors == "Classic" ? #EF5350 : #D63031

couleur_positive_2 = colors == "Classic" ? #B2DFDB : #ffd88a
couleur_negative_2 = colors == "Classic" ? #FFCDD2 : #e37071

couleur_uptrend = change(dif_oc) >= 0 ? couleur_positive : couleur_positive_2
couleur_downtrend = change(dif_oc) <= 0 ? couleur_negative : couleur_negative_2

couleur_trend = dif_oc <= 0 ? couleur_downtrend : couleur_uptrend

couleur_show_positive = show ? couleur_positive : na
couleur_show_negative = show ? couleur_negative : na

//————————————————————————————————————————————————————————————————————————————
//———————————————————————————— III. Mise en place ————————————————————————————
//————————————————————————————————————————————————————————————————————————————

plot(variable_oc_percent, style=plot.style_columns, color=couleur_trend, title="Trend Momentum Indicator")

fib_236_positive = plot(23.6, color=na, title="23.6% Fibonacci")
fib_382_positive = plot(38.2, color=na, title="38.2% Fibonacci")
plot(50, color=couleur_show_positive, title="50% Fibonacci")

fib_236_negative = plot(-23.6, color=na, title="-23.6% Fibonacci")
fib_382_negative = plot(-38.2, color=na, title="-38.2% Fibonacci")
plot(-50, color=couleur_show_negative, title="-50% Fibonacci")

fill(fib_236_positive, fib_382_positive, color=couleur_show_positive, title="Positive Momentum Rejection-zone")
fill(fib_236_negative, fib_382_negative, color=couleur_show_negative, title="Negative Momentum Rejection-zone")

//————————————————————————————————————————————————————————————————————————————
//—————————————————————————————————— FIN —————————————————————————————————————
//————————————————————————————————————————————————————————————————————————————

It's using heiken ashi smoothed with Ema in the original, I added the other standard mt4 ma's + an option to use T3.
EURUSDM15.png
!!Trend Indicator B-V2.ex4
(30.63 KiB) Downloaded 88 times

LoveRe: Trend Indicators for MT4

#1113
mrtools wrote:
Thu Sep 30, 2021 4:09 am
This is Trend indicator B-V2 from Dziwne (translated from TradingView)
Man this is neat 😯

Really looking forward to checking it out in the morning bro. Thank you Mrtools, you've even added T3 in the mix 👌
Trade with the broker that supports our work! FBS are offering $140 to get you started! Click, here to begin live trading, today.
No commissions are earned by Forex-station.


The brand new FBS Forex Calendar 🗓️
How to: Draw Fibonacci Extensions the easy way
How to: Identify major Support & Resistance using the line chart

Re: Trend Indicators for MT4

#1115
mrtools wrote:
Thu Sep 30, 2021 7:37 am
Wasn't quite the same as the tradeview version, think this version is pretty close, added ema pre smoothing.
Thank you for porting this one over for us Mrtools & adding the T3 Smoothing. It is indeed a very nice code for the collection of trend trading indicators & this one is easy to interpret. I really like how the Histogram has auto-adjustment options, too.

Here's a simple dark-themed chart setup from today's featured indicator post:
Trend Indicator B-V2 Tradingview indicator to MT4 port.png
B-V2 Trend indicator Template for MT4.zip
(98.75 KiB) Downloaded 188 times
Trade with the broker that supports our work! FBS are offering $140 to get you started! Click, here to begin live trading, today.
No commissions are earned by Forex-station.


The brand new FBS Forex Calendar 🗓️
How to: Draw Fibonacci Extensions the easy way
How to: Identify major Support & Resistance using the line chart


Re: Trend Indicators for MT4

#1116
Jimmy wrote:
Thu Sep 30, 2021 9:00 pm
Here's a simple dark-themed chart setup from today's featured indicator post:
jimmyboy man u charts are just SO nice........ 🤤🤤🤤

u still using dis yfx watermark i post years ago ehehehehe COOOL
Contribution Inspector & GIF Animator at your service👮

Re: Trend Indicators for MT4

#1117
moey_dw wrote:
Thu Sep 30, 2021 9:16 pm
jimmyboy man u charts are just SO nice........ 🤤🤤🤤

u still using dis yfx watermark i post years ago ehehehehe COOOL
Yes, always. And I still think YFX is the best watermark indicator for MT4. Not sure how you got a hold of it, but thank you for posting it bro.
Trade with the broker that supports our work! FBS are offering $140 to get you started! Click, here to begin live trading, today.
No commissions are earned by Forex-station.


The brand new FBS Forex Calendar 🗓️
How to: Draw Fibonacci Extensions the easy way
How to: Identify major Support & Resistance using the line chart

Re: Trend Indicators for MT4

#1118
mrtools wrote:
Thu Sep 30, 2021 4:09 am
This is Trend indicator B-V2 from Dziwne (translated from TradingView)
Master Mr Tools

it's nice
Capture.PNG
thankyou


Profit Regards
Erynade
Not too Fast, Not too Slow, "Safe and Profit"

Re: Trend Indicators for MT4

#1120
josi wrote:
Thu Sep 30, 2021 10:27 pm
If I am wrong, please correct me:
indicator bar width cannot be altered
Image
Not while auto width is true, if false you should be able to adjust the width.


  1. Similar Topics

    1. Need help for Big trend catch indicator

      1 Replies 904 Views

      by kyawswarlin, Fri Oct 30, 2020 1:21 am in MT4 Indicators

      1 Replies
      904 Views
    2. 0 Replies
      640 Views
    3. Can anybody fix the Waddah Attar Trend EA, please?

      0 Replies 1463 Views

      by LadyAmira, Sun Nov 01, 2020 11:05 pm in MT4 Indicators

      0 Replies
      1463 Views

Return to “MT4 Indicators”

Users viewing this forum: Banzai, blonde, charli, CommonCrawl [Bot], jo1234ao, johncker, juantrader, KAESER444, kvak, Léon, mrtools, neufert, ramon, remcous, RodrigoRT7, rudiarius, SEMrush [Bot], Skyold, Yandex [Bot] and 40 guests