Breakout gibt keine Einsitege

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #185879 quote
    axmichi
    Participant
    Senior
    DEFPARAM CumulateOrders = False
    DEFPARAM flatbefore = 090000
    DEFPARAM flatafter= 172900
     
    Positionsize=1        // KONSTANTE KONTRAKTANZAHL!!
    Spread=1          // Handelsspread     DAX 1 Punkt 9.00-17.30 bei IG
    Startzeit=090000
    Endzeit=120000
    //
    ////Martingal
    MainSize        = PositionSize
    
    ONCE MainSize   = PositionSize
    ONCE LossSize   = MainSize
    IF StrategyProfit < StrategyProfit[1] THEN
    LossSize     = LossSize + MainSize
    PositionSize = LossSize
    ELSIF StrategyProfit > StrategyProfit[1] THEN
    PositionSize = MainSize
    LossSize     = PositionSize
    //
    // Spanne 8-9 in Hi and Lo ermitteln
    // ------------------------
    once Bars=60         //  60 x 1 Minute
    once Hi=0
    once Lo=0
    If time = 090000 then           // Das ist das Ende der 8.59 Kerze. Also INCLUSIVE DIESER
    Hi=highest[Bars](high)
    Lo=lowest[Bars](low)
    endif
    Spannepoints=(Hi-Lo)/pointsize  // Spanne in Punkten
    //
     
    once Tradetag=0
    If onmarket then
    Tradetag=date
    endif
     
    If not onmarket and time>= Startzeit and time < Endzeit and Tradetag<>date  then
    BUY Positionsize Lot AT Hi+(Spread/2) Stop
    Sellshort Positionsize Lot AT Lo-(Spread/2) Stop
    SET stop ploss Spannepoints*1
    SET TARGET pPROFIT Spannepoints*1
    ENDIF
    Endif

    Hallo,

     

    dieser Code für einen breakout funktioniert gut, leider funktioniert er mit den Zeilen 13 – 20 im Code nicht mehr.

    Hier habe ich Regeln für den Martingal eingefügt. Bei Verlusttrade verdoppeln

    Kann mir jemand sagen warum der dann keine Entry mehr tätigt?

     

    Danke und Gruß

    #185892 quote
    robertogozzi
    Moderator
    Master

    Weil Sie den Code, den ich Ihnen für das Martingal geschrieben habe, schlecht kopiert haben.

    #186588 quote
    axmichi
    Participant
    Senior

    Hallo

     

    ich habe ihn original kopiert und beim BUY/SELL lediglich POSITIOSIZE verändert, war das falsch?

     

    Vielleicht ist die definierte Positionsize 1 oben im Code der Fehler?!

    Danke

    #186981 quote
    robertogozzi
    Moderator
    Master

    Alle Anfangszeilen in Bezug auf Kapital, Risiko und Berechnungen fehlen.

    #186997 quote
    axmichi
    Participant
    Senior

    tut mir leid, das ist zu schwer für mich, ich verstehe nicht wie das geht.

    #186999 quote
    robertogozzi
    Moderator
    Master

    Okay, ich werde es so bald wie möglich versuchen.

    #187007 quote
    axmichi
    Participant
    Senior

    vielen vielen Dank!!

    #187131 quote
    robertogozzi
    Moderator
    Master

    Fertig:

    DEFPARAM CumulateOrders = False
    DEFPARAM flatbefore     = 090000
    DEFPARAM flatafter      = 172900
    Spread    = 1          // Handelsspread     DAX 1 Punkt 9.00-17.30 bei IG
    Startzeit = 090000
    Endzeit   = 120000
    //
    // Martingala & PositionSize start
    ONCE Capital    = 10000  //10000€ initial Capital
    ONCE Investment = 5      //5%     max Investment for each trade
    ONCE MinLots    = 0.5    //0.5    min lot size (Dax)
    ONCE Margin     = 5      //5%     Margin required by the broker for each lot
    IF (StrategyProfit = 0) OR (Not OnMarket AND OnMarket[1]) THEN
    Invested        = Capital * Investment / 100 / PipValue
    CurrentMargin   = close * Margin / 100
    TempLots1       = Capital / CurrentMargin
    TempLots2       = round(((Invested / CurrentMargin) * 10) - 0.5) / 10  //round to 1 decimal digit
    PositionSize    = max(MinLots,TempLots2)  //never below the minimum lots
    MainSize        = PositionSize
    ENDIF
    ONCE MainSize   = PositionSize
    ONCE LossSize   = MainSize
    IF StrategyProfit < StrategyProfit[1] THEN
    LossSize     = LossSize + MainSize
    PositionSize = LossSize
    ELSIF StrategyProfit > StrategyProfit[1] THEN
    PositionSize = MainSize
    LossSize     = PositionSize
    ENDIF
    // Martingala & PositionSize end
    //
    // Spanne 8-9 in Hi and Lo ermitteln
    // ------------------------
    once Bars=60         //  60 x 1 Minute
    once Hi=0
    once Lo=0
    If time = 090000 then           // Das ist das Ende der 8.59 Kerze. Also INCLUSIVE DIESER
    Hi=highest[Bars](high)
    Lo=lowest[Bars](low)
    endif
    Spannepoints=(Hi-Lo)/pointsize  // Spanne in Punkten
    //
    once Tradetag=0
    If onmarket then
    Tradetag=date
    endif
    If not onmarket and time>= Startzeit and time < Endzeit and Tradetag<>date  then
    BUY Positionsize Lot AT Hi+(Spread/2) Stop
    Sellshort Positionsize Lot AT Lo-(Spread/2) Stop
    SET stop ploss Spannepoints*1
    SET TARGET pPROFIT Spannepoints*1
    ENDIF
    //
    //graph StrategyProfit < Strategyprofit[1]
    //graph LossSize
    //graph MainSize
    #187307 quote
    axmichi
    Participant
    Senior

    Hallo und vielen Dank dafür!!!!!!!

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

Breakout gibt keine Einsitege


ProBuilder Support

New Reply
Author
author-avatar
axmichi @axmichi Participant
Summary

This topic contains 8 replies,
has 2 voices, and was last updated by axmichi
4 years ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 01/18/2022
Status: Active
Attachments: 1 files
Logo Logo
Loading...