Four EMA trading strategy for DAX (LONG ONLY)

Four EMA trading strategy for DAX (LONG ONLY)

Dear community, Attached is my code for the DAX on a 3-minute basis, long only. It is kept very simple. The conditions are that the EMA 2 crosses above the EMA 4 while the EMA 20 is above the EMA 75. A very tight stop-loss of 0.15 is to be set once the profit reaches 0.25%. At 0.5% the position is closed. The backtest results show clear profits.

 

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. EricN78 • 46 days ago #

    Thanks a lot for sharing this code. The way you combine an EMA trend filter with an ATR filter and then manage the trade with a small fixed TP, a late protective stop and a hard stop defined in euros is very instructive. It’s a simple but well-structured concept, and that’s rare enough.
    The performance is excellent on the time window you posted, but outside that range the edge basically disappears. With slightly different EMA settings (EMA7, EMA13, EMA22, EMA77) the performance is positive from 2020 onwards, but it remains more of a research framework than a plug-and-play system for me. So I really wanted to say thank you for sharing it here.

  2. DeathMetal • 19 days ago #

    Thanks for sharing, I think that currentProfit must be “currentProfit = (close – entry) / (entry / 100) ” for the right calculation

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
Fabio Anthony Terrenzio this strategy works only in a well defined trend
brosly Good afternoon I am trying to get the complete code of lex strategy made by adolfo since I s...
dreif123 hi Adolfo, is Alex Auto Trading Botindex working on DAX as well ? if so , can you post the...
hvluthy@sunrise.ch I'm very interested to try out your strategy, but as a bloody newbie I need some help regard...
Scalp Hola Adolfo, tengo una variante de tu estrategia, pero no se programar, me puedes ayudar al ...
ALZ Hi, I tested this strategy and that doesn't work.. strategy is losing.. Does anyone curr...
Nicolas Ahah, I'm not the author of this one :) I know you are a great coder Wilko, why don't you p...
Wilko Thanks for the flattery! I will, I promise.  /F
Nicolas Still don't have seen anything from your own :) You promised me! Ahaha 
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...
avatar
Anonymous 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