uscita ts terzo venerdì del mese

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

    Buongiorno a tutti,

    chiedo se possibile un aiuto per implementare l’uscita della posizione il terzo venerdì di ogni mese.

    grazie

    Emiliano

    #211088 quote
    robertogozzi
    Moderator
    Master

    Ecco fatto:

    IF OpenMonth <> OpenMonth[1] THEN
       Venerdi = 0
    ENDIF
    IF (DayOfWeek = 5) AND (DayOfWeek <> DayOfWeek[1]) THEN
       Venerdi = Venerdi + 1
    ENDIF
    IF OnMarket AND (Venerdi = 3) AND (DayOfWeek = 5) THEN
       SELL      AT MARKET   //uscita LONG
       EXITSHORT AT MARKET   //uscita SHORT
    ENDIF
    emilianop thanked this post
    #211117 quote
    emilianop
    Participant
    New

    grazie, per la cortesia

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

uscita ts terzo venerdì del mese


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emilianop @emilianop Participant
Summary

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

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