Aprire un determinato giorno del mese

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #146276 quote
    Francesco
    Participant
    Junior

    Buongiorno,

    Vorrei sapere il codice per aprire una posizione di acquisto un determinato giorno del mese.

    Vorrei integrarlo con una condizione anche del tipo compra solo se l’attuale prezzo è sceso sotto la metà della barra precedente mensile.

    E’ una semplice strategia di buy che sfrutta il rally del fine mese che avviene in quasi tutti i mercati.

    #146277 quote
    Francesco
    Participant
    Junior

    Supponiamo che voglio aprire il 15 di ogni mese e chiudere la posizione il 30.

    #146279 quote
    robertogozzi
    Moderator
    Master

    >> Si prega d’Inserire il segno di spunta all’interno della casella sul profilo, per aggiornare il vostro paese. <<
    Grazie 🙂

    #146280 quote
    robertogozzi
    Moderator
    Master

    Non è detto che il 15 sia sempre giorno lavorativo, se non lo è occorre farlo il primo giorno lavorativo successivo, va bene?

    #146281 quote
    Francesco
    Participant
    Junior

    si va bene, grazie roberto

    #146296 quote
    robertogozzi
    Moderator
    Master

    Eccolo (non l’ho provato):

    If (Day = 15) or (Day > 15 and Day[1] < 15) Then
       If MieCondizioni Then
          Buy at Market
       Endif
    Endif
    If Month <> Month[1] Then
       If LongOnMarket Then
          Sell at Market
       Endif
    Endif
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Aprire un determinato giorno del mese


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

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