Aprire un determinato giorno del mese

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #146276 quote
    FrancescoFrancesco
    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
    FrancescoFrancesco
    Participant
    Junior

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

    #146279 quote
    robertogozzirobertogozzi
    Moderator
    Legend

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

    #146280 quote
    robertogozzirobertogozzi
    Moderator
    Legend

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

    #146281 quote
    FrancescoFrancesco
    Participant
    Junior

    si va bene, grazie roberto

    #146296 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
5 years, 12 months ago.

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