Mio PRICE OSCILLATOR evo

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #236502 quote
    andrea trevisan
    Participant
    Average
    SlowPeriod=35
    FastPeriod=5
    LookBackPeriod=SlowPeriod*FastPeriod

    Nella precedente richiesta ho commesso un errore, ho richiesto di inserire il mio “PRICE OSCILLATOR” in una scala di valori da 0 a 100 come RSI.

    Un utente mi ha mandato uno script che funziona benissimo, però  in realtà la scala di valori dovrebbe essere da 100 a -100 come nel MACD.

    Riporto qui lo script che mi è stato mandato e se possibile modificarlo per avere, appunto, una scala dai valori da 100 a -100, spero possiate aiutarmi Grazie.

    AvgSlow=Average[SlowPeriod](close)
    AvgFast=Average[FastPeriod](close)
    Diff=Abs(AvgSlowAvgFast)
    MinDiff=Lowest[LookBackPeriod](Diff)
    MaxDiff=Highest[LookBackPeriod](Diff)
    NormDiff=((DiffMinDiff)/(MaxDiffMinDiff))*100
    Return NormDiff
    #236506 quote
    robertogozzi
    Moderator
    Master

    Cambia la penultima riga con questa:

    NormDiff=(((Diff-MinDiff)/(MaxDiff-MinDiff))*200) - 100
    #236544 quote
    andrea trevisan
    Participant
    Average

    Grazie sempre gentilissimi.

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

Mio PRICE OSCILLATOR evo


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by andrea trevisan
1 year, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 08/19/2024
Status: Active
Attachments: No files
Logo Logo
Loading...