strategia chiusura settimanale

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

    Buonasera, è possibile far tradare una strategia dal lunedi alle 1 di notte e farla chiudere il venerdi alle 23, poi deve continuare a funzionare per tutta la settimana.

    Grazie a chi mi sa dare una risposta

    #185049 quote
    robertogozzi
    Moderator
    Master

    Su quale TF la vuoi usare?

    #185056 quote
    emanuele81
    Participant
    Senior

    Sul 2 minuti

    #185215 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    MieCondizioniLong = close > close[100]
    IF Time = 010000 AND DayOfWeek = 1 AND Not OnMarket THEN
       IF MieCondizioniLong THEN
          BUY 1 Contract at Market
       ENDIF
    ENDIF
    IF Time = 215000 AND DayOfWeek = 5 AND LongOnMarket THEN
       SELL at Market
    ENDIF

    per l’uscita ho messo 21:50 perché mettendo le 23 non esce in quanto il mercato chiude in quel momento (per certi strumenti, quali il DAX, la chiusura è alle 22).

    La condizione che ho messo io è a puro titolo di esempio.

    #185224 quote
    emanuele81
    Participant
    Senior

    Grazie mille Roberto

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

strategia chiusura settimanale


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by emanuele81
4 years, 1 month ago.

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