Visualizzazione incrocio non corretta

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #96983 quote
    F TradersF Traders
    Participant
    New

    Buongiorno a tutti, premetto che sono alle prime armi con la scrittura di indicatori prorealtime e quindi il mio problema potrebbe essere semplice per molti di voi.

    Ho creato un indicatore che colora di rosso lo sfondo quando avviene l’incrocio al ribasso tra la tenkan e la kijun, e verde viceversa.

    Tenkansen = (highest[9](High)+lowest[9](Low))/2
    Kijunsen  = (highest[26](High)+lowest[26](Low))/2
    
    IF Tenkansen CROSSES OVER Kijunsen THEN
    backgroundcolor (0, 255, 0, 100)
    ENDIF
    
    IF Tenkansen CROSSES UNDER Kijunsen THEN
    backgroundcolor (255, 0, 0, 100)
    ENDIF
    
    Return

    Se applico l’indicatore la prima volta funziona correttamente, se poi cambio titolo sbaglia la visualizzazione inserendo delle zone di colore non valide.
    Se però riapplico l’indicatore ex novo torna a funzionare correttamente.

    Allego schermate.
    Grazie a chi mi aiuterà.

    MS-Visualizzazione-errata.png MS-Visualizzazione-errata.png MS-Visualizzazione-corretta.png MS-Visualizzazione-corretta.png
    #96987 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Per favore aggiorna il tuo Paese nel profilo.

    Grazie.

    #96989 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Prova ad inserire questa riga prima della 4:
    <pre class=”lang:probuilder decode:true “>backgroundcolor (255,255,255,255)

    #96990 quote
    robertogozzirobertogozzi
    Moderator
    Legend
    backgroundcolor (255,255,255,255)
    #96993 quote
    swappingswapping
    Participant
    Master
    BackgroundColor (255,255,255,255)  // Init background
    
    Tenkansen = (highest[9](High)+lowest[9](Low))/2
    Kijunsen  = (highest[26](High)+lowest[26](Low))/2
    
    if Tenkansen crosses over Kijunsen then
    BackgroundColor (0,255,0,100)
    elsif Tenkansen crosses under Kijunsen then
    BackgroundColor (255,0,0,100)
    endif
    
    return
    
    Nicolas thanked this post
    #97000 quote
    F TradersF Traders
    Participant
    New

    Per favore aggiorna il tuo Paese nel profilo.

    Grazie.

    Buongiorno, nel paese ho Italia. Devo aggiornare qualche altro campo?
    Grazie

    #97001 quote
    F TradersF Traders
    Participant
    New

    Grazie a tutti, ho risolto mettendo il parametro da voi indicato.

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

Visualizzazione incrocio non corretta


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by F TradersF Traders
7 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/23/2019
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...