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.

//==================DAX Daily Timeframe==========================
// Definition of code parameters
DEFPARAM CumulateOrders = true // Cumulating positions deactivated
// calculate daily high/low
Capital = 20000
Risk = 0.005
StopLoss = 20// Could be our variable XREM Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)

if PositionSize>=1000 then

if PositionSize<=3 then

//ONCE p=0

if not shortonmarket and high>c1 then
//if open>pris+x5 then
if open>tradeprice+x5 then
buy Positionsize CONTRACTS AT MARKET

if longonmarket then

if CountDays>=x2 then
sell at market

set stop loss SL//your SL code
//graph (positionsize/equity)*100 COLOURED(0,255,0) AS "RISK"//GREEN
//graph (positionsize*SL/equity)*100 COLOURED(0,255,255) AS "MAXRISK"//Aqua
//GRAPH tradeprice COLOURED(50,50,75) AS "monthlyHigh"
//GRAPH pris COLOURED(50,0,75) AS "pris"
Cheers Kasper
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 • 176 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 • 176 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 • 176 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 • 169 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 • 83 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)


    Gain:765 Euro

    Running P/L +1120 Euro

    • Nicolas • 83 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 • 83 days ago #

    Running P/L screen dump

  7. Elsborgtrading • 74 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 • 74 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 • 74 days ago #

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

Register or


avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
iramirez55 thanks for all
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
Wing Yes, investigate as much as you want. For more insight, you can view the linet1, linet2 etc....
CKW Hi Wing, Thanks for your sharing. I am still trying to breakdown & understand your code...
Wing Hello CKW. No, the parameter, 7 in this case, is used when calling the RSI indicator to ide...
alemaliz Hello Raul vg the minimum stop on the Dax and mini 1 and not to 18 points how do you insert ...
Raul Vg Hi alemaliz, In the IG broker, the minimum trailing stop is 5 with the open market.  
Nicolas For everyone information, a discussion thread is ongoing here: https://www.prorealcode.com/t...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Nice Job ! Here is my version of the code :  KBO = 0 Tenkansen = (highest[9](high)+lowe...
triss1965@gmail.com The code dose not work   Syntax error: line 2, character 12One of the following chara...
triss1965@gmail.com why do I get error ond line whit DAX? Eihter cod works. Can you chare the file?
Elsborgtrading Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your e...
4 months ago
maxxb a ok quindi potrei anche non aver sbagliato nulla ... grazie ..  
sunandsea12345 scusate sono nuovo del forum ,dove posso chiedere come posso generare un codice che mi perme...
ALE Ciao Puo andare nel forum Supporto pro order In fondo troverai lo spazio per inserire un ...
ALE Hello Traderfed, because it run many operations over the past three years, instead of havin...
fepabe Ciao Ale, porta pazienza ma facendo copia incolla del codice non mi restituisce alcun valore...
arke Hi Cosmic, I saw that you are able to do a backtest on DAX in 15Min timeframe till 6 years ...
5 months ago
enzo_52 Hi Ale, so you have the same results with german 30 mini 1e cash TF 1h?  
ALE no, only with TF 15m
enzo_52 Grazie tante, Thanks so much 
5 months ago
century hi, can we have more explanations please ? about parameters and time unit ? thanks
Nicolas Line 10: Volume of current candlestick must be at least 1.5 higher than the previous one and...
6 months ago
Cosmic1 Hi Yngve, Amplitude relates to the range of the price action for the given times stipulated...
GAMMA I try as per your advise and change the time to usa time still no luck, may be I am doing so...
Cosmic1 Post the code you are using, will try and figure it out. What broker?
6 months ago
Cosmic1 Hi Vish, Yes it was a good Thursday and Friday where between DAX and DOW breakout +800 point...
JakeDB I cannot get my time conversions correct for Sydney Australia to get any data for this code....
Cosmic1 @JadeDB What times are you putting in?
Philip Raphael Hey! Thank so much for sharing this wonderful indicator! I have always tried to code a simil...
CKW Hi Philip, What do you mean "Years" are not defined ? candle? If to code yearly candle size...
dakaodo Years not defined was probably b/c Phillip copied and pasted the code into PRT instead of im...
zilliq The reasons why I think it's time consuming and we loose time to try to do backests and Auto...
filiprb Hello Zilliq, You don't need a system to produce a walk forward test. You can easily create...
Philip Raphael It is incredible! Thanks for sharing, Doctrading!
Doctrading Hello, As I said, I didn't use spread for the screenshot as I don't trade Gold and I don't ...
smurfy Hi, I had been losing on gold and after I manually go through the 5min chart using IG and w...
8 months ago
Pathfinder DAX 4H
Pathfinder DAX 4H
djtaktik Hello reiner, How do you explain that pathfinder have good results on DAX but not on the CA...
Nicolas You should join and read the forum thread about this strategy. There are plenty of different...
Reiner Hi djtaktik and welcome, I have answered your question in the related Pathfinder forum beca...
9 months ago
tradex Hello, what is the simple average period on equity curve ? Thank you in advance
Reiner tradex, open the settings dialog (click on wrench symbol) on the equity curve window and add...
Daniel da Costa Hi Nicolas! Is it possible too reference the MA in the equity curve so as too know whether t...
finplus Bonjour, j'ai retesté hier sur la paire AUD/USD timeframe 1 heure sur mon compte réel chez I...
finplus Bonsoir, j'ai de nouveau aujourd'hui lancé la stratégie en réel sur mon compte IG sur la pai...
AleX 0 improvments, I tried a lot of modified version but no one was working. I think that only w...