concersion indicateur “pivot trend” tradingview en prorealtime

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #215272 quote
    ybagone1
    Participant
    New

    bonjour,

    j ai remarquė un post sur la conversion d un indicateur “pivot supetrend” par nicolas.

    mais j utilise un autre indicateur du meme auteur “indicateur pivot trend”.  pouvez vous convertir celui ci ?  merci

    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © LonesomeTheBlue

    //@version=4
    study(“Pivot Trend”, precision = 2, explicit_plot_zorder = true)
    prd = input(defval = 4, title=”Pivot Point Period”, minval = 1, maxval = 30)
    pnum = input(defval = 3, title=”number of PP to check”, minval = 1, maxval = 30)
    colup = input(defval = color.blue, title = “Colors”, inline = “col”)
    coldn = input(defval = color.orange, title = “”, inline = “col”)

    float ph = pivothigh(prd, prd)
    float pl = pivotlow(prd, prd)
    var ph_lev = array.new_float(pnum, na)
    var pl_lev = array.new_float(pnum, na)

    if ph
    array.unshift(ph_lev, ph)
    array.pop(ph_lev)

    if pl
    array.unshift(pl_lev, pl)
    array.pop(pl_lev)

    float lrate = 0.0
    for i = 0 to array.size(pl_lev) – 1
    float rate = (close – array.get(pl_lev, i)) / array.get(pl_lev, i)
    lrate += (rate / pnum)

    float hrate = 0.0
    for i = 1 to array.size(ph_lev) – 1
    float rate = (close – array.get(ph_lev, i)) / array.get(ph_lev, i)
    hrate += (rate / pnum)

    hline(0.)
    hln = plot(hrate, color = color.red, linewidth = 2)
    lln = plot(lrate, color = color.lime, linewidth = 2)

    trend = 0
    trend := hrate > 0 and lrate > 0 ? 1 : hrate < 0 and lrate < 0 ? -1 : nz(trend[1])
    tcolor = trend == 1 ? color.new(colup, 40) : color.new(coldn, 40)
    fill(hln, lln, color = tcolor)

    mid = sma((hrate + lrate) / 2, 9)
    plot(mid, color = mid >= 0 ? mid >= mid[1] ? color.blue : color.navy : mid <= mid[1] ? color.red : color.orange, linewidth = 2)

    alertcondition(change(trend) > 0, title=’Pivot Trend UP’, message=’Pivot Trend UP’)
    alertcondition(change(trend) < 0, title=’Pivot Trend DOWN’, message=’Pivot Trend DOWN’)

    #215393 quote
    Nicolas
    Keymaster
    Master

    Merci d’ajouter des images des indicateurs originaux lors des demandes de conversion, cela accélère le processus.

    D’après la lecture du code, on fait une moyenne des pivots hauts et bas de X périodes et on teste les breakout de ces moyennes.

    #215404 quote
    Nicolas
    Keymaster
    Master

    L’indicateur Pivot Trend a été converti, il est disponible au téléchargement ici : Pivot Trend

    pivot-trend-indicator.png pivot-trend-indicator.png
    #215445 quote
    Ybag
    Participant
    New

    merci nicolas,

    j’avais pas vu, voir pas vraiment chercher

    merci

    #215485 quote
    Nicolas
    Keymaster
    Master

    Non je viens de le faire.

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

concersion indicateur “pivot trend” tradingview en prorealtime


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
ybagone1 @ybagone1 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Nicolas
2 years, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/27/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...