Buy oppure sell in una data precisa

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #199969 quote
    pitp222pitp222
    Participant
    New

    Buongiorno a tutti,chiedo per favore come scrivere un codice che ad esempio si acquista tipo il 4 settembre di ogni anno, ovviamente se è sabato o domenica l’ordine viene eseguito il lunedì, e si vende sempre il 25 settembre,stesse condizioni per l’acquisto, ho trovato qui sul forum solo il codice per gli acquisti in un determinato giorno del mese. Grazie a tutti in anticipo

    Pierangelo

    #199971 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ecco fatto:

    IF (Month = 9) AND ((Day = 4) OR ((Day > 4) AND (Day[1] < 4))) AND Not OnMarket THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    IF (Month = 9) AND ((Day = 25) OR ((Day > 25) AND (Day[1] < 25))) AND LongOnMarket THEN
       SELL AT MARKET
    ENDIF
Viewing 2 posts - 1 through 2 (of 2 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

Buy oppure sell in una data precisa


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
pitp222 @pitp222 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years ago.

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