QU Trading Strategy DAX Indices CFD

QU Trading Strategy DAX Indices CFD
This is a Multiday Strategy on DAX cfd of Ig Market- Time Frame 1 Hour

Signals are taken from QQE indicator and Universal indicator participates as filter.

The Seasonal optimization is Reiner's Idea, that work well which we know.

The position are followed by a trailing stop.

Test result are made with DAX 1 € mini Spread 2

Time Frame 1 Hour

Since 26.04.2006 to 01.11.2016

The strategy needs also 3 technical indicators that are also attached  at the bottom of the post. These technical indicators are original ones found on the site and modified for the strategy.

// Definizione dei parametri del codice
DEFPARAM CumulateOrders = FALSE // Posizioni cumulate disattivate
// define position and money management parameter
ONCE positionSize = 1

// define saisonal position multiplier >0 - long
ONCE Januaryl = 1
ONCE Februaryl = 1
ONCE Marchl = 2
ONCE Aprill = 1
ONCE Mayl = 1
ONCE Junel = 3
ONCE Julyl = 2
ONCE Augustl = 1
ONCE Septemberl = 1
ONCE Octoberl = 3
ONCE Novemberl =2
ONCE Decemberl = 2
// 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
ENDIF

// define saisonal position multiplier >0 short
ONCE Januarys = 2
ONCE Februarys = 1
ONCE Marchs = 1
ONCE Aprils = 1
ONCE Mays = 3
ONCE Junes = 2
ONCE Julys = 1
ONCE Augusts = 1
ONCE Septembers = 3
ONCE Octobers = 1
ONCE Novembers = 1
ONCE Decembers = 1
// saisonal pattern short position
IF CurrentMonth = 1 THEN
 saisonalPatternMultipliers = Januarys
ELSIF CurrentMonth = 2 THEN
 saisonalPatternMultipliers = Februarys
ELSIF CurrentMonth = 3 THEN
 saisonalPatternMultipliers = Marchs
ELSIF CurrentMonth = 4 THEN
 saisonalPatternMultipliers = Aprils
ELSIF CurrentMonth = 5 THEN
 saisonalPatternMultipliers = Mays
ELSIF CurrentMonth = 6 THEN
 saisonalPatternMultipliers = Junes
ELSIF CurrentMonth = 7 THEN
 saisonalPatternMultipliers = Julys
ELSIF CurrentMonth = 8 THEN
 saisonalPatternMultipliers = Augusts
ELSIF CurrentMonth = 9 THEN
 saisonalPatternMultipliers = Septembers
ELSIF CurrentMonth = 10 THEN
 saisonalPatternMultipliers = Octobers
ELSIF CurrentMonth = 11 THEN
 saisonalPatternMultipliers = Novembers
ELSIF CurrentMonth = 12 THEN
 saisonalPatternMultipliers = Decembers
ENDIF
// Condizioni per entrare su posizioni long
ignored, indicator1, ignored = CALL "QQE_QUDAX1HBUY"
ignored, indicator3, ignored = CALL "QQE_QUDAX1HSELL"
indicator2, ignored = CALL "UNIV_QUDAX1H_LOW"
c1 = (indicator1 CROSSES OVER 50)
c2 = (indicator2 <= 0)
c3=(indicator1>68)
c4=(indicator1<34)
// Condizioni per entrare su posizioni short
c5 = (indicator3 CROSSES UNDER 50)
c6 = (indicator2 >= 0)
C7 = (indicator3<35)
C8=(indicator3>56)

IF c1 AND c2 THEN
 IF saisonalPatternMultiplierl > 0 THEN // check saisonal booster setup and max position size
 BUY positionSize * saisonalPatternMultiplierl CONTRACT AT MARKET
 ENDIF
ENDIF
IF C3 OR C4 THEN
 SELL AT MARKET
ELSIF c5 AND c6 THEN
 IF saisonalPatternMultipliers > 0 THEN // check saisonal booster setup and max position size
 SELLSHORT positionSize * saisonalPatternMultipliers CONTRACT AT MARKET
 ENDIF
ENDIF
IF C7 OR C8 THEN
 EXITSHORT AT MARKET
ENDIF

// TRAILING STOP LOGIK
TGL =131
TGS= 100

if not onmarket then
 MAXPRICE = 0
 MINPRICE = close
 PREZZOUSCITA = 0
ENDIF

if longonmarket then
 MAXPRICE = MAX(MAXPRICE,close)
  if MAXPRICE-tradeprice(1)>=TGL*pointsize then
   PREZZOUSCITA = MAXPRICE-TGL*pointsize
  ENDIF
ENDIF

if shortonmarket then
 MINPRICE = MIN(MINPRICE,close)
  if tradeprice(1)-MINPRICE>=TGS*pointsize then
   PREZZOUSCITA = MINPRICE+TGS*pointsize
  ENDIF
ENDIF

if onmarket and PREZZOUSCITA>0 then
 EXITSHORT AT PREZZOUSCITA STOP
 SELL AT PREZZOUSCITA STOP
ENDIF

ONCE maxCandlesShortWithoutProfit =68// limit short loss latest after 85 candles
// stop and profit management
posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize

ms = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit

IF SHORTONMARKET AND ms THEN
 EXITSHORT AT MARKET
ENDIF
set stop Ploss 500
set target Pprofit 500
 
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. miguel33 • 72 days ago #

    optimized

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = FALSE // Posizioni cumulate disattivate
    // define position and money management parameter
    ONCE positionSize = 1
    
    // define saisonal position multiplier >0 - long
    ONCE Januaryl = 1
    ONCE Februaryl = 1
    ONCE Marchl = 2
    ONCE Aprill = 1
    ONCE Mayl = 1
    ONCE Junel = 3
    ONCE Julyl = 2
    ONCE Augustl = 1
    ONCE Septemberl = 1
    ONCE Octoberl = 3
    ONCE Novemberl =2
    ONCE Decemberl = 2
    // 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
    ENDIF
    
    // define saisonal position multiplier >0 short
    ONCE Januarys = 2
    ONCE Februarys = 1
    ONCE Marchs = 1
    ONCE Aprils = 1
    ONCE Mays = 3
    ONCE Junes = 2
    ONCE Julys = 1
    ONCE Augusts = 1
    ONCE Septembers = 3
    ONCE Octobers = 1
    ONCE Novembers = 1
    ONCE Decembers = 1
    // saisonal pattern short position
    IF CurrentMonth = 1 THEN
    saisonalPatternMultipliers = Januarys
    ELSIF CurrentMonth = 2 THEN
    saisonalPatternMultipliers = Februarys
    ELSIF CurrentMonth = 3 THEN
    saisonalPatternMultipliers = Marchs
    ELSIF CurrentMonth = 4 THEN
    saisonalPatternMultipliers = Aprils
    ELSIF CurrentMonth = 5 THEN
    saisonalPatternMultipliers = Mays
    ELSIF CurrentMonth = 6 THEN
    saisonalPatternMultipliers = Junes
    ELSIF CurrentMonth = 7 THEN
    saisonalPatternMultipliers = Julys
    ELSIF CurrentMonth = 8 THEN
    saisonalPatternMultipliers = Augusts
    ELSIF CurrentMonth = 9 THEN
    saisonalPatternMultipliers = Septembers
    ELSIF CurrentMonth = 10 THEN
    saisonalPatternMultipliers = Octobers
    ELSIF CurrentMonth = 11 THEN
    saisonalPatternMultipliers = Novembers
    ELSIF CurrentMonth = 12 THEN
    saisonalPatternMultipliers = Decembers
    ENDIF
    // Condizioni per entrare su posizioni long
    ignored, indicator1, ignored = CALL "QQE_QUDAX1HBUY"
    ignored, indicator3, ignored = CALL "QQE_QUDAX1HSELL"
    indicator2, ignored = CALL "UNIV_QUDAX1H_LOW"
    c1 = (indicator1 CROSSES OVER 50)
    c2 = (indicator2 <= 0)
    c3=(indicator1> 72 )
    c4=(indicator1< 39 )
    // Condizioni per entrare su posizioni short
    c5 = (indicator3 CROSSES UNDER 50)
    c6 = (indicator2 >= 0)
    C7 = (indicator3< 28 )
    C8=(indicator3> 56 )
    
    IF c1 AND c2 THEN
    IF saisonalPatternMultiplierl > 0 THEN // check saisonal booster setup and max position size
    BUY positionSize * saisonalPatternMultiplierl CONTRACT AT MARKET
    
    ENDIF
    ENDIF
    IF C3 OR C4 THEN
    SELL AT MARKET
    
    ELSIF c5 AND c6 THEN
    IF saisonalPatternMultipliers > 0 THEN // check saisonal booster setup and max position size
    SELLSHORT positionSize * saisonalPatternMultipliers CONTRACT AT MARKET
    ENDIF
    ENDIF
    IF C7 OR C8 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // TRAILING STOP LOGIK
    TGL = 131
    TGS= 100
    
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    PREZZOUSCITA = 0
    ENDIF
    
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL*pointsize then
    PREZZOUSCITA = MAXPRICE-TGL*pointsize
    ENDIF
    ENDIF
    
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close)
    if tradeprice(1)-MINPRICE>=TGS*pointsize then
    PREZZOUSCITA = MINPRICE+TGS*pointsize
    ENDIF
    ENDIF
    
    if onmarket and PREZZOUSCITA>0 then
    EXITSHORT AT PREZZOUSCITA STOP
    SELL AT PREZZOUSCITA STOP
    
    ENDIF
    
    ONCE maxCandlesShortWithoutProfit = 72// limit short loss latest after 72 candles
    // stop and profit management
    posProfit = (((close - positionprice) * pointvalue) * countofposition) / pipsize
    
    ms = posProfit < 0 AND (BarIndex - TradeIndex) >= maxCandlesShortWithoutProfit
    
    IF SHORTONMARKET AND ms THEN
    EXITSHORT AT MARKET
    ENDIF
    set stop Ploss 950
    set target Pprofit 500
    

     

    • ALE • 72 days ago #

      Hi,

      have you change stop loss only? Have you test 200.000 Bars?

  2. miguel33 • 72 days ago #

    Ale max 100.000  con la mia piattaforma

    how can I put a picture here?

     

    • ALE • 72 days ago #

      Ciao
      I’ve seen your version with 100.000 Bars, yes is better; but with 200.000 results are quite the same and increase drawdown.

       

    • ALE • 72 days ago #

      We may look for to run the strategy with Gold and Oil.. 
      Grazie!

       

       

    • ALE • 72 days ago #

      Miguel do you find picture of your version near the others files above. It’s tested with 200.000 bars

    • enzo_52 • 71 days ago #

      HI MIGUEL, WHAT IS THE  TRADING TIME ? 08:00 – 22:00?   ROME TIME ZONE

      THANKS

       

  3. Cosmic1 • 72 days ago #

    Paste here Miguel and send link? https://snag.gy/

  4. miguel33 • 72 days ago #

    Cosmic I will attach here the result with photos

  5. Duccio • 69 days ago #

    Ciao Ale,

    Are you running this code on real account? The results are the same of backtests?

    Duccio

    • ALE • 69 days ago #

      Ciao Ducci,

      yes the same..

  6. Duccio • 69 days ago #

    Oh perfetto. Very good job.

    Ti posso contattare tramite un metodo privato (email o cellulare)per chiederti alcune cose che non c’entrano direttamente con la strategia?

    • ALE • 59 days ago #

      Hello Duccio;
      If you need to contact me don’t hesitate.. 

  7. ALE • 69 days ago #

    Ciao

    vuoi darmi il numero che ti chiamo?

  8. Duccio • 69 days ago #

    Te lo posso mandare via mail evitando di scriverlo qui pubblico?

  9. criscolci • 63 days ago #

    Grandi idee….grazie Ale!!

  10. SAM • 62 days ago #

    Ciao Ale, intanto ti volevo fare i complimenti per tutto quello che posti!!
    Premetto che sono un newbie, e mi piacerebbe migliorare la mia programmazione. Leggendo il tuo TS, faccio fatica a capirlo… posso farti alcune domande? Scusa se sono banali… Spero che possano essere utili anche ad altri nella community…
    sopratutto la prima parte… dalla riga 7 alla 84.. grazie mille

     

     

  11. Pfeiler • 59 days ago #

     Off topic: but is it possible to change the language of the PRT interface (eg to English)? Cant find a setting for that.

    • Nicolas • 59 days ago #

      No it’s not possible. The platform language is linked to your country language account.

    • marty1974 • 58 days ago #

      qualcuno puo aiutarmi per il mio ts? avrei bisogno solo di mettere un entrata per un tf 1m come secondo incrocio ma non trovo come fare qualcuno mi puo contattare?

      grazie

      martina

  12. Arnaudp63 • 57 days ago #

    Hello ALE,
    Thanks for your good strategies,
    Have you calculated how overnight CFD charges will affect overall gain as ie. for the last 4 years,  77 long trades last  an average of 20 days and 32 short trades, an average of 9 days?
    Thank you for your answer.

    • ALE • 55 days ago #

      Hi Arnaudp63,
      Not yet

    • ALE • 25 days ago #

      Hi Arnaudp63

      Daliy itenterests are about 1700€ since 26.april.2006 to last trade.

      Regards
      Ale

  13. alemaliz • 29 days ago #

    Salve a tutti sono nuovo nel forum ma no nel trading,bella strategia ma nel trading medi lungo periodo non puo bastare il calcolo dello spread 2, ma bisognerebe calcolarlo almeno il doppio per compensare le spese degli interessi che applicano giornalmente.

    • ALE • 28 days ago #

      Hi Alemaliz
      At Christmas time I’ll count interest..

      Thanks

      Ale

    • ALE • 25 days ago #

      Hi Alemaliz

      Daliy itenterests are about 1700€ since 26.april.2006 to last trade.

      Regards
      Ale

  14. Centrocasa Servizi Immobiliari • 15 days ago #

    ciao Ale, mi da questo errore quando copio il codice su PRT

    "QQE_QUDAX1HBUY"
    come posso risolvere?
    Grazie.
    • ALE • 15 days ago #

      Ciao 

      Devi fare il download di tutti i file e successivamente dal menù della piattaforma dove trovi tutti gli indicatori e tutte le strategie, cliccata sul tasto importa, alla fine li troverai disponibili nel menù 

  15. ALE • 15 days ago #

    Please  write in English 

    you must download every files

    and import them in your platform 

     

  16. Centrocasa Servizi Immobiliari • 15 days ago #

    risolto…

  17. ALE • 15 days ago #

     https://www.prorealcode.com/import-export-prorealtime-code-platform/

     

  18. ALE • 15 days ago #

    ok bene!

     

  19. alemaliz • 6 days ago #

    Ciao Ale le stagionalita sono ottimizzate in base al guadagno% ho in %Trade vincenti Grazie?

  20. ALE • 6 days ago #

    Ciao
    Guadagno.

  21. alemaliz • 4 days ago #

    Ciao Ale scusa se ti disturbo ancora possiamo sentirci in privato per un chiarimento su questa strategia per il bene di tutti?

  22. ALE • 4 days ago #

    Ma certo nel mio profilo trovi le info

avatar
Register or

Likes

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

+8 more likes

Related users ' posts
Raul Vg the same robot with trailing stop and other type of accumulator (you can keep the previous a...
Raul Vg A mi me dan solo 100.000, puedo ver año y medio
Raul Vg Yes, I have also tried it. But I would like someone who had 200,000 bars to show us how he b...
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 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 
Elsborgtrading Hi Nicolas, and thanks for updating the file. When I backtest the code now I get a complete...
Elsborgtrading Hi Nicolas. I made a mistake. a FTSE chart had sneaked under the DAX and when backtesting I ...
Nicolas "set stop loss" are individual for each order with IG.
Cosmic1
5 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!
Reiner
7 months ago
Pathfinder DAX 4H
Pathfinder DAX 4H
183
Strategies
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...
volpiemanuele Tanks, if I want to enter in a market only with 1 lot do you confirm that I cam modify only ...
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 ...
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...
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...
Andres Uffff, I didn't adjust the different index spreads. With the heavy spread of Italy It's nega...
davidp13 Good day. I know this was posted such a long time ago, but I though rebuilding the system on...
davidp13 Also to note that the one position in my code does not close the other, which as far as I kn...
Dave Hi, I'm new to coding and have been trying to modify the code a little to backtest an idea I...
Nicolas Better use the forums for coding assistance please. You'll get more results there for sure.
Dave Apologies - only just learning the site layout. Maybe you could delete the post?
Nicolas FR/Bonjour Steftonio, non pas de frais overnight calculé sur la durée du backtest, c'est une...
david-1984 Any reason why in 2016 this system is doing very bad respect the previous years?
Nicolas "very bad" is relative to the account equity. I do not forward test this strategy since I po...

Top