Brauche Hilfe bei Fehlermeldung!

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

    Hi, ich hab diesen Code im Italienischen forum gefunden, leider ist mein italienisch so schlecht, dass ich da nicht nachfragen kann. Jedenfalls bekomme ich bei dem beigefügten Code immer diese Fehlermeldung. Ich weiß dass @robertogozzi sich mit diesem code beschäftigt hat. Ich wäre für Hilfe sehr dankbar!

    Das ist die Fehlermeldung: Dieses Handelssystem wurde angehalten, da es versuchte, eine Stop- oder Limit-Order zu einem negativen Preislevel zu platzieren. Bitte fügen Sie Ihrem Code Sicherheitsinstruktionen hinzu, um Orderaufträge zu einem negativen Preislevel zu vermeiden.

    //-------------------------------------------------------------------------
    // Hauptcode : supertrend dax m2 lt 1/10 sl0
    //-------------------------------------------------------------------------
    DEFPARAM CumulateOrders = false
    DEFPARAM PreLoadBars    = 2000
    
    
    tradeok=0
    t1 = time < 173000
    t2 = time > 090000
    if t1 and t2 then
    tradeok=1
    endif
     
    ONCE nLots              = 1                   //Numero di lotti da acquistare/vendere
    ONCE Minimo             = 0                   //Minimo  della candela dove è avvenuto l'incrocio
    ONCE Massimo            = 999999              //Massimo della candela dove è avvenuto l'incrocio
    ONCE MaxPips            = 0                   //Numero di Pips oltre Minimo/Massimo per entrare in rottura
    ONCE ExitPips           = 10                  //Numero di Pips oltre Minimo/Massimo per uscire dalle posizioni
    //
    
    
    IF IntraDayBarIndex = 0 THEN                 //Ad inizio nuovo giorno resettare le variabili
    Minimo               = 0
    Massimo              = 999999
    ENDIF
     
    St                      = SuperTrend[1,10]    //1, 10
     
    IF close CROSSES OVER St THEN
    Minimo               = 0
    Massimo              = high
    ENDIF
     
    IF close CROSSES UNDER St THEN
    Minimo               = low
    Massimo              = 999999
    ENDIF
     
    IF tradeok=1 and LongOnMarket THEN                         //Chiudere l'operazione LONG se il prezzo rompe il minimo
    SELL                      AT (Minimo - (ExitPips * pipsize)) STOP   //Uscire    LONG
    SELLSHORT nLots CONTRACTS AT (Minimo - (ExitPips * pipsize)) STOP   //Rientrare SHORT
    ENDIF
     
    IF tradeok=1 and ShortOnMarket THEN                        //Chiudere l'operazione SHORT se il prezzo rompe il massimo
    EXITSHORT                 AT (Massimo + (ExitPips * pipsize)) STOP  //Uscire SHORT
    BUY nLots CONTRACTS       AT (Massimo + (ExitPips * pipsize)) STOP  //Rientrare LONG
    ENDIF
     
    IF NOT OnMarket THEN
    IF tradeok=1 and Massimo < 999999 THEN
    BUY        nLots CONTRACTS AT Massimo + (MaxPips * pipsize) STOP //Comprate n Pips oltre il Massimo
    ENDIF
    IF tradeok=1 and Minimo > 0 THEN
    SELLSHORT  nLots CONTRACTS AT Minimo  - (MaxPips * pipsize) STOP //Vendere  n Pips sotto il Minimo
    ENDIF
    ENDIF
    
    set stop ploss 90
    #63106 quote
    Nicolas
    Keymaster
    Master

    Ich kenne die Strategie und ihre Funktionsweise nicht, aber Sie können diesen Fehler verhindern, indem Sie stattdessen die Zeile 40 mit diesem Code ändern:

    IF tradeok=1 and LongOnMarket and Minimo>0 THEN
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Brauche Hilfe bei Fehlermeldung!


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 02/12/2018
Status: Active
Attachments: No files
Logo Logo
Loading...