indicatore personalizzato e multi time frame

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #231811 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    Vorrei un sistema che entri long se il mioindicatore è >80 nei Time frame trimestrale, mensile e settimanale. E’ possibile? Grazie

    #231821 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    DEFPARAM CUMULATEORDERS = False
    //
    Timeframe(Default)
    ONCE Periodi = 14
    ONCE IperC   = 70
    ONCE IperV   = 100 - IperC
    //
    Timeframe(3 Month,UpdateOnClose)
    MioIndicatore3M = rsi[Periodi](close)
    //
    Timeframe(Monthly,UpdateOnClose)
    MioIndicatoreM  = rsi[Periodi](close)
    //
    Timeframe(Weekly,UpdateOnClose)
    MioIndicatoreW  = rsi[Periodi](close)
    //
    Timeframe(Default)
    c1   = MioIndicatore3M > IperC
    c2   = MioIndicatoreM  > IperC
    c3   = MioIndicatoreW  > IperC
    Cond = c1 AND c2 AND c3 AND Not OnMarket
    IF Cond THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    SET STOP   pLOSS   100
    SET TARGET pPROFIT 300

    al posto di MioIndicatore metterai quello che desideri tu, purché il nime non sia identico per i vari timeframe.

    Funziona se uysi in grafico Giornaliero o inferiore. Non funziona su un grafico Settimanale (credo sia perché 3 Mesi non viene considerato un multiplo della settimana).

    Gabriele Battista thanked this post
    #231822 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    Scusa la domanda sciocca ma vorrei aver capito bene. Se il mio indicatore si chiama Pippo, devo prima “triplicarlo” creando Pippo3M PippoM e PippoW e poi creare sistema di trading con i 3 “Pippo”?

    Grazie

    #231839 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, perché non ci possono essere nomi identici in timeframe diversi. altrimenti il sistema non saprebbe a quale indicatore fare riferimento, se a quello Settimanale, Mensile ecc…

    Gabriele Battista thanked this post
    #231863 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    perfetto grazie, gentilissimo

    #231898 quote
    Gabriele BattistaGabriele Battista
    Participant
    Senior

    se volessi che il mio indicatore sia, in ogni time frame maggiore del valore precedente (crescente su ogni TF) lo posso fare? Grazie

    #232552 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, eccolo modificato:

    DEFPARAM CUMULATEORDERS = False
    //
    Timeframe(Default)
    ONCE Periodi = 14
    ONCE IperC   = 70
    ONCE IperV   = 100 - IperC
    //
    Timeframe(3 Month,UpdateOnClose)
    MioIndicatore3M = rsi[Periodi](close)
    c1   = MioIndicatore3M > MioIndicatore3M[1]
    //
    Timeframe(Monthly,UpdateOnClose)
    MioIndicatoreM  = rsi[Periodi](close)
    c2   = MioIndicatoreM > MioIndicatoreM[1]
    //
    Timeframe(Weekly,UpdateOnClose)
    MioIndicatoreW  = rsi[Periodi](close)
    c3   = MioIndicatoreW  > MioIndicatoreW[1]
    //
    Timeframe(Default)
    Cond = c1 AND c2 AND c3 AND Not OnMarket
    IF Cond THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    SET STOP   pLOSS   100
    SET TARGET pPROFIT 300
    Gabriele Battista thanked this post
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

indicatore personalizzato e multi time frame


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/22/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...