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
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
6 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...
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...

Top