DAX 15Min – False Breakout / SuperTrend

DAX 15Min – False Breakout / SuperTrend
Hi everyone, First I'd like to thank you all for your contribution on this website. It's been a goldmine for me so far ;) You all found good names for your strategies but to be honest I haven't find mine yet.. Anyway, here is the thing:
  • Index: Dax 1€
  • TF: 15M
  • $Risk: You choose ! ;) - 1.5% of capital per trade in my backtest. Up to 3.7% due to seasonality (Thanks ALE for your piece of code about seasonality)
  • Spread: 2 pips
Variables were optimized different ways. Optimization from the beggining of PRT datas to 31/12/13 shows substantially the same trend. I hope my curve remains not so fitted.. Drawbacks:
  • Not so many trades
  • Several trades could last a very long time
  • Time between trades is also too long
  • The reverse short strategy does not lead to gains..
Thus, if you have any comments, ideas or anything that could improve this strategy, it would be really appreciated ! ;) Thank you all and keep posting interesting things here, I like it ! Maxime
DEFPARAM CumulateOrders = false
//DAX - 15M

Rg = 0.5

ONCE Januaryl = 1
ONCE Februaryl = 2
ONCE Marchl = 3
ONCE Aprill = 1
ONCE Mayl = 1
ONCE Junel = 2
ONCE Julyl = 3
ONCE Augustl = 1
ONCE Septemberl = 1
ONCE Octoberl = 1
ONCE Novemberl =2
ONCE Decemberl = 2
ONCE Monday = 2
ONCE Tuesday = 2
ONCE Wednesday = 1
Once Thursday = 1
Once Friday = 1
Once Saturday = 1
Once Sunday = 1

If Opendayofweek = 1 then
 DayMult = Monday
ElsIf Opendayofweek = 2 then
 DayMult = Tuesday
ElsIf Opendayofweek = 3 then
 DayMult = Wednesday
ElsIf Opendayofweek = 4 then
 DayMult = Thursday
ElsIf Opendayofweek = 5 then
 DayMult = Friday
ElsIf Opendayofweek = 6 then
 DayMult = Saturday
ElsIf Opendayofweek = 7 then
 DayMult = Sunday
// saisonal pattern long position
IF CurrentMonth = 1 THEN
 saisonalPatternMultiplierl = Januaryl
ELSIF CurrentMonth = 2 THEN
 saisonalPatternMultiplierl = Februaryl
ELSIF CurrentMonth = 3 THEN
 saisonalPatternMultiplierl = Marchl
ELSIF CurrentMonth = 4 THEN
 saisonalPatternMultiplierl = Aprill
ELSIF CurrentMonth = 5 THEN
 saisonalPatternMultiplierl = Mayl
ELSIF CurrentMonth = 6 THEN
 saisonalPatternMultiplierl = Junel
ELSIF CurrentMonth = 7 THEN
 saisonalPatternMultiplierl = Julyl
ELSIF CurrentMonth = 8 THEN
 saisonalPatternMultiplierl = Augustl
ELSIF CurrentMonth = 9 THEN
 saisonalPatternMultiplierl = Septemberl
ELSIF CurrentMonth = 10 THEN
 saisonalPatternMultiplierl = Octoberl
ELSIF CurrentMonth = 11 THEN
 saisonalPatternMultiplierl = Novemberl
ELSIF CurrentMonth = 12 THEN
 saisonalPatternMultiplierl = Decemberl

aMax = Highest[d](High)
aMin = Lowest[d](Low)
SupTnd = SuperTrend[m,p]
RngOk = (High-Low)/(aMax-aMin)<Rg

Equity = 10000+StrategyProfit
Risk = 0.015
n = Max(1,Equity*Risk/Sl/PipValue*SQRT(DayMult*saisonalPatternMultiplierl))
cBuy = aMin[1]<aMin[2] And High<aMax[1] And Close>Open And RngOk And Close>SupTnd

If cBuy Then
 Buy n Shares at Market

SET STOP ploss sl
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. ALE • 157 days ago #

    Thank you for your new ideas, it’ very good.. !! seasonalty is reiner’s idea..but thank you for your Credit!!

  2. DESCOUMA • 157 days ago #



    Thanks for your comments and thanks Reiner for your syntax on seasonality.


    I did some walk forward testing and found quite good results particularly in the recent period (see attached .xlsx file).

    In my testing, I just managed to solve for the tp and sl (changed from pips to percentages in this study) which give me the best Return/Drawdown ratio using a 2 years period. Then I used those parameters for the next 6 months. And again, and again !


    Here is my last version of the code used for this test:


    DEFPARAM CumulateOrders = false
    //DAX - 15M
    ONCE p=18
    ONCE d=20
    ONCE m=1.5
    ONCE Rg = 0.5
    ONCE Risk = 0.015
    ONCE Monday =2
    ONCE Tuesday = 2
    ONCE Wednesday = 1
    Once Thursday = 1
    Once Friday = 1
    If Opendayofweek = 1 then
    DayMult = Monday
    ElsIf Opendayofweek = 2 then
    DayMult = Tuesday
    ElsIf Opendayofweek = 3 then
    DayMult = Wednesday
    ElsIf Opendayofweek = 4 then
    DayMult = Thursday
    ElsIf Opendayofweek = 5 then
    DayMult = Friday
    aMax = Highest[d](High)
    aMin = Lowest[d](Low)
    SupTnd = SuperTrend[m,p]
    RngOk = (High-Low)/(aMax-aMin)<Rg
    Reinv = 1
    Coef = 0
    Balance = 23827.1
    If Reinv = 1 Then
    Equity = Balance+StrategyProfit
    Equity = 10000
    If Coef<>1 Then
    n = Max(1,Equity*Risk/(Close*Sl/100)*SQRT(DayMult))
    cBuy = aMin[1]<aMin[2] And High<aMax[1] And Close>Open And RngOk And Close>SupTnd
    If cBuy Then
    Buy n Shares at Market
    SET STOP %loss sl



  3. Cosmic1 • 156 days ago #

    Great work in trying to avoid curve fitting and walk forward test. Good to know that you have done this as gives some confidence moving forward to demo/live test. Are you planning running this on demo, live with minimum stakes or the code posted? 

    • Daniel da Costa • 134 days ago #

      Hi Cosmic! What is meant by curve fitting and walk forward test?

  4. DESCOUMA • 156 days ago #

    Yes. I’ll probably give it a try with 1% $risk / no reinvestment until I find a way to reduce the drawdown.

  5. jonjon • 150 days ago #

     This is very cool. Thank you very much.

    I’ve been playing a bit with it. How did you get your m, p and d values? m and p relate to the Supertrend indicator….as I’m new to this indicator can you tell me if these are pretty standard variables? d = 20 seems reasonable to me.

    I have just started paper trading the strategy. Adjusted the variables slightly to make a little more conservative: Rg = 0.4, Risk = 0.01, No reinvest. I’ve also optimised the p and d to 26 and 21 respectively (hence my question above).

    Back tested in tick mode from Sept 2012 which is just 60,000 units back (round number, nothing scientific there however thought it appropriate to base test from period post Draghi saying that ECB would do anything to stop Euro failing in July 2012 and then subsequent quieting down of volatility / market).

    I can’t attach my results (is this as I’m a Junior Member?)

    % winning trades = 40%

    Gain / Loss: 2.01


    I still want to get the loss of the worse trade down (-3,752) and the size of the Maxdrawdown is too large (-19,291 with 8 consecutive losses).

    I’ll look further into it however anyone looked at the poor performance in Q2 2013 and last quarter of this year? Down periods are to be expected but just wondering whether there was anything macro going on that we should bear in mind going forward.

    I’ll let you know how my trades go with this. Looking forward to hearing from any other of you guys paper trading this.



  6. K12AN • 149 days ago #

    Have you backtested using tick data?

  7. jonjon • 149 days ago #

    Yes. Well I think I am. I’m running v. 10.3 and I ticked “ProBacktest in tick by tick mode”

  8. DESCOUMA • 143 days ago #


    Thanks for your comments and sorry for my late answer 🙂

    m, d & p are optimized variables which I chose to maximize the Profit/Drawdown Ratio. Hence, since September 2012 using my last settings (0.5 %Loss / 1.5 %Profit / No reinvestment / No multipliers) it gives a worst loss of 1.77%, a DD of 12.8% and a profit of 94.17% with gain/loss = 1.51 and 33.21 winning trades.

    As all except 1 of the winning trades came after more than 5 candles in this last backtest, my guess is that tick mode or not it won’t change many things.



  9. jonjon • 143 days ago #

    Thanks Maxime. Appreciate it.

    I’ll let you know how it goes. I’ve been running it in demo in the background whilst I have been focusing on other strategies. No trades yet though so I’ll take another look at the code probably next week.



  10. Kenneth Kvistad • 142 days ago #

    Jonjon, do you have screenshoot of this strategy in tick by tick mode?

  11. jonjon • 139 days ago #

    Hi Kenneth. I can’t attach the screenshot I’m afraid. Unless I’m doing something stupid. I pasted the screenshot into Word and tried to attach the file.

  12. triss1965@gmail.com • 131 days ago #

    why do I get error ond line whit DAX? Eihter cod works. Can you chare the file?

  13. Elsborgtrading • 127 days ago #

    Hi Triss. the File is in the post for download. There is nothing wrong with the code. Your error describes 2 line- but it empty- perhaps some character sneaked in yours? . Please check that you code is correct copied. or download the file dax-15m-longonly.itf

    Cheers Kasper

  14. danhei • 32 days ago #


    I am tryong to figure out how trist strategy works. I am new to pro real time.

    Can someone explain the entry and exit method? Many thanks

  15. Plop61 • 27 days ago #

    Thank you for sharing this beautiful strategy.
    Is it possible to indicate the code for short positions?
    Best Regard.

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+1 more likes

Related users ' posts
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 Thanks Paris
iramirez55 Bonita estrategia. Gracias ALE
ALE ... thanks I hope could help our community!
Dagge99 Why are you the only one sharing unfinished strategys that doesn't perform well? To help us ...
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...
Elsborgtrading I have moved the development topic https://www.prorealcode.com/topic/development-of-initial-...
Elsborgtrading Sometime along the way since I coded the Indicator something has change in PRT- at least I t...
Elsborgtrading Btw last code was a 10 min TF ver. 
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!
2 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!
iramirez55 thanks for all
johnymon Hi Reiner, Many thanks for the  superb strategy.I just tried to back-test on prerealtime bu...
Reiner Hi Joy John, Navigator will allways sell at 9:00 at the first tdom and will accumulate a lo...
2 months ago
leo1962 Ciao Nicolas, nel codice c'è un errore di sintassi, allego screenshot. Non sono pratico di ...
Nicolas Este indicador sólo funcionará para Prorealtime v10.3 y superior.
leo1962 gracias ;)
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...
Nicolas You need to have enough bars loaded on your chart for the indicator to compute completely th...
verdi55 Working with separately calculated supertrend indicators in backtests is usually somewhat pr...
Nicolas Very interesting Verdi. Would be a great addition to the library, your own modified version ...
Nicolas For everyone information, a discussion thread is ongoing here: https://www.prorealcode.com/t...
larouedegann Bonjour Nicolas, comment se fait-il qu'avec cette stratégie stop loss à 5 pips, PRT mettant...
Nacho Buenos días Raul, tengo puesto este sistema desde hace unos días en una cuenta demo en la ve...
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...
6 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 ...