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
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...
TraderFelix
6 years ago
Bebbo Thank you for your contribution. I have tested your system on some instruments and I like i...
bertrandpinoy bonjour j ai tente l installation mais PRT m indique que ce code ne peut etre utilisé qu en ...
Nicolas en effet, il faut utiliser l'éditeur de code ProBacktest, il ne s'agit pas d'un indicateur m...
tradingpro salve io faccio spread trading e volevo sapere come impostare un profitto da chiudere in a...
Nicolas Per favore non fare domande generali, non correlate al post. Usa invece il forum.
Bard Incredible, that is the clearest depiction of the trend I've ever seen Nicolas. (I just chan...
Appsoluxions Hi Nicolas, do you have the MT4 version of the indicator? I am not sure if these kind of que...
Nicolas Hi, don't have one sorry. But you can still ask for private coding through our programming s...
Appsoluxions Cool. Thanks for the response.
Xusto Hello, Fully Agree, I will update it with your advice. Btw Can would you like share you co...
Niklas johansson hägglund do you now if it's possible to use this strategy with this code in tradingview also?
Alexander9 This code for metastock ?, can for amibroker . Thanks
rama I want to use this indicator in trading system, it says zig zag is obsolete and not supported
Nicolas Right, due to its repainting behavior, the zigzag is not allowed in automated trading with r...
rama I noticed it changes as time progress, I am 7 as the average, how many period it wont chang...
Gordon101 Hi when I added your Guppy indicator to my chart it went below the chart beside the oscilla...
Nicolas Add it on the price by using the wrench located on the left upper side of your price chart.
Gordon101 Thanks Nicolas, worked a treat.
Petersson Kristian Hi when I do back test I get 0 results, what do I do wrong? Trade Well Chris
JohnScher Yes i did before, see library/strategys/repulse and dpo https://www.prorealcode.com/proreal...
JohnScher Don't know what you're doing wrong. Import ITF and observe time zone settings. This should...
osupero https://www.screencast.com/t/2fCW8fkGsOeZ....solo posiciones largas por ahora
osupero https://www.screencast.com/t/MIaSZ2PRg
ALZ Hi JohnSher, Nice but not the same result Do you have the last itf of it ? Good result i...
Rafa And the PriceMAPeriod? aren´t the same?
Nicolas The PriceMAPeriod is the period to make the average of all the last X medianprice found.
Rafa Thanks a lot Nicolás. Have a nice day
s00071609 Is it possible to have fibo numbers like 1, 2, 3, 5,8 sequence by modifying the calculation?
Nicolas sorry i dont get it. you want to plot the next level at current price + ratio?
s00071609 I meant not plotting 4, 6 and 7. This question about having 1,3,5,8 sequence was meant to be...
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
bertrandpinoy hi Leo, are you still using thoses strategy right now?
avatar
crazytrader Any improvements of this?
princedon184 hi my name is prince i need help
reb Hello have you used this strat since last year ? live or Back test ? What are the results ?
beeb Yes last Year. But only back test
drysheep Hi all, did anyone test this strategy recently? As i dont get a single trade in the backt...
YvesRobert Merci beaucoup Nicolas. Existe t'il un petit programme qui permet de tracer sur la graphe en...
Nicolas Oui il y a celui ci: https://market.prorealcode.com/product/prt-renko/?lang=fr
YvesRobert Bonjour Nicolas, j'ai une question technique à te poser. Je visualise souvent le cours en RE...
Yannick TradingDayLong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayof...
Marlon Hey JohnScher, your code works fine, but my results aren't as good as yours. Even if I use ...
DarioMazza Bha... this code dont work. gg

Top