strategia doppio supertrend

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208822 quote
    NAMBO40NAMBO40
    Participant
    New

    Buongiorno, avrei necessita di creare un indicatore sotto il grafico  a istogrammi. Verde quando due supertrend settati con valori diversi sono posizionati sotto il prezzo. Rosso quando sono posizionati sopra il prezzo. Giallo quando il prezzo e`all interno della   zona dei due super trend discordanti ( zona neutra ). Grazie.

    #208850 quote
    NicolasNicolas
    Keymaster
    Legend

    Il codice sottostante traccia un istogramma di colore rosso/verde o grigio a seconda della posizione del prezzo con 2 diversi indicatori di Supertrend. Modifica le impostazioni del Supertrend (periodo e moltiplicatore) nelle prime 2 righe.

    st1=Supertrend[3,10]
    st2=Supertrend[1.5,20]
    
    if close>max(st1,st2) then 
    r=0
    g=255
    b=0
    elsif close<min(st1,st2) then 
    r=255
    g=0
    b=0
    else
    r=168
    g=168
    b=168
    endif 
    
    return 1 coloured(r,g,b) style(histogram)
    Distincttacos thanked this post
    2-supertrend-trend-indicator.png 2-supertrend-trend-indicator.png
    #208864 quote
    NAMBO40NAMBO40
    Participant
    New

    Proprio quello che cercavo, perfetto. Grazie mille .

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

strategia doppio supertrend


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
NAMBO40 @nambo40 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by NAMBO40NAMBO40
3 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 01/31/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...