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
FernetTrader think i found a solution!
monochrome Thanks for the indicator. Very interesting!
monochrome Can you please share how you made it work? I cant seem to make it work in a strategy
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Fabian Hi Thomas, thanks for your explanations. Which indicator do you use in the screenshot ...
Thomas Thats On Balance Volume and Bollinger or SMA or what you want. It shows me the volume flow. ...
bertrandpinoy @MAKSIDE I would be grateful if you send me your version. have a nice day
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
Zigo
4 years ago
Zex-Indicator
Zex-Indicator
6
Indicators
bertrandpinoy Hello Zigo can you turn into an automatic strategy?
eckaw Hey @Zigo thanks for this indicator. May I ask what the multiplier 1.682 is derived from? I ...
Zigo Hello, eckaw, its not so important I had meant 1.618 and not 1.682. It has nothing to do wit...
ggolfet Hi Actarus, what's the name of the histogram indicator below Apple's chart?
Actaru5 Flag ShowState in setting and show histogram
NicolaSilvagni hi, thank you for creating this indicator. i can't figure out how to get the three graphs b...
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
Jan Wind Thanks for sharing ! The Gain/Loss ratio is a bit low, 1,16, hardly offset the risks take...
drive whats the period ?
Lucas0000 Hola. estoy buscando un programador en proorder, para hacer un programa basado en el Q-trend...
Ludwig Bonjour Merci pour le code, je souhaite intégrer un break even et mette en place un réinves...
superfalcio hello, this strategy is pretty interesting, anyway on index after diferent suggestion and im...
Fralex Hello everyone I optimized the original “LongOnly-DAX-4H-TMA-Channel” algorithm over a pe...
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Nicolas
5 years ago
LRMA
LRMA
0
Indicators
rama what is the buy condition or sell condition for this can you suggest a code k1=1 buy and k1...
rama I would like to know at point 1 an alert or binary indicator so that I can place order
maxlys Bonjour Nicolas, merci pour ce code qui a l'air intéressant. Comment ajouter dans le code l'...
YvesRobert @robertogozzi. It's done. Thank you
YvesRobert Hello Roberto, some questions about your strategy. 1 - Do the 2 lines SET TARGET pPROFIT T...
robertogozzi 1. The 2 lines SET TARGET pPROFIT TP and SET STOP pLOSS SL are always executed, each bar. Bu...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
Gubben So far so good. After a long drawdown it was winning four times in five weeks. Since 24 jul...
pat95162 Salut Pourquoi je n'ai pas les même résultats que vous
UkCoopDownUnder Any hints for us, on which variables we should be optimising ? As of November 2020, the cu...

Top