orario di negozziazione

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #189919 quote
    emanuele81
    Participant
    Senior

    Buonasera, avrei bisogno di inserire un intervallo di orario per poter operare, le operazioni possono entrare a mercato dalle 00:30 alle 05:00 e poi dalle 07:00 alle 23:00, naturalmente le operazioni aperte prima delle 5 non devono essere chiuse alle 5 ma solo rispettando gli stop loss oppure take profit. come posso scrivere questo parte del codice?

    #189922 quote
    MauroPro
    Participant
    Veteran

    cTime = (time >= 003000 and time <= 050000) or (time >= 070000 and time <= 230000)

    #189923 quote
    emanuele81
    Participant
    Senior

    grazie mille Mauro

    #189925 quote
    MauroPro
    Participant
    Veteran

    Nel caso volessi chiudere le operazioni aperte in quegli orari non con SL\TP ma, ad esempio, alle ore 5 devi aggiungere al codice :

    if time = 050000 then

    sell at market

    exitShort at market

    endif

    #189926 quote
    robertogozzi
    Moderator
    Master

    Esatto.

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

orario di negozziazione


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by robertogozzi
3 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 03/13/2022
Status: Active
Attachments: No files
Logo Logo
Loading...