Condizione true, max 1 ordine al giorno

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

    Salve, vorrei testare un trading system con i parametri true accumulativi. Che codice devo inserire se voglio max una operazione al giorno cumulativa? Non voglio aprirne 2… 3.. nello stesso giorno. Che codice inserire?

    #213305 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Quindi tu vuoi potere accumulare posizioni sulla stessa operazione aperta, però se si chiude velocemente, per quel giorno non vuoi aprirne più.

    Questo è quello che ho capito ed il codice è questo:

    DEFPARAM CumulateOrders = true
    OTD = Barindex - TradeIndex(1) > IntradayBarIndex      // limits the (opening) trades till  1 per day
    //                                                        (OTD One Trade per Day)
    // condizione per Aprire la prima posizione (quando non è ancora a mercato)
    IF MieCondizioniIniziali AND Not OnMarket AND OTD THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    //
    // condizione per accumulare posizioni su un'operazione in corso
    IF MieCondizioniAccumulo AND LongOnMarket THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF

    dovrai mettere le tue condizioni, sia per la prima entrata che per gli eventuali successivi accumuli, come pure SL e TP, e quant’altro.

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

Condizione true, max 1 ordine al giorno


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/07/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...