Interrompere L esecuzione il giorno desiderato

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

    Buona sera . Avrei bisogno di sapere come interrompere l’esecuzione del programma tutti i venerdì sera alle 20 .

    DEFPARAM FLAT BEFORE=200000 dayofweek[5]     è corretta?

    Ringrazio anticipatamente

    Emanuele

    #50869 quote
    robertogozzi
    Moderator
    Master

    No, così non va bene.

    DEFPARAM FLAT BEFORE accetta solo un orario dopo “=” e nient’altro. In ogni caso sarebbe eventualmente DEFPARAM FLAT AFTER, solo che questo verrebbe eseguito dal sistema TUTTI i giorni.

    La soluzione per chiudere ogni operazione, LONG o SHORT che sia, ogni venerdì alle ore 20:00:00 è il seguente (ovviamente non funziona con candele che non chiudano alle ore 20, come quelle Giornaliere, o magari 4 ore o 2 ore, perché ProOrder esegue il codice alla chiusura di ogni candela e prima che apra la nuova):

    IF OpenDayOfWeek = 5 AND time = 200000 AND OnMarket THEN
       SELL      AT MARKET  //chiudere i   LONG,  se aperti
       EXITSHORT AT MARKET  //chiudere gli SHORT, se aperti
    ENDIF

    Roberto

    #55836 quote
    ECLARARI
    Participant
    New

    GRAZIE 1000!!!

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

Interrompere L esecuzione il giorno desiderato


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
ECLARARI @eclarari Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/29/2017
Status: Active
Attachments: No files
Logo Logo
Loading...