Supertrend candele consecutive

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #141643 quote
    bobanteo
    Participant
    New

    Buongiorno a tutti,

    premetto che non mi intendo di programmazione e quindi chiedo aiuto qui.

    Vorrei sapere se con prorealtime si può creare uno screener che mi individui le azioni che da x giorni consecutivi hanno il prezzo che è sopra la linea del Supertrend (o viceversa sotto).

    Magari non ho cercato bene ed uno screener di questo tipo già esiste?

    Grazie infinite a chi può aiutarmi. Buon ferragosto

    #141657 quote
    robertogozzi
    Moderator
    Master

    Ce n’è uno qui https://www.prorealcode.com/prorealtime-market-screeners/stocks-above-supertrend/, ma credo sia un pò diverso da quello che cerchi tu.

    Questa è la versione modificata secondo la tua richiesta (se l’ho interpretata correttamente):

    N     = 10                                //10 candele consecutive
    MioST = SuperTrend[3,10]                  //3,10
    Sopra = (summation[N](close > MioST) = N)
    Sotto = (summation[N](close < MioST) = N)
    Risultato = 0
    IF Sopra THEN
       Risultato = 1
    ELSIF Sotto THEN
       Risultato = 2
    ENDIF
    SCREENER[Risultato](Risultato AS "1=↑,2=↓")

    restituisce 1 quando il prezzo è sopra e 2 quando è sotto il SuperTrend.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Supertrend candele consecutive


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
bobanteo @bobanteo Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 6 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/14/2020
Status: Active
Attachments: No files
Logo Logo
Loading...