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
//Positionsize=2
// 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
PositionSize=1000
endif

if PositionSize<=3 then
PositionSize=3
endif

//ONCE p=0
//x1=1
//x2=16.4
x1=2
x2=20.8
x5=5
SL=6
c1=(highest[x1](close))


if not shortonmarket and high>c1 then
BUY Positionsize CONTRACTS AT MARKET
//pris=open[p]
ENDIF
//if open>pris+x5 then
if open>tradeprice+x5 then
buy Positionsize CONTRACTS AT MARKET
endif

if longonmarket then
CountDays=CountDays+1
//p=p+1
else
CountDays=0
//p=0
endif

if CountDays>=x2 then
sell at market
endif

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 • 135 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 • 135 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 • 134 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 • 128 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 • 42 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 • 41 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 • 42 days ago #

    Running P/L screen dump

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

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

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Raul Vg It is true, I had forgotten, for the current configuration is necessary a capital of 3000 € ...
akira220984 I used this on a demo IG account today and used the following values: DEFPARAM FlatAfter =1...
akira220984 I used this on a demo IG account today and used the following values: DEFPARAM FlatAfter =1...
Jake26 Thanks for sharing your work with this code, Doc. Impressive results in backtests with shor...
Doctrading Hello, Actually I'm not trading this strategy. I'm looking to make a good automated tradin...
Rohan Hello Doctrading,  I am also very interested in the Ichimoku (I am trading it but discretio...
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...
ALE
2 months ago
ALE CiaoGuadagno.
alemaliz Ciao Ale scusa se ti disturbo ancora possiamo sentirci in privato per un chiarimento su ques...
ALE Ma certo nel mio profilo trovi le info
ALE Hello Luca,no this strategy is overfitted. 
traderfred Hello ALE is that mean you are not going to use it live? I don't understand what is "overf...
ALE Hello Traderfed, because it run many operations over the past three years, instead of havin...
ALE
3 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 
Nicolas
4 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...
Cosmic1
4 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?
Cosmic1
4 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...
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...
Reiner
7 months ago
Pathfinder DAX 4H
Pathfinder DAX 4H
182
Strategies
volpiemanuele Good morning, I would use the strategy on my IG account on FTSE 100 futures, rometime (9/22)...
Bandido Emanuele, vai nel forum e troverai di tutto e di più ;-)
Reiner Hi Emanuele and welcome, You'll find the latest versions at the first post in the related f...
Reiner
7 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 Hi Wanjpt, I tried once only on AUD / USD in november 2016 during one day. No position has b...
finplus The backtest of the code works perfectly with 1 hour timeframe.
CN Anyone got a correct code for the setup?Used Minihax code with mixed results... Anyone that ...
GraHal I adjusted for GMT (minus 1 hour on all times) ... no trades. Might it be because the code ...
GraHal Ooops got that excited I sent that last one twice! ha (and can't delete it, sorry) I got it...
Eric n = 3  dont forget to allow 3 contract in proorder
Obiwano Dear Adolfo, Have you been trading this strategy now in real?  What is the outcome?  Which ...
ernesto Hey it doesn't work there are not any buy or sell.
verdi55 Result now : a loss of 1080 Euros in the past 8 months. Were there some parameters over-opti...
Doctrading Hello, Someone asked me something (his results seemed to be different) on my email, but it ...
Samsam13   what i wanted to say, is that if you enter now into this pattern of auto trading, yo...
Nicolas Yes you are right, maybe I need to add more disclaimer? I'm actually trading some automated ...
Doctrading Hello Samsam13, I hope you are well.  As you can see, some of us post various strategies. B...

Top