VECTORIAL DAX (M5)

VECTORIAL DAX (M5)

Hello. I share with the community an automatic strategy that works on the DAX for M5 timeframe.

I wanted to test a strategy that involves observing the angular orientation of a moving average. The higher the angle and slope of the moving average, the stronger and more directional the movement. It then took me back into my distant memories of mathematics courses, trigonometry and vector calculus to try to develop this code.

The strategy consists first of all in calculating the angular orientation of a 10-period moving average (PeriodA) over a period of 15 bars (nbChandelierA). Then I calculate the slope of this moving average. This amounts to calculating a “vector” hence the name of the algorithm.

I then added a trailing stop and optimized the entry points with particular playing on the variable “lag”.

I launched the code in real mode and in demo mode. There are some differences in the positions, but overall it works pretty well.

Note that the attached backtest images correspond to a backtest on 200,000 bars (Premium version of PRT) with a spread of 1.5 points.

The code looks good on other timeframes (including H4) by changing the variables.

Looking forward to having your feedback, feedback and suggestions for improvements.

 

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?

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

  1. Nicolas • 02/24/2019 #

    Thanks for this contribution to our library! Did you try Out Of Sample (OOS) tests after optimization? or even in backtest by optimizing only a single part of the history?

  2. Balmora74 • 02/24/2019 #

    Not yet but i’ll try to do it. Is it possible to open a file discussion in the French or English forum in order to share ideas and trying to improve this strategy ?

    • Nicolas • 02/24/2019 #

      English topic should drain more people!

  3. Balmora74 • 02/24/2019 #

    Link to the forum : https://www.prorealcode.com/topic/vectorial-dax-m5/

  4. JohnCato • 02/24/2019 #

    Thanks for sharing that Balmora. Nice work.

  5. superborstig • 02/24/2019 #

    Hallo Balmora74,
    you wrote: “The code looks good on other timeframes (including H4) by changing the variables.”
    How do you change the variables on which timeframes?

    • Balmora74 • 02/24/2019 #

      Hello Superborstig. Fore more info : https://www.prorealcode.com/topic/vectorial-dax-m5/

  6. JvdG • 02/24/2019 #

    Hi, nice piece of work, using atan.
    My question: MMA is constituted by the 10 most recent bars (PeriodeA=10). Why not also assign nbChandelierA with the same value 10? That would make your algo more consistent. The same goes for the couple in ~B.
    Regards, Jerke

  7. Balmora74 • 02/24/2019 #

    Hi Jerke and thanks for your return. I choose the values because they gave me the best equity curve… But i will try to test the strategy with the same values for couples in A and B…

  8. Dymjohn • 02/24/2019 #

    Great work I’ve changed the trade quantity to reflect whether price is above or below the 200 day moving average a “buy” of 2 if above this average and a sell of 1 and for a “sell” of 2 if below the average and 1 if above. Makes little difference on the most recent 100000 units but I think gives better logic in the light of current trend.

  9. PacoLopez • 02/24/2019 #

    Hello Balmora, good morning.
    Nice code, Thanks for sharing. I just read from your comments that you are using this strategy in live and demo.
    I am just asking how to move this code to live.
    As far as I know with ProRealTime and IB (interactive Broker) you can not use ProOrder Automatic trading.
    You can only use this with IG CFDs…
    I have some codes in demo and I would like to move forward to live. Any help I will apreciate.
    Thanks a lot Regards Paco

    • Balmora74 • 02/24/2019 #

      @Pacolopez read this :
      https://www.prorealcode.com/topic/main-differences-prorealtime-software-prorealtime-ib-and-prorealtime-ig/

  10. Balmora74 • 02/24/2019 #

    @Pacolopez
    Hi ! I run this code live on IG CFDs (not via IG Interactive Broker).

    • darbes • 02/24/2019 #

      Hi
      How does it go on live ?
      JC

  11. PacoLopez • 02/24/2019 #

    Thanks Balmora74.
    100% clear now.
    Not posible at all with IB
    Only option by now with IG
    Thanks Regards Paco

  12. sharksteven • 02/24/2019 #

    Hi BALMORA, looks like a good compliment algorithm. I tried to test it on the EUR USD but it doesn’t calculate any trade, how come?

  13. kompiuter • 02/24/2019 #

    Hello, how did you optimized all these variable? If I try to optimize only two variables it takes hours and often the software crashes.
    Thanks in advance and compliment for this algorithm! Marco

  14. rrenaud_ig • 02/24/2019 #

    Great work ! My only concern is about risk management. Your results are based on 10k. Max loss 500euro. Its mean 5% max loss by trade. Ratio Risk-Reward is approx. 1:1. My problem with that is consecutive lost that can ruine you in a losing strike. Have you try to play with ratio RR and max loss by trade ?

  15. Tony87 • 02/24/2019 #

    can we have a update on this one please?

    • Nicolas • 02/24/2019 #

      Discussions with many other versions and improvements can be found here: https://www.prorealcode.com/topic/vectorial-dax-m5/

  16. antonio73 • 02/24/2019 #

    Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, tu che ne pensi?

  17. Juananantoniorodriguez • 02/24/2019 #

    hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio simple. sin alterar el sistema entero. Gracias.

avatar
Register or

Likes

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

+46 more likes

Related users ' posts
Peter I recognized a possible problem with the timeframe / Defparam variables. As far as I know, t...
superfalcio Hello Peter, it is long time i have been watching this strategy, very good and interesting ...
Peter I indeed do have different modified strategies in the market. In the past my variants perfor...
JJ Tec Hola. Me gustaría contactar contigo para ver la estrategia..
nilsla1981 Has someone already tested in real ?
Lucas0000 Hola. estoy buscando un programador en proorder, para hacer un programa basado en el Q-trend...
JOKAMAURICE Thank you but I don't really understand. The values don't fit with what I see on my chart. I...
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
TempusFugit Hi, this simple system for DOW and only shorts has worked quite well, maybe because of its q...
phoentzs Unfortunately, I never pursued this strategy further. Maybe I should take a look with what ...
robertogozzi It surely CHANGES even when currently outside time range, as the lookback periods change as ...
SkippyTrader Thanks Roberto, but shouldnt the values in the outside time range not be different? As it sh...
robertogozzi Actually it is a constant (I tested them on a 1-hour TF, 9am to 5pm) and outside that time r...
Marius Zammit Still learning and very new to all this. Can this indicator be turned into an automated trad...
Nicolas Yes sure, please create a dedicated post in the automated trading forum.
leederbyshire Hi is it possible to replace the dots with red/green vertical lines? Thank you.
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
brian gilbert Hello, can you explain to me what are "pipsize" and "ATAN"? What functions do they have and ...
Bodaris Bonjour, Je suis débutant 1 mois :p pipsize ressemble à la fonction pointsize et ATAN...
Exalaxe Hey, i just noticed you optimized this strategy. Could i see your new version, please?
Andrea.1981 sorry i add my code but it not enter why i dont know
Andrea.1981 this is code simply stop , and you can see another version for stop / Codice principale...
avatar
unkown ;-) sfido chiunque a riuscirci!
avatar
unkown infatti basta leggere i post degli altri....
nicola papangelo ciao Francesco vorrei contattarti su facebook o in privato. Grazie
arnaudat Merci nicolas, j'ai déjà pris cette version et en plus je suis sur les futures. Par contre d...
ullle73 hi nicolas, when im making a strategy out of this i get the error "PRC_VWAP z-score" called ...
Nicolas Please open a new topic in the ProOrder forum section and post the code there in order to ch...
hartgeld Hallo Atxeel, sehr interessanter Code, habe das installiert und funktioniert. Danke! Kannst ...
atxeel Hallo hartgeld, die Ziele sind schlicht, bspw. die Range beträgt 10 Punkte, dann ist das Zie...
Maik2404 wie kann ich den Code bekommen Paul?
jens_kittner Works with US Crude at 1h as well!
Jean-Claude REGIS Je préconise de regarder les graphiques H1 et M15 pour visualiser la tendance de fond et d'...
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
bertrandpinoy hello Leo I'm spending time on your strategy code. do you agree to try to include this code ...
bertrandpinoy //version a: ajout filtre MM defparam cumulateorders=false // --- paramètres taille =...
Bard Problems with Safari latest s/ware and this site and links and adding code. Let me add the...
grimweasel47 Ok thanks Nicolas - could this be adapted to take into account MFI and then have price, volu...
Nicolas I don't understand what you mean exactly, would be better to open a topic about this idea wi...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
DimKar Dear sir , thank you very much for sharing !!!! it is awesome ...!!! Please can you tell me...
Nicolas Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(16...
DimKar Thank you very much from Greece sir , have a nice day ....!!!! Really i do not have words...
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...
Nicolas Yes, that's how it goes when using loops..
JosephFelix Hi, Could I please have help with adding these indicators 'on price'? Every indicator that I...
Nicolas Just add it on price by clicking the wrench on the left upper side of the price chart.
Paul the last update can be found in topic Strategy DayOpen Straddle for DAX on page 14.
bertrandpinoy l instruction GRAPH pose problème sur PRT... pas vous? cordialement
Nicolas Supprimer simplement les lignes avec GRAPH pour passer en ProOrder, trading live.
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...

Top