Hull Moving Average Swing Trader du logiciel tradingview

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #147511 quote
    oraclusoraclus
    Participant
    Average

    Trader avec la moyenne de hull pour détecter les retournements

    Descriptif issue de la plateforme:
    Hull Moving Average Strategy
    2 X HMA’s,
    1st HMA on current price (recommended source OPEN)
    2nd HMA on previous candle. signal on crossover.
    Buy and Sell signals on chart, red & green view pane (Green Buy, Red Sell)

    Code issue de la plateforme :

    Hull Moving Average Swing Trader
    strategy(“Hull Moving Average Swing Trader”, shorttitle=”HMA_Swing_Trader”, default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_order_fills=true, calc_on_every_tick=true, pyramiding=0)
    hullperiod = input(title=”HullMA Period”, type=input.integer, defval=210, minval=1)
    price = input(open, type=input.source, title=”Price data”)
    FromMonth = input(defval=1, title=”From Month”, minval=1, maxval=12)
    FromDay = input(defval=1, title=”From Day”, minval=1, maxval=31)
    FromYear = input(defval=2020, title=”From Year”, minval=2017)
    ToMonth = input(defval=1, title=”To Month”, minval=1, maxval=12)
    ToDay = input(defval=1, title=”To Day”, minval=1, maxval=31)
    ToYear = input(defval=9999, title=”To Year”, minval=2017)
    start = timestamp(FromYear, FromMonth, FromDay, 00, 00)
    finish = timestamp(ToYear, ToMonth, ToDay, 23, 59)
    window() =>
    time >= start and time <= finish ? true : false n2ma = 2 * wma(price, round(hullperiod / 2)) nma = wma(price, hullperiod) diff = n2ma – nma sqn = round(sqrt(hullperiod)) n2ma1 = 2 * wma(price[1], round(hullperiod / 2)) nma1 = wma(price[1], hullperiod) diff1 = n2ma1 – nma1 n1 = wma(diff, sqn) n2 = wma(diff1, sqn) Hull_Line = n1 / n1 * n2 Hull_retracted = if n1 > n2
    Hull_retracted = Hull_Line – 2
    else
    Hull_retracted = Hull_Line + 2
    c1 = Hull_retracted + n1 – price
    c2 = Hull_retracted – n2 + price
    c4 = n1 > n2 ? color.green : color.red
    c2p = plot(c2, color=color.black, linewidth=1)
    c3p = plot(price, color=color.black, linewidth=1)
    fill(c3p, c2p, color=c4, transp=75)
    //plot(cross(c1, c2) ? c1 : na, style=plot.style_circles, color=c4, linewidth=4)
    if price < c2 strategy.close(“BUY”, when=window()) if price > c2
    strategy.close(“SELL”, when=window())
    if price > c2 and price[1] > c1
    strategy.entry(“BUY”, strategy.long, when=window())
    if price < c1 and price[1] < c2
    strategy.entry(“SELL”, strategy.short, when=window()) //

    lIEN :
    https://fr.tradingview.com/script/j60hYGuY-Hull-Moving-Average-Swing-Trader/

    Merci pour votre aide

    HMA.jpg HMA.jpg
    #147535 quote
    NicolasNicolas
    Keymaster
    Legend

    This is an Hull MA cross over simple strategy.

    #147568 quote
    oraclusoraclus
    Participant
    Average

    Bonjour nicolas

    Oui c’est peut etre une simple stratégie mais avec un taux de réussite de 80% ce qui n’est pas négligeable.

    Est il possible de la convertir en code prorealtime (itf) ?

    Merci pour ton aide

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Hull Moving Average Swing Trader du logiciel tradingview


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
oraclus @oraclus Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by oraclusoraclus
5 years, 11 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/15/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...