TurtleTrade DAX Daily timeframe

TurtleTrade DAX Daily timeframe

Here is a turtletrader code I have been playing around with. It not perfect as there are huge drawbacks, but it has even larger profits. It also need a decent amount of capital to begin with- a lot of patience and stomach ice.
There are many 0-bar trades but only on the stoploss. Profit bars is 5 so I think the trades are valid and not subjected to the zerobar trade issue so many have written about here.
It makes a trade on 2nd day breakout and adds a trade every day with a minimum SL- many get stopped out but some get going.
I also added some extra trades if there was a trend. I hope you like it. I didn’t clean up the code, so you would see some of the alternative things I have been optimizing.
Comments and improvement are as always welcome.

Cheers Kasper

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Elsborgtrading • 323 days ago #

    Just a small correction. The profit is not taken after 5 bars/days, but 20.8. One way of optimizing further and (perhaps) avoid the huge drawdown is to close partial postions along the way. unfortunate it’s not possible in PRT v. 10.2. anyone know if it will be possible in ver 10.3?

  2. Frank • 323 days ago #

    Hi Elsborgtrading,

    It’s interesting and I will do some backtest when I have time. Have you tried the strategy on different timeframes, or just daily?

  3. Elsborgtrading • 322 days ago #

    Hi Frank. The initial strategy originated from a 4Week turtletrade breakout with a 1-2 weeks running before taking a profit. That is still profitable, but no way near the gain as for the daily TF. I think I tested it on a several day TF and also 4H timeframe, however there must have been something that showed up that let me not to pursue other timeframes- also the optimization takes a long time, however that not said that it could be profitable on other TF. Let me know what you find out 🙂

    note: Before anyone go and invest any real money in this, I think we need to let it run in papertrading demo first, also I don’t think this would be the first automated strategy I would recommend, as it would take a decent amount of capital to begin with. At least 20000 Euros.

     

  4. Elsborgtrading • 316 days ago #

    Further documentation would involve a Monte Carlo simulation so we could see if we were on the right track. I can find 2 MC sim. tool in this site. I have used them both, they seem to complement each other and produce the same results. First one is based on MS Excel, the other is from tickerquest and completely free. They can both be found here http://www.prorealcode.com/topic/monte-carlo-analysis/#post-12935 Basically what it shows is based on the 1000-3000 runs with all 25 years of exported trades, (aprox. 10200 trades) there should be 0% of a blown account or margin call with 2000 $ to begin the automated system. All simulated and exported trades are done with 1 position and no position sizing as the initial strategy shows. I cannot upload macro enabled or any other “suspicious” files here, so the Excel and sim files must be left out, however I will show the screenshot of the relevant data.

    Cheers Kasper

  5. Elsborgtrading • 230 days ago #

    Hello fellow traders. Just to give a status on Demotrade walk forward from 12-09-2016 – 06-12-2016. (Unfortunately ProOrder stopped a while ago and I lost data so I only 3 month of walk forward demo trades)

    result

    Gain:765 Euro

    Running P/L +1120 Euro

    • Nicolas • 229 days ago #

      I think you are talking about “forward test” (real live trading of your backtested strategy) and not “walk forward” which is an optimisation concept 🙂 Nevermind.

  6. Elsborgtrading • 230 days ago #

    Running P/L screen dump

  7. Elsborgtrading • 221 days ago #

    Hi Nicolas, and thanks for updating the file.

    When I backtest the code now I get a completely different equity curve- nothing change with the code. Was there any change to PRT?

    Also on the live demo, it closes trades partially- thought it could not be done in Proorder?

  8. Elsborgtrading • 221 days ago #

    Hi Nicolas. I made a mistake. a FTSE chart had sneaked under the DAX and when backtesting I accidently picked the wrong one. That why I got the wrong results. But Still I can see partically closing of positions. I am just in doubt- when trades are accumulated and “set stop Loss x” is reached- it looks like it’s different for each accumulated order entry?

    • Nicolas • 220 days ago #

      “set stop loss” are individual for each order with IG.

  9. Francesco78 • 123 days ago #

    thank you Elsborgtrading

    if the strategy were implemented in 2016 it would have defaulted, I guess its because this strategy is killed if implemented during long periods of range trading.

    is that right?

    Many thanks

     

    Francesco 

    • Elsborgtrading • 123 days ago #

      Hi Francesco, I didn’t test the back test for only 2016, but I guess you are right. However I traded the strategy in demo, and it was just to good to be true. I think around 100% in 6 month. Then I realized that IG demo account allowed the SL=7 at 1 am and the Live account was 10 point. This kills the strategy!

      So I been puzzling around this and came up with a new version of code for the turtletrade strategy. Here it is. It is semi automatic. You need start the one name “1st TTradev6.1 Single DAX 1m” code- this need run every day. copy it and name the next 2nd, 3rd and so on. If “1st TTradev6.1 Single DAX 1m” is in marked the next day at 22:00 then start 2nd, and so on. If the previous code, for example 2nd is with loss, stop 3rd, so only codes with profit are running+ one more- in this example 2nd. I do this because I cannot have the best of both worlds when SL is 10 at night. So these codes need to be run at 1 min TF and no accomulating orders. you accomulate by starting the next (2nd) code up. I hope this make sense. Ohh.. and I also tested every single seasonal around the year and implemented that as well. If you want to backtest to 1998, I will provide the “turtletrade-long v3.0 DAX 1D.itf”- file for backtesting purposes. Run this on a 1 day TF. The “1st TTradev6.1 Single DAX 1m.itf” for the strategy I just explained. The v3.0 and V6.1 does not have any indicators that is why it can be comparable. I have also made an indicator that shows when the strategy is hitting an entry that stays in the marked longer than a day.

      Cheers Kasper

       

      //-------------------------------------------------------------------------
      // Main code : 1st TTradev6.1 Single DAX 1m
      //-------------------------------------------------------------------------
      //-------------------------------------------------------------------------
      // Semi manuel- Proorder needs to be re activated if still running the next day
      // all accumolated orders should be stopped manuel after the count of days- or exit of the first Proorder where count of days is automatic
      // With saisonal multipliers
      //-------------------------------------------------------------------------
      //==================DAX Daily Timeframe==========================
      // Definition of code parameters
      DEFPARAM CumulateOrders = false // Cumulating positions
      DEFPARAM PRELOADBARS = 100
      //once x2=0
      ONCE tradetime=0
      ONCE Trutletradedayzerolive=0
      //ONCE Trutletradedayonelive=0
      
      
      
      
      
      //==========================tradeingtime=========================
      IF (Time >= 010000 AND Time <= 010100) or (Time >= 230000 AND Time <= 230100) and dayofweek=0  THEN //
      Tradetime=1
      else
      Tradetime=0
      endif
      //===============================================================
      
      
      //REM Money Management
      Reinvest=1
      if reinvest then
      Capital = 2000
      Risk = 0.2//0.1//in % pr position
      StopLoss = 10//7//10 // Could be our variable X
      stoploss2=7
      REM Calculate contracts
      equity = Capital + StrategyProfit
      maxrisk = round(equity*(Risk/100))
      MAXpositionsize=5000
      MINpositionsize=1
      Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(round((maxrisk/StopLoss)/PointValue)*pipsize)))
      else
      Capital = 2000
      Positionsize=1
      StopLoss = 10
      stoploss2=7
      equity = Capital + StrategyProfit
      Endif
      //oneminutes=1440
      //sec=1440*60
      //tensec=1440*6
      //twentysec=1440*3
      oneday=1
      dayzero=0
      //dayone=oneminutes
      //daytwo=oneminutes*2
      //daytree=oneminutes*3
      //dayfour=oneminutes*4
      //dayfive=oneminutes*5
      //daysix=oneminutes*6
      //dayseven=oneminutes*7
      //dayeight=oneminutes*8
      //daynine=oneminutes*9
      //dayten=oneminutes*10
      //dayeleven=oneminutes*11
      //daytwelve=oneminutes*12
      //daythirteen=oneminutes*13
      //dayfourteen=oneminutes*14
      //dayfifthteen=oneminutes*15
      //daytsixthteen=oneminutes*16
      //dayseventeen=oneminutes*17
      //dayeightteen=oneminutes*18
      //daynineteen=oneminutes*19
      //daytwenty=oneminutes*20
      //daytwentyone=oneminutes*21
      //daytwentytwo=oneminutes*22
      //daytwentytree=oneminutes*23
      //daytwentyfour=oneminutes*24
      //daytwentyfive=oneminutes*25
      //daytwentysix=oneminutes*26
      //daytwentyseven=oneminutes*27
      //daytwentyeight=oneminutes*28
      //daytwentynine=oneminutes*29
      //daythirty=oneminutes*30
      //daythirtyone=oneminutes*31
      
      factor=oneday//oneminutes// minutes a day* sec a minute
      // define saisonal position multiplier for each month 1-15 / 16-31 (>0 - long / <0 - short / 0 no trade)
      ONCE January1 = 2//f4
      ONCE January2 = 2//f4
      ONCE February1 = 0//f4
      ONCE February2 = 2//f4
      ONCE March1 = 2//f4
      ONCE March2 = 3//f4
      ONCE April1 = 3//f4
      ONCE April2 = 2//f4
      ONCE May1 = 0//f4//..//dont trade
      ONCE May2 = 3//f4
      ONCE June1 = 0//f4//don't trade//dont trade
      ONCE June2 = 0//f4//..//dont trade
      ONCE July1 = 3//f4
      ONCE July2 = 0//f4//don't trade
      ONCE August1 = 1//f4//don't trade//don't trade
      ONCE August2 = 0//f4//don't trade//dont trade
      ONCE September1 =  0//f4//don't trade//??
      ONCE September2 = 0//f4//..//dont trade
      ONCE October1 = 3//f4
      ONCE October2 = 2//f4
      ONCE November1 = 2//f4
      ONCE November2 = 3//f4
      ONCE December1 = 2//f4
      ONCE December2 = 3//0//f4
      // set saisonal multiplier
      currentDayOfTheMonth = Date - ((CurrentYear * 10000) + CurrentMonth * 100)
      midOfMonth = 15
      IF CurrentMonth = 1 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = January1
      x2=29*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = January2
      x2=29*factor
      ENDIF
      ELSIF CurrentMonth = 2 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = February1
      x2=21*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = February2
      x2=23*factor
      ENDIF
      ELSIF CurrentMonth = 3 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = March1
      x2=30*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = March2
      x2=21*factor
      ENDIF
      ELSIF CurrentMonth = 4 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = April1
      x2=30*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = April2
      x2=30*factor
      ENDIF
      ELSIF CurrentMonth = 5 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = May1
      x2=26*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = May2
      x2=14*factor
      ENDIF
      ELSIF CurrentMonth = 6 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = June1
      x2=30*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = June2
      x2=25*factor
      ENDIF
      ELSIF CurrentMonth = 7 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = July1
      x2=27*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = July2
      x2=10*factor
      ENDIF
      ELSIF CurrentMonth = 8 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = August1
      x2=23*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = August2
      x2=28*factor
      ENDIF
      ELSIF CurrentMonth = 9 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = September1
      x2=15*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = September2
      x2=23*factor
      ENDIF
      ELSIF CurrentMonth = 10 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = October1
      x2=30*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = October2
      x2=21*factor//f2//29//21
      ENDIF
      ELSIF CurrentMonth = 11 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = November1
      x2=30*factor
      ENDIF
      IF not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = November2
      x2=25*factor
      ENDIF
      ELSIF CurrentMonth = 12 THEN
      IF not onmarket and currentDayOfTheMonth <= midOfMonth THEN
      saisonalPatternMultiplier = December1
      x2=24*factor
      ENDIF
      if not onmarket and currentDayOfTheMonth > midOfMonth THEN
      saisonalPatternMultiplier = December2
      x2=11*factor
      ENDIF
      ENDIF
      
      
      
      //=========================enter turtletrade day one====================================
      if BARINDEX-TRADEINDEX(1)>=dayzero or Trutletradedayzerolive then
      if not onmarket and Tradetime then
      BUY Positionsize * saisonalPatternMultiplier CONTRACTS AT MARKET
      ENDIF
      
      if onmarket then
      Trutletradedayzerolive=1
      else
      Trutletradedayzerolive=0
      endif
      
      
      
      //===========================STOPLOSS CODE===================
      
      //Initial stoploss set
      once slmove1=0
      once slmove2=0
      once sellprice=0
      if not slmove1 then
      set stop loss StopLoss
      slmove1=1
      endif
      
      //************move stoploss if gain+3
      
      if slmove1 and longonmarket and close-tradeprice>=(pipsize*pointvalue*3) then
      sellprice=tradeprice-(stoploss2*pipsize*pointvalue)
      SELL AT sellprice STOP
      slmove2=1
      endif
      
      if slmove2 then
      SELL AT sellprice STOP
      endif
      //*************try and SL at -7
      if longonmarket and close-tradeprice<=-(pipsize*pointvalue*stoploss2) then
      sell AT MARKET
      endif
      
      if not onmarket then
      slmove1=0
      slmove2=0
      sellprice=0
      endif
      endif
      //======================================================================================
      
      //=========================enter turtletrade day two====================================
      //
      //if (BARINDEX-TRADEINDEX(1)>=dayone and BARINDEX-TRADEINDEX(1)<daytwo) or Trutletradedayonelive then
      //if onmarket and Tradetime then
      //BUY Positionsize * saisonalPatternMultiplier CONTRACTS AT MARKET
      //ENDIF
      //
      //if onmarket and +countofposition[1]<+countofposition then
      //Trutletradedayonelive=1
      //else
      //Trutletradedayonelive=0
      //endif
      //
      ////===========================STOPLOSS CODE===================
      //
      ////Initial stoploss set
      //once slmovedaytwo1=0
      //once slmovedaytwo2=0
      //once sellpricedaytwo=0
      //if not slmovedaytwo1 then
      //set stop loss StopLoss
      //slmovedaytwo1=1
      //endif
      //
      ////************move stoploss if gain+3
      //
      //if slmovedaytwo1 and longonmarket and close-tradeprice>=(pipsize*pointvalue*3) then
      //sellpricedaytwo=tradeprice-(stoploss2*pipsize*pointvalue)
      //SELL AT sellpricedaytwo STOP
      //slmovedaytwo2=1
      //endif
      //
      //if slmovedaytwo2 then
      //SELL AT sellpricedaytwo STOP
      //endif
      ////*************try and SL at -7
      ////if longonmarket and close-tradeprice<=-(pipsize*pointvalue*stoploss2) then
      ////sell AT MARKET
      ////endif
      //
      //if not onmarket then
      //slmovedaytwo1=0
      //slmovedaytwo2=0
      //sellpricedaytwo=0
      //endif
      //endif
      
      
      
      
      
      
      
      
      //=======================================================================================
      
      //=================================counting days in market on a 1 min TF=====
      once CountDays=0
      
      if onmarket and (CurrentHour crosses over 01) then//
      CountDays=CountDays+1
      elsif not onmarket then
      CountDays=0
      endif
      //x2=x2
      //===================EXIT ALL POSITIONS=====
      
      //if x2>=x2 then
      if CountDays>=x2 then
      sell at market
      endif
      
      //=========================================
      
      //============1st build in Quit code======
      //if not onmarket and equity[1] < equity then
      //quit
      //endif
      //======================================
      
      //maxriskbuy=abs((+countoFPOSITION*stoploss*pipsize*pointvalue/equity)*100)
      
      //graph (((tradeprice-(tradeprice-(tradeprice*(StopLoss/100))))*+countoFPOSITION*pipsize*pointvalue)/(equity))*100 COLOURED(0,0,0) AS "MAXRISK"//blue
      //graph (positionsize/equity)*100 COLOURED(0,255,0) AS "RISK"//GREEN
      //graph (+countofposition*StopLoss/equity)*100 COLOURED(0,0,0) AS "MAXRISK"//Aqua
      //graph abs((+countoFPOSITION*StopLoss*pipsize*pointvalue/equity)*100) COLOURED(255,20,147) AS "MAXRISK%"
      //GRAPH tradeprice COLOURED(50,50,75) AS "monthlyHigh"
      //GRAPH pris COLOURED(50,0,75) AS "pris"
      //GRAPH c1 COLOURED(50,0,75) AS "c1"
      
      //===============Graphs RR, Winnings, Max recorded risk, Max risk%
      //ONCE maxriskrecorded=0
      //If onmarket then
      //maxriskrecorded=ABS((+countoFPOSITION*stoploss*pipsize*pointvalue/equity)*100)
      //if maxriskrecorded<maxriskrecorded[1]then
      //maxriskrecorded=maxriskrecorded[1]
      //else
      //maxriskrecorded=maxriskrecorded
      //endif
      //endif
      //if not onmarket then
      //winnings=StrategyProfit-StrategyProfit[1]
      //else
      //winnings=0
      //endif
      //riskprtrade=abs(+countoFPOSITION*stoploss*pipsize)
      //RR=winnings/riskprtrade[1]
      
      
      
      
      
      //graph abs((+countoFPOSITION*stoploss*pipsize*pointvalue/equity)*100) COLOURED(255,20,147) AS "MAXRISK%"
      //graph maxriskrecorded COLOURED(255,0,255) AS "MAXrisk%recorded"
      //graph RR COLOURED(0,0,255) AS "RR"
      //graph winnings COLOURED(0,0,0) AS "Winnings"
      
      //graph winnings COLOURED(0,0,0) AS "Winnings"
      //graph winnings COLOURED(0,0,0) AS "Winnings"
      //graph slmove1 COLOURED(0,0,0) AS "slmove"
      //graph slmove2 COLOURED(0,0,0) AS "slmove2"
      //graph BARINDEX-TRADEINDEX(1)COLOURED(0,0,0) AS "+countofdays"
      //graph x2 COLOURED(0,0,0) AS "x2"
      //graph countdays COLOURED(0,0,0) AS "countdays"
      

       

  10. Elsborgtrading • 123 days ago #

    I cannot provide more files to the post so the backtesting 1D tf code is

    //-------------------------------------------------------------------------
    // Main code : turtletrade-long v3.0 1D
    // With saisonal multipliers- and for backtesting and optimizing saisonal 
    /7 Spread = 2 SL 7
    //-------------------------------------------------------------------------
    //==================DAX Daily Timeframe==========================
    // Definition of code parameters
    DEFPARAM CumulateOrders = true // Cumulating positions
    DEFPARAM PRELOADBARS = 100
    tradeingweek = OpenDayOfWeek <=5 
    //REM Money Management
    Reinvest=1
    if reinvest then
    Capital = 20000
    Risk = 0.23//0.1//in % pr position
    StopLoss = 7//7//10 // Could be our variable X
    REM Calculate contracts
    equity = Capital + StrategyProfit
    maxrisk = round(equity*(Risk/100))
    MAXpositionsize=5000
    MINpositionsize=1
    Positionsize= MAX(MINpositionsize,MIN(MAXpositionsize,abs(round((maxrisk/StopLoss)/PointValue)*pipsize)))
    else
    Positionsize=1
    StopLoss = 7
    Endif
    
    // define saisonal position multiplier for each month 1-15 / 16-31 (>0 - long / <0 - short / 0 no trade)
    ONCE January1 = 2//f4
    ONCE January2 = 2//f4
    ONCE February1 = 0//f4
    ONCE February2 = 2//f4
    ONCE March1 = 2//f4
    ONCE March2 = 3//f4
    ONCE April1 = 3//f4
    ONCE April2 = 2//f4
    ONCE May1 = 0//f4//dont trade
    ONCE May2 = 3//f4
    ONCE June1 = 0//f4//don't trade
    ONCE June2 = 0//f4//dont trade
    ONCE July1 = 3//f4
    ONCE July2 = 0//f4//don't trade
    ONCE August1 = 1//f4//don't trade
    ONCE August2 = 0//f4//don't trade
    ONCE September1 =  0//f4//don't trade
    ONCE September2 = 0//f4//dont trade
    ONCE October1 = 3//f4
    ONCE October2 = 2//f4
    ONCE November1 = 2//f4
    ONCE November2 = 3//f4
    ONCE December1 = 2//f4
    ONCE December2 = 3//f4
    
    // set saisonal multiplier
    currentDayOfTheMonth = Date - ((CurrentYear * 10000) + CurrentMonth * 100)
    midOfMonth = 15
    IF CurrentMonth = 1 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = January1
    x2=29//f2//27//29
    x5=5//f3//5//5
    ELSE
    saisonalPatternMultiplier = January2
    x2=29//f2//12//29
    x5=5//f3//6//5
    
    ENDIF
    ELSIF CurrentMonth = 2 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = February1
    x2=21//f2//23//21
    x5=7//f3//7//7
    ELSE
    saisonalPatternMultiplier = February2
    x2=23//f2//30//23
    x5=4//f3//2//4
    ENDIF
    ELSIF CurrentMonth = 3 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = March1
    x2=30//f2//28//30
    x5=1//f3//8//1
    ELSE
    saisonalPatternMultiplier = March2
    x2=21//f2//28//21
    x5=5//f3//6//5
    ENDIF
    ELSIF CurrentMonth = 4 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = April1
    x2=30//f2//22//30
    x5=5//f3//4//5
    ELSE
    saisonalPatternMultiplier = April2
    x2=30//f2//11//30
    x5=5//f3//2//5
    ENDIF
    ELSIF CurrentMonth = 5 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = May1
    x2=26//f2//23//26(dont trade)
    x5=2//f3//9//2(dont trade)
    ELSE
    saisonalPatternMultiplier = May2
    x2=14//f2//13//14
    x5=5//f3//2//5
    ENDIF
    ELSIF CurrentMonth = 6 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = June1
    x2=30//f2//26//don't trade//30-dont trade
    x5=10//f3//10//don't trade10-dont trade
    ELSE
    saisonalPatternMultiplier = June2
    x2=25//f2//30//25-dont trade
    x5=4//f3//2//4-dont trade
    ENDIF
    ELSIF CurrentMonth = 7 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = July1
    x2=27//f2//13//27
    x5=2//f3//6//2
    ELSE
    saisonalPatternMultiplier = July2
    x2=10//f2//don't trade//10-dont trade
    x5=5//f3//don't trade//5-dont trade
    ENDIF
    ELSIF CurrentMonth = 8 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = August1
    x2=23//f2//don't trade//23
    x5=4//f3//don't trade//4
    ELSE
    saisonalPatternMultiplier = August2
    x2=28//f2//don't trade//28-dont trade
    x5=8//f3//don't trade//8-dont trade
    ENDIF
    ELSIF CurrentMonth = 9 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = September1
    x2=15//f2//don't trade//15
    x5=2//f3//don't trade//2
    ELSE
    saisonalPatternMultiplier = September2
    x2=23//f2//29//23-??
    x5=5//f3//9//5-??
    ENDIF
    ELSIF CurrentMonth = 10 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = October1
    x2=30//f2//27//30
    x5=3//f3//2//3
    ELSE
    saisonalPatternMultiplier = October2
    x2=21//f2//29//21
    x5=5//f3//7//5
    ENDIF
    ELSIF CurrentMonth = 11 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = November1
    x2=30//f2//25//30
    x5=5//f3//4//5
    ELSE
    saisonalPatternMultiplier = November2
    x2=25//f2//26//25
    x5=3//f3//8//3
    ENDIF
    ELSIF CurrentMonth = 12 THEN
    IF currentDayOfTheMonth <= midOfMonth THEN
    saisonalPatternMultiplier = December1
    x2=24//f2//26//24
    x5=5//f3//9//5
    ELSE
    saisonalPatternMultiplier = December2
    x2=11//f2//..//11
    x5=5//f3//..//5
    ENDIF
    ENDIF
    //c1=high>(highest[x1](close))
    
    
    if not shortonmarket and tradeingweek then
    BUY Positionsize * saisonalPatternMultiplier CONTRACTS AT MARKET
    //pris=open[p]
    ENDIF
    //if open>pris+x5 then
    if open>tradeprice+x5 and tradeingweek then
    buy Positionsize *saisonalPatternMultiplier CONTRACTS AT MARKET
    endif
    
    if longonmarket then
    CountDays=CountDays+1
    //p=p+1
    else
    CountDays=0
    //p=0
    endif
    
    if CountDays>=x2 and tradeingweek then
    sell at market
    endif
    
    //maxriskbuy=abs((COUNTOFPOSITION*stoploss*pipsize*pointvalue/equity)*100)
    
    set stop loss StopLoss//your StopLoss code
    
    //graph (((tradeprice-(tradeprice-(tradeprice*(StopLoss/100))))*COUNTOFPOSITION*pipsize*pointvalue)/(equity))*100 COLOURED(0,0,0) AS "MAXRISK"//blue
    //graph (positionsize/equity)*100 COLOURED(0,255,0) AS "RISK"//GREEN
    //graph (countofposition*StopLoss/equity)*100 COLOURED(0,0,0) AS "MAXRISK"//Aqua
    //graph abs((COUNTOFPOSITION*StopLoss*pipsize*pointvalue/equity)*100) COLOURED(255,20,147) AS "MAXRISK%"
    //GRAPH tradeprice COLOURED(50,50,75) AS "monthlyHigh"
    //GRAPH pris COLOURED(50,0,75) AS "pris"
    //GRAPH c1 COLOURED(50,0,75) AS "c1"
    
    //===============Graphs RR, Winnings, Max recorded risk, Max risk%
    //ONCE maxriskrecorded=0
    //If onmarket then
    //maxriskrecorded=ABS((COUNTOFPOSITION*stoploss*pipsize*pointvalue/equity)*100)
    //if maxriskrecorded<maxriskrecorded[1]then
    //maxriskrecorded=maxriskrecorded[1]
    //else
    //maxriskrecorded=maxriskrecorded
    //endif
    //endif
    //if not onmarket then
    //winnings=StrategyProfit-StrategyProfit[1]
    //else
    //winnings=0
    //endif
    //riskprtrade=abs(COUNTOFPOSITION*stoploss*pipsize)
    //RR=winnings/riskprtrade[1]
    
    
    
    
    
    //graph abs((COUNTOFPOSITION*stoploss*pipsize*pointvalue/equity)*100) COLOURED(255,20,147) AS "MAXRISK%"
    //graph maxriskrecorded COLOURED(255,0,255) AS "MAXrisk%recorded"
    //graph RR COLOURED(0,0,255) AS "RR"
    //graph winnings COLOURED(0,0,0) AS "Winnings"
    

     

  11. Elsborgtrading • 123 days ago #

    The indicator code:

    atr = averagetruerange[10](close)*0.5
    //tradeingweek = OpenDayOfWeek <=5 // and opendayofweek>=1
    tradeingweek =  OpenDayOfWeek <=5
    x1=2
    c1=(highest[x1](close))
    if high>c1 and open<=low+7 and tradeingweek   then
    DRAWTEXT("Turtletrade DAX", barindex, high[1]+atr*3, Dialog, Standard, 12) COLOURED(0,0,0)
    DRAWARROWUP(barindex,high[1]-atr*3) COLOURED(0,0,0)
    endif
    Return
    

     

  12. Elsborgtrading • 123 days ago #

    Indicator code does not show up on sundays. This is a bug in PRT 10.3

  13. Francesco78 • 122 days ago #

    Thank you very much Kasper for your long and detailed answer

    I’ll have a look to it, it sounds very promising!

    Cheers

    Francesco 

  14. Elsborgtrading • 122 days ago #

    I think it is, but it takes guts and patience because the winning rate is low, but potential gain is very high. backtest for ver 3.0 therefore 6.1 is out of this world.

  15. Francesco78 • 122 days ago #

    Hi Kasper, 

    so let me see if I understand.

    at day 1 you run the  “1st TTradev6.1 Single DAX 1m"
    at day 2 you run BOTH 1st TTradev6.1 Single DAX 1m AND 2nd TTradev6.1 Single DAX 1m

    if at the end of the day the 2nd is at loss, then you stop it and you dont turn it on ever more, and the day after you start the 3rd.

    So in this framework the 3rd day you will have the 1st and the 3d and so on ..

    Am I right?

     

    Many thanks

    Francesco 

  16. Elsborgtrading • 122 days ago #

    No that is wrong 🙂 1st runs always- then only run 2nd if 1st is on market with positions(around 22 pm). Run 3rd if 1st and 2nd is on market with positions-… run (n-th) ver if (n-1-th) ver is on market with positions. If 2nd and 3rd closes all positions- then close 3rd. 1st should be still be on market- so 1st and 2nd is running. If 1st closed all positions. Close 2nd so only 1 st run. Goes for 1st to (n)th versions. Hope it makes sense. 🙂

  17. Elsborgtrading • 122 days ago #

    It can only be fully automated if

    • IG change minimum SLto 7 at night on DAX
    • multi timeframe support AND allowing partial close of positions 
  18. Elsborgtrading • 122 days ago #

    A small example. the strategy would have opened 3 position on Dec 4th 2016 and keept it for 24 days closing on 3rd jan 2017 , Also opened 3 pos on wed 9th dec- closing 3rd jan 2017- thats 3*1195 pips + 3*768 pips- costing 22*3*7 pips= more or less 5420 pips gain- of cause it might just be a lucky shoot 😉

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
CKW Thanks Pier! Excellent! I add the SL capped at 0.8% for safety purpose. The Backtest perfor...
JR1976 Dear Pier ,  your screenshot which rappresent the backtest , is since dec 2009 , but the eq...
CKW Dear Pier, Does it work on forex?
Wing The system trades 1 to 3 contracts, and 5 under extreme circumstances. If trading the DAX 1 ...
Stefanb Wing Can i find you on Twitter?
Toto le Heros Hi Wing, Your code looks quite interresting. I was wondering if you could develop a bit mo...
Francesco78 hello Prince Myshkin. Thank you for the time you spent on my code. Im currently travelling, ...
PrinceMyshkin Enjoy your travels!
Francesco78 Hi Prince Myshkin I was interested that you chose a 3 day (72hr) period for your ATR calc. ...
Nicolas Thanks for sharing your automated trading strategy idea. Even if you accumulate loosing orde...
Maz Ok. Potential here to build onto this. Have opened a forum thread for further discussion: h...
ALE
2 months ago
CSR strategy DAX 1 D
CSR strategy DAX 1 D
12
Strategies
ALE Hello GuysI'm trying to fix a problem that I missed during the probacktest, I update you as ...
Nicolas The code has been updated in the attachment of the post with the last version which contain ...
ALE Thanks as always Nicolas
juanj Also change the ATR multiplier to 2 instead of 3. Slightly better drawdown.
GraHal I started he thread below as I get the results shown on image below. Please help on the Foru...
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Francesco78 Hi Keemax, I dont have it on real at the moment, in any case the strategy is very long term ...
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Francesco78 Hi Juan Salas and thank you very much for your undeserved compliments. I'm not sure if I un...
Juan Salas Hi Francesco, Yes, this is pretty much the question. The system ask me a number of contract...
Francesco78 ok sounds good, you can put min size = 1 and go for the seasonable breakout too, also you ca...
bjoern You are absolutely right, thank for your comment. Already working on an optimization while u...
bjoern Added a range filter for entering positions. Performance seems to be much better, even with ...
Nicolas Thanks!
ALE :-) Wim Thank you!
GDKLockout Hi, Im new to this forum and automated trading, so please excuse the nooby question: If you...
ALE Hello because this trailing stop start next candles if condition is verified.  For more in...
Nicolas What are you calling a finished strategy? This one has been coded by a request on forums, si...
clanli Hi Nicolas Thanks for a fantistic piece of code. I tried the following with really good res...
rama where is Z variable in the program? i want to have look back period says 3 candles. I want...
otty82 You have an idea if you can modify this indicator so that you can use it for the Wall Street...
Elsborgtrading the indicator works on all instrument, question is if the strategy will work. You have to do...
otty82  all right. thanks
Derek Nice strategy. Have you tried adding a stop loss since there are a few sharp drawdowns? I ...
Piston_Broke Non so .... da qui la mia domanda iniziale :-)
Piston_Broke Hi Derek. I have tried many different ways to apply SL's to this and similar versions of th...
Nicolas Indeed, if you are not willing to loose, you will always win. Averaging down losers can carr...
David You're always safer going Long especially with averaging down on an index as the probability...
Oskar Bergvall  I noted Davids and Nicolas remarks. Could it be possible to make an indicator for contraria...
bluetime6 Hello Nicolas. Can i ask you for something? I backtested your strategy in Dax 4H Timeframe...
Francesco78 Thank you Nicolas,  I have copied your nice indicator, but it shows in the lower part of th...
Abz  hi , you need to add the indicator from the "price" menu in chart
Francesco Thank you Abz!
Lotar
5 months ago
Lotar Hi Plop61, thanks for your comment. To make the code for short positions is possible. But ...
JvdG Hi Lotar, your strategy raised my interest; I did some tests and made a few adjustments fit...
Nicolas You can send it to contact@prorealcode.com and I'll attach it here. Thanks for your sharing!
Reiner Hi Joy John, Navigator will allways sell at 9:00 at the first tdom and will accumulate a lo...
dajvop Thank you for an excellent system Reiner. Started it April 7 and it really showed what it ca...
rejo007 hello, Anybody have test it in real for few month? thanks a lot
SAM
5 months ago
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...

Top