Codice per apertura inizio barra/Chiusura fine barra

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #219520 quote
    banjoo78banjoo78
    Participant
    New

    Ciao,

    sono nuovo di PRT e sto provando a codificare un sistema attraverso il quale ottenere un’analisi oraria di come si comporta il mercato.

    In sostanza il sistema dovrà fare questo:

    • aprire una posizione all’apertura della barra X e chiudere la stessa posizione alla chiusura della barra in questione
    • Ciclare su tutte le barre della giornata
    • Ripetere l’operazione per tutti i giorni inclusi nel backtest.

    Quello che mi aspetto, alla fine, è avere le info per costruire un istogramma che mi consenta di sapere quali sono gli orari più profittevoli per le operazioni long/short

    Qualcuno saprebbe aiutarmi?

    grazie mille

    #219580 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Questa strategia entra LONG alle 110000 e chiude alle 115900:

    DEFPARAM CumulateOrders = false
    Timeframe(1h,UpdateOnClose)
    IF Time = 110000 AND Not OnMarket THEN
       BUY at Market
    ENDIF
    //
    Timeframe(1mn,default)
    IF OnMarket AND hour <> hour[1] THEN
       SELL at Market
    ENDIF

    devi eseguirla da un grafico con il timeframe di 1 minuto.

    banjoo78 thanked this post
    #219713 quote
    banjoo78banjoo78
    Participant
    New

    Grazie Roberto!

Viewing 3 posts - 1 through 3 (of 3 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

Codice per apertura inizio barra/Chiusura fine barra


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
banjoo78 @banjoo78 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 08/23/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...