condizioni di acquisto su vari tf

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #182291 quote
    leo di menno
    Participant
    Average
     Bolld=BollingerUp[19](close)
    if (not longonmarket) and close > bolld  and rsi>50 and Time >= BegTime and Time <= EndTime  then
    buy mycontracts contract at maxSetup limit

    salve, ipotizzando queste condizioni  di acquisto, o altre, con tf 15 minuti, come faccio a dire alla macchina di validarle solo se vengono rispettate contemporaneamente anche con tf di 45 min e tf 1 ora, totale su 3 tf diversi

    #182480 quote
    leo di menno
    Participant
    Average

    a nessuno è mai capitato di dover fare una strategia dove le condizioni di ingresso dovessero essere rispettate anche in altri tf multipli di quello del grafico?

    #182486 quote
    robertogozzi
    Moderator
    Master

    Così:

    Timeframe(1h,UpdateOnClose)
    Bolld1h=BollingerUp[19](close)
    //
    Timeframe(45 Minute,UpdateOnClose)
    Bolld45=BollingerUp[19](close)
    //
    Timeframe(15 Minute,UpdateOnClose)
    Bolld15=BollingerUp[19](close)
    //
    Timeframe(default)
    if (not longonmarket) and close > bolld1h and close > bolld45 and close > bolld15  and rsi>50 and Time >= BegTime and Time <= EndTime  then
    buy mycontracts contract at maxSetup limit

    Ho visto che non hai indicato l’RSI, quindi non l’ho messo nemmeno io. Forse lo usi con un altro TF. Puoi aggiungerlo te dove vuoi, basta che per ogni TF usi nomi diversi per le variabili.

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

condizioni di acquisto su vari tf


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 11/25/2021
Status: Active
Attachments: No files
Logo Logo
Loading...