Mio PRICE OSCILLATOR evo

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #236502 quote
    andrea trevisanandrea 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
    robertogozzirobertogozzi
    Moderator
    Legend

    Cambia la penultima riga con questa:

    NormDiff=(((Diff-MinDiff)/(MaxDiff-MinDiff))*200) - 100
    #236544 quote
    andrea trevisanandrea 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.
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

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 trevisanandrea trevisan
2 years, 1 month ago.

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