INDICATORE VINCOLATO A UN CERTO TIMEFRAME

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #185009 quote
    robertodoccrobertodocc
    Participant
    Average

    Buongiorno

    vorrei sapere se è possibile vincolare un indicatore solo ad un determinato timeframe, ovvero, se cambio il timeframe di un un grafico su cui è operativo un indicatore, questo mi viene “oscurato” (ma non cancellato) in modo che mi ricompaia quando ritorno al precedente time frame

    Ho provato a costruire con degli IF…THEN ma non conosco una grammatica che non mi dia un errore

    Grazie

    #185038 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo (però funziona solo con la piattaforma diretta di ProRealTime, non con quella di IG per il momento):

    // GetTimeFrame
    //
    // restituisce:
    //
    //           1 = 1 second
    //          10 = 10 seconds
    //          60 = 1 minute
    //         300 = 5 minutes
    //        3600 = 1 hour
    //       14400 = 4 hours
    //       86400 = 1 day    (24 hours)
    //      172800 = 2 days   (48 hours)
    //      604800 = 1 week   (7  days)
    //     2592000 = 1 month  (30 days)
    //    31536000 = 1 year   (365 days)
    //          -1 = default TF (su TF non a tempo, quali Ticks, Kagi, ecc...)
    //
    Signal = close CROSSES OVER average[20]
    TF     = GetTimeFrame
    IF TF <> 86400 THEN      //se diverso dal Giornaliero azzera il segnale
       Signal = 0
    ENDIF
    RETURN Signal AS "Signal"

    è programmato per funzionare solo sul TF Giornaliero. Se sostituisci 86400 con 3600 funzionerà solo sul grafico orario.

    robertodocc thanked this post
    #185088 quote
    robertodoccrobertodocc
    Participant
    Average

    Grazie mille!

    #185377 quote
    robertodoccrobertodocc
    Participant
    Average

    Buonasera Roberto,

    solo per info: funziona anche su piattaforma IG, perfettamente.

    Grazie

    #185411 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Bene, grazie.  Significa che è stato fatto un aggiornamento recente 🙂

Viewing 5 posts - 1 through 5 (of 5 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 VINCOLATO A UN CERTO TIMEFRAME


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 01/10/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...