Interrompere L esecuzione il giorno desiderato

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #50838 quote
    ECLARARIECLARARI
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    ECLARARIECLARARI
    Participant
    New

    GRAZIE 1000!!!

Viewing 3 posts - 1 through 3 (of 3 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

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 ECLARARIECLARARI
8 years, 9 months ago.

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