indicatore 4 roc

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243367 quote
    pignolauspignolaus
    Participant
    Average

    Buongiorno, vorrei creare un indicatore personalizzato che mi indichi ad esempio con un istogramma positivo, quando i seguenti indicatori sono contemporaneamente positivi; Roc200, Roc 100, Roc 50 e Roc 10. Si timeframe giornaliero.

    Questo mi serve praticamente a vedere quando un titolo è in potenziale situazione rialzista senza dover visualizzare i 4 differenti indicatori di cui sopra.

    Ho provato a scrivere un codice ma senza esito positivo. Potete darmi qualche indicazione?  Grazie

    #243383 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Qui faccio un esempio senza tenere conto del valore del ROC. Analizziamo solo se è positivo o negativo. Puoi cambiare i colori nell'ultima riga di codice.

    // ROC
    roc200=roc[200](close)
    roc100=roc[100](close)
    roc50=roc[50](close)
    roc10=roc[10](close)
    
    //Transformation ROC200
    if roc200>0 then
    roc200=4
    else
    roc200=-4
    endif
    //Transformation ROC100
    if roc100>0 then
    roc100=3
    else
    roc100=-3
    endif
    //Transformation ROC50
    if roc50>0 then
    roc50=2
    else
    roc50=-2
    endif
    //Transformation ROC10
    if roc10>0 then
    roc10=1
    else
    roc10=-1
    endif
    
    return roc200 style(histogram)coloured("red"),roc100 style(histogram)coloured("blue"),roc50 style(histogram)coloured("green"),roc10 style(histogram)coloured("lime"),0 style(line) 
    robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

indicatore 4 roc


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
pignolaus @pignolaus Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 7 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 02/03/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...