Indicatore basato su Supertrend

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41052 quote
    MaxMax
    Participant
    Average

    Qui di seguito una domanda inviata a ProRealTime :

    Buonasera,
    Chiedo la costruzione di questo indicatore:
    Scatterà un segnale di acquisto quando il prezzo incrocia al rialzo o al ribasso due supertrend:
    – 3, 32
    -5, 55
    mi darà invece un segnale di uscita quando incrocia nel verso opposto la posizione di entrata il Supertrend da 3,32.
    Grazie e buon lavoro

    E un esempio di risposta :

    supertrend1=Supertrend[3,32]
    supertrend2=Supertrend[5,55]
    
    if not onmarket then
    if close crosses over supertrend1 or close crosses over supertrend2 then
    buy 1 share at market
    sens=1
    elsif close crosses under supertrend1 or close crosses under supertrend2 then
    buy 1 share at market
    sens=-1
    endif
    endif
    
    if onmarket then
    if close crosses over supertrend1 and sens=-1 then
    sell at market
    elsif close crosses under supertrend1 and sens=1 then
    sell at market
    endif
    endif
    #41107 quote
    Marcot18Marcot18
    Participant
    Veteran

    Buonasera, io ho specifiato un indicatore che segnala non un probecktest.

    ho fatto questa richiesta perchè  voglio avere il grafico pulito.

    è possibile?

    #41137 quote
    NicolasNicolas
    Keymaster
    Legend

    Penso che ciò che ti occorre è qualcosa di simile?

    supertrend1=Supertrend[3,32]
    supertrend2=Supertrend[5,55]
    
    atr=averagetruerange[10]
    
    if close crosses over supertrend1 or close crosses over supertrend2 then
    drawarrowup(barindex,low-atr) coloured(0,200,0)
    sens=1
    elsif close crosses under supertrend1 or close crosses under supertrend2 then
    drawarrowup(barindex,low-atr) coloured(0,200,0)
    sens=-1
    endif
    
    if close crosses over supertrend1 and sens[1]=-1 then
    drawtext("X",barindex,high+atr,Dialog,Bold,22) coloured(200,0,0)
    elsif close crosses under supertrend1 and sens[1]=1 then
    drawtext("X",barindex,high+atr,Dialog,Bold,22) coloured(200,0,0)
    endif
    
    
    RETURN
    supertrend-signals.png supertrend-signals.png
    #41193 quote
    Marcot18Marcot18
    Participant
    Veteran

    Grazie Nicolas molto gentile.

Viewing 4 posts - 1 through 4 (of 4 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 basato su Supertrend


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Max @max Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 07/19/2017
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...