AutoTrading; come interrompere il programma

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231688 quote
    Fabbri Fausto
    Participant
    New

    La necessità è questa:

    se durante la giornata raggiungo l’obiettivo totale di guadagno o di stopLoss previsto, vorrei che il programma automatico si interrompesse per quella giornata.

    Non so come fare da programmazione.

    Grazie

    #231690 quote
    robertogozzi
    Moderator
    Master

    Eccolo (riprende il giorno successivo):

    ONCE Trading = 1
    ONCE SL      = 100    //Stop Loss   = 100 punti
    ONCE TP      = 100    //Take Profit = 100 punti
    ONCE Periodi = 10     //10 periodi per la media
    IF IntraDayBarIndex = 0 THEN
       Trading = 1
    ENDIF
    IF StrategyProfit <> StrategyProfit[1] THEN
       Trading = 0
    ENDIF
    MieCondizioniLong  = close CROSSES OVER  Average[Periodi,0](close)
    MieCondizioniShort = close CROSSES UNDER Average[Periodi,0](close)
    IF MieCondizioniLong and Not OnMarket AND Trading THEN
       BUY 1 CONTRACT AT MARKET
    ELSIF MieCondizioniShort and Not OnMarket AND Trading THEN
       SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    SET TARGET pPROFIT TP
    SET STOP   pLOSS   SL
    #231692 quote
    Fabbri Fausto
    Participant
    New

    Grazie Roberto, per la competenza e la tempestività.

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

AutoTrading; come interrompere il programma


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Fabbri Fausto
1 year, 9 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/19/2024
Status: Active
Attachments: No files
Logo Logo
Loading...