Break even Tradeprice

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #80279 quote
    rmhandel
    Participant
    Junior

    hallo kann mir jemand sagen wie man hier wieder mit breakeven oder eben tradeprice rauskommt mit 0 Verlust

    //-------------------------------------------------------------------------
    // Hauptcode : donchian 20 kauf und exit
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Hauptcode : mein donchian 20 perioden
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
    
    upperDonchian = highest[20](high)
    
    lowerDonchian = lowest[20](low)
    
    clong = upperDonchian > upperDonchian[1]
    
    If clong then
    buy 1 contract at market
    endif
    
    sell at lowerDonchian stop
    #80282 quote
    Nicolas
    Keymaster
    Master

    Das Thema wurde in das richtige Forum verschoben (für den automatischen Handel = ProOrder-Unterstützung), und bitte verwenden Sie den “PRT-Code einfügen”, wenn Sie Code eingeben, um ein besseres Verständnis zu erhalten! Danke vielmals.

    Die Breakeven-Funktion, die sich leicht an Ihre Strategie anpassen lässt, finden Sie hier: Breakeven code for your automated trading strategy

    Lassen Sie uns wissen, wenn Sie Schwierigkeiten haben, es in Ihren Code zu integrieren.

    #80355 quote
    rmhandel
    Participant
    Junior

    vielen Dank

    #80775 quote
    rmhandel
    Participant
    Junior

    Hallo nochmals, ich habe mir die Break even strategie jetzt angeschaut long funktioniert diese super aber ich schaffe es nicht dass diese Break even Strategie auch short funktioniert ich habe dazu auch englischsprachigen Support angefragt aber es klappt immer noch nicht wenn ich auch Buchstabe für Buchstabe alles aus der Empfehlung abschreibe. Der Break Even Stop bzw. die eingehaltenen Pips wollen einfach nicht erscheinen

    vielen Dank

    #80776 quote
    rmhandel
    Participant
    Junior
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    //-------------------------------------------------------------------------
    // Hauptcode : SAR Kauf TOP mit BREAKEVEN 5mi
    //-------------------------------------------------------------------------
    // Festlegen der Code-Parameter
    DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
     
    // Bedingungen zum Einstieg in Long-Positionen
    indicator1 = SAR[0.02,0.02,0.2]
    c1 = (indicator1 CROSSES over close)
     
    startBreakeven = 1 //how much pips/points in gain to activate the breakeven function?
    PointsToKeep = 5 //how much pips/points to keep in profit above of below our entry price when the breakeven is activated (beware of spread)
     
     
     
     
    //SET STOP PLOSS 10 //first stoploss
     
     
    //reset the breakevenLevel when no trade are on market
    IF NOT ONMARKET THEN
    breakevenLevel=0
    ENDIF
     
    // --- BUY SIDE ---
    //test if the price have moved favourably of "startBreakeven" points already
    IF SHORTONMARKET AND close-tradeprice(1)>=startBreakeven*pipsize THEN
    //calculate the breakevenLevel
    breakevenLevel = tradeprice(1)+PointsToKeep*pipsize
    ENDIF
     
    //place the new stop orders on market at breakevenLevel
    IF breakevenLevel>0 THEN
    SELL AT breakevenLevel STOP
    ENDIF
     
     
     
     
    IF c1 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
     
    // Bedingungen zum Ausstieg von Long-Positionen
    indicator2 = RSI[14](close)
    c2 = (indicator2 CROSSES over 30)
    indicator3 = RSI[14](close)
    c3 = (indicator3[1] < indicator3)
     
    IF c2 AND c3 THEN
    exitshort at market
    endif
    #80783 quote
    robertogozzi
    Moderator
    Master

    Bitte kopiere keine Beiträge. Wählen Sie die Sprache, die Sie bevorzugen, und verwenden Sie nur diese, andernfalls werden die Informationen fragmentiert und es ist schwieriger für jeden, sie zu finden.
    Danke.

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

Break even Tradeprice


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
rmhandel @rmhandel Participant
Summary

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

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