Fantail VMA

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #213216 quote
    ground77600ground77600
    Participant
    Junior

    Bonjour,

    Je viens vous demander si il vous serait possible, s’il vous plaît, de convertir l’indicateur suivant : Bixord FantailVMA provenant de la plate-forme Tradingview ?

    J’ai vu qu’il y avait un sujet dans le forum ( https://www.prorealcode.com/topic/indicateur-fantail-vma/ ). Nicolas avait proposé cette moyenne mobile ( https://www.prorealcode.com/prorealtime-indicators/variable-moving-average-vma/ ) pensant qu’il s’agissait de la même mais en fait non. La FantailVMA fonctionne différemment car elle intègre l’ADX dans son calcul.

    Vous trouverez ci-joint une copie d’écran de cette moyenne mobile.

    Bien cordialement.

    Voici le code de l’indicateur sur Tradingview :

    //@version=4
    study(title=”Bixord: FantailVMA”, shorttitle=”FVMA”, overlay=true)

    ADX_Length=input(2, minval=1, title=”ADX_Length”)
    Weighting=input(10.0, minval=1, title=”Weighting”)
    MA_Length=input(6, minval=1, title=”MA_Length”)//This must be =1 so that the VMA base line does not get averaged.

    VMA=close
    VarMA=close
    MA=close
    STR = high-low
    sPDI = 0.0
    sMDI = 0.0
    ADX=0.0
    ADXR=0.0

    Hi = high
    Hi1 = high[1]
    Lo = low
    Lo1 = low[1]
    Close1= close[1]

    Bulls1 = 0.5*(abs(Hi-Hi1)+(Hi-Hi1))
    Bears1 = 0.5*(abs(Lo1-Lo)+(Lo1-Lo))

    Bears = Bulls1 > Bears1 ? 0 : (Bulls1 == Bears1 ? 0 : Bears1)
    Bulls = Bulls1 < Bears1 ? 0 : (Bulls1 == Bears1 ? 0 : Bulls1)

    if (bar_index > 0)
    sPDI := (Weighting*sPDI[1] + Bulls)/(Weighting+1)//ma weighting
    sMDI := (Weighting*sMDI[1] + Bears)/(Weighting+1)//ma weighting

    TR = max(Hi-Lo,Hi-Close1)
    if (bar_index > 0)
    STR := (Weighting*STR[1] + TR)/(Weighting+1)

    PDI = STR > 0 ? sPDI/STR : 0
    MDI = STR > 0 ? sMDI/STR: 0
    DX = (PDI + MDI) > 0 ? abs(PDI – MDI)/(PDI + MDI) : 0
    if (bar_index > 0)
    ADX := (Weighting*ADX[1] + DX)/(Weighting+1)
    vADX = ADX

    adxlow = lowest(ADX, ADX_Length)
    adxmax = highest(ADX, ADX_Length)
    ADXmin = min(1000000.0, adxlow)
    ADXmax = max(-1.0, adxmax)
    Diff = ADXmax – ADXmin

    Const = Diff > 0 ? (vADX- ADXmin)/Diff : 0

    if (bar_index > 0)
    VarMA:=((2-Const)*VarMA[1]+Const*close)/2

    MA:= sma(VarMA,MA_Length)

    plot(MA, color=color.white, title=”Bixord FVMA “)

    Screenshot-FVMA.png Screenshot-FVMA.png
    #213219 quote
    NicolasNicolas
    Keymaster
    Legend

    Merci pour les infos sur cet indicateur, je regarde à cela dés que possible.

    #213220 quote
    ground77600ground77600
    Participant
    Junior

    Mille mercisNicolas !

    #213238 quote
    NicolasNicolas
    Keymaster
    Legend

    L’indicateur FantailVMA est disponible ici au téléchargement: FantailVMA

    fantail-vma.png fantail-vma.png
    #213248 quote
    ground77600ground77600
    Participant
    Junior

    Mille mercis Nicolas. Bravo pour tout ce que vous faites et pour votre rapidité. Vous êtes au top !!!!!!

Viewing 5 posts - 1 through 5 (of 5 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

Fantail VMA


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 04/13/2023
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...