Dire al sistema che se entro le 20:00 non esegue l’ordine annulla l’operazione

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #157725 quote
    domenicoprorealcodedomenicoprorealcode
    Participant
    Junior

    Buona sera, gentilmente vorrei sapere il codice che dovrebbe dire al sistema che se entro le 20:00 non è stato eseguito l’ordine  l’operazione sara’ annullata.

    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    // Il sistema cancellerà tutti gli ordini in attesa e chiuderà tutte le posizioni a 0:00. Dopo l’orario “Flat Before” non saranno piazzati nuovi ordini o posizioni.
    DEFPARAM FLATBEFORE = 010000
    // Cancellare tutti gli ordini in attesa e chiudere tutte le posizioni all’orario “Flat After”
    DEFPARAM FLATAFTER = 235500
    Otd = (Barindex – TradeIndex(1) > IntradayBarIndex)
    // giorni tradabili specifici della settimana DAL LUNEDI AL VENERDI
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    indicator1 = SuperTrend[4,10]
    c1 = (close[1] CROSSES OVER indicator1)
    indicator2 = ExponentialAverage[21](close)
    c2 = (close[1] > indicator2)
    c3 = (high[1] > open [2])
    
    IF c1 AND c2 AND c3 AND not daysForbiddenEntry AND Otd THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    // Stop e target
    SET STOP pLOSS 350
    SET TARGET pPROFIT 500

    Grazie mille a chi vorra’ aiutarmi

    #157731 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Per favore usa sempre il pulsante “Insert PRT code” quando inserisci il codice nei tuoi post per facilitare la lettura degli altri.

    Grazie 🙂

    #157732 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Basta che alla riga 16 aggiungi la condizione:

    AND Time < 200000
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

Dire al sistema che se entro le 20:00 non esegue l’ordine annulla l’operazione


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 01/13/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...