strategia a ingressi scaglionati

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #180824 quote
    emanuele81emanuele81
    Participant
    Senior

    Buonasera vorrei creare una strategia ad ingressi scaglionati, praticamente la strategia long dovrebbe entrare alle 7 ed essere attiva fino alle 22 mentre per lo short l’ingresso dovrebbe

    essere alle 7 e l’uscita alle 18, come lo posso inserire sulla stassa strategia.

    grazie

    #180835 quote
    MauroProMauroPro
    Participant
    Veteran

    Se vuoi aggiungere per l’operatività long e short questi intervalli temporali  basta che crei la condizione.

    Esempio:

    startTimeLong = 70000

    endTimeLong = 220000

    startTimeShort = 70000

    endTimeShort = 180000

    cTimeLong = time >= startTimeLong and time <= endTimeLong   // da aggiungere alle condizioni long

    cTimeShort = time >= startTimeShort and time <= endTimeShort // da aggiungere alle condizioni short

    Se vuoi uscire temporalmente in certi orari precisi (magari diversi da quelli sopra indicati) aggiungi :

    exitLongTime = xxx

    exitShortTime = yyy

    if time = exitLongTime then

    sell at market

    endif

    if time = exitShortTime then

    exitShort at market

    endif

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

strategia a ingressi scaglionati


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by MauroProMauroPro
4 years, 11 months ago.

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