Volatility Cycle Index

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30024 quote
    supertiti
    Participant
    Master

    Bonjour à tous

    Peux t’on faire ressortir cet indicateur avec une échelle de 0 à 100 afin de pouvoir l’intégrer avec un autre ?

    //PRC_Volatility Cycle | indicator
    //02.12.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted and adapted from Metatrader4 version
    
    InpBandsPeriod=18      // Period
    Smooth=2               // Smoothness
    
    StdDev = std[InpBandsPeriod](close)
    highindex = highest[InpBandsPeriod](StdDev)[1]
    lowindex = lowest[InpBandsPeriod](StdDev)[1]
    
    if barindex>InpBandsPeriod then
    VolDer = (StdDev-highindex)/(highindex-lowindex)
    VolSmooth = average[Smooth](VolDer)
    
    if VolSmooth>0 then
     VolSmooth = 0
    elsif VolSmooth<-1.0 then
     VolSmooth = -1.0
    endif
    
    endif
    
    RETURN VolSmooth as "Volatility Cycle"
    #30028 quote
    Nicolas
    Keymaster
    Master

    En remplaçant la dernière ligne par :

    RETURN (VolSmooth*100)+100 as "Volatility Cycle"

    ça devrait coller à ta demande.

    #30031 quote
    supertiti
    Participant
    Master

    Merci beaucoup Nicolas, ça marche nickel !

    graphe joint

    Bonne soirée

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

Volatility Cycle Index


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
supertiti @supertiti Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/27/2017
Status: Active
Attachments: No files
Logo Logo
Loading...