Moving average trading system

Moving average trading system

EN / Hello everyone,

Here is an automatic trading strategy based on the Mobile Averages.

This code is very simple because I started in this discipline! 🙂

I need your help to optimize the code. I would like to filter out false signals in order to have more winning positions and reduce drawdown.

Thank you in advance for your help.

Best regards,

DJ

 

FR / Bonjour à tous,

Voici une stratégie de trading automatique basée sur les Moyennes Mobiles.

Ce code est très simple car je débute dans cette discipline ! 🙂

Je sollicite votre aide afin d’optimiser ce code. J’aimerais filtrer les faux signaux afin d’avoir davantage de positions gagnantes et réduire le drawdown.

Merci d’avance pour votre aide.

Bien cordialement,

DJ

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. klaus • 09/27/2016 #

    Hi Matriciel,
    on which timeframe and Indices does your code run?
    ciao Klaus

  2. Matriciel • 09/27/2016 #

    Hi Klaus,I’m about 15 minutes time frame and I trade on the DAX30.

  3. Matriciel • 09/27/2016 #

    Hi Klaus,I’m about 15 minutes time frame I trade on the DAX30.

  4. Fabio Anthony Terrenzio • 09/27/2016 #

    what do 0.998 and 1.002 factors represents?

  5. Matriciel • 09/27/2016 #

    These are the moving averages offset on the vertical axis.

  6. Fabio Anthony Terrenzio • 09/27/2016 #

    It’s incredible, this little offset make big difference! dunno why..

  7. PRT_kok • 09/27/2016 #

    Amusante cette petite strat : elle est positive sur 200000 ut mais tu obtiens un DD de 78% du benefice et un profit factor de 1,10.
    cordialement.

  8. chaostrader82 • 09/27/2016 #

    Hi Matriciel,
    How do you change the limit to take profit ? kindly advice 

    • Matriciel • 09/27/2016 #

      Hi Chaostrader82,
      You can play with the value of the trailing stop.This one works well : SET TARGET pPROFIT 300

  9. Matriciel • 09/27/2016 #

    Je voulais dire : “take profit” et non “trailing stop”… 🙂

  10. Matriciel • 09/27/2016 #

    I wanted to say “take profit” and not “trailing stop” … 🙂

  11. chaostrader82 • 09/27/2016 #

    hi marticiel , can you email me at xxxx ? i want to work with you on the development of the codes 

    • Nicolas • 09/27/2016 #

      Please dont put your email address publicly on the website. If you want to make a dev team for improvements of this strategy, I suggest you to make a new thread on the forums where everyone in interest should help. It makes senses since everything here is completely free and share the same sharing spirit. Thanks.

  12. chaostrader82 • 09/27/2016 #

    Dear Matriciel , you should try removing these 1.0998 , 0.0998 , these functions actually draws down your profits .I made it more cleaner but it is for scalping only. i only tested on some of the pairs so far. maybe you want to have a further look at it. This is only for a trending market that has a definate trend, if its a sideway market dont use this because the MAs will trigger and you will get whipped sawed.
    // Conditions pour ouvrir une position acheteuse setting (1000units 15mins chart )indicator1 = closeindicator2 = Average[5](close)c1 = (indicator1 CROSSES OVER indicator2)
    IF c1 THENBUY 3 CONTRACT AT MARKETENDIF
    // Conditions pour fermer une position acheteuseindicator3 = closeindicator4 = Average[7](close)c2 = (indicator3 CROSSES OVER indicator4)
    IF c2 THENBUY 3 CONTRACT AT MARKETENDIF
    // Conditions pour ouvrir une position acheteuseindicator5 = closeindicator6 = Average[60](close)c3 = (indicator5 CROSSES OVER indicator6)
    IF c3 THENSELL AT MARKETENDIF

  13. chaostrader82 • 09/27/2016 #

    Dear Matriciel , can you add in the following ? stoploss=30pips , take profit= 4pips <=== after you are done pls paste it back here. Thanks 

  14. chaostrader82 • 09/27/2016 #

    Theres some bugs still with this program , can somebody help to improve on the following?
    Improvements needed 

    BUY if current close is higher than previous close 
    No stoploss or take profit settings 

    Notes : Strategy only works in a upward trending market, heavy losses in a downward or whipped saw trend 

  15. Matriciel • 09/27/2016 #

    Hi Chaostrader82,You know, I’m starting in automatic strategy coding so I’m not going to be able to help you a lot.

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
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...
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...
murre87 No Stoploss?
bousalahane Hi Rajesh Deshpande, Thank you for this code, I see that the code is perfect, but the posit...
Bibi83 Bonsoir à tous Je viens de backtest la stategie sur EUR/USD en graphique 1H sur 1 mois et ...
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...
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 ...
Jan
6 years ago
Kovit Hi guys, please could someone help with a bit of Ichimoku code that will improve performance...
Kovit lol I should be more exact with my wording, more accurately I was looking for an indicator t...
jm121212 how can we change the default settings?
nfulcher Please could someone explain how the following code is calculated:- iDI = TEMA[3](DI[DI2]...
oakenstream Jan, I find sometimes that the priceexit variable is never set. It seems to happen when the ...
Matt66612 I do not understand the first time I launch the backtest I got the same result as you. but ...
darbes Hi How does it go on live ? JC
antonio73 Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, t...
Juananantoniorodriguez hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio sim...
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...
AntoGH how did you backtest it ?
PastaPesto @AntoGH , I dont know if you are asking me, but my backtest was made in an IS of 4 years bet...
Ridder @PastaPesto Do you still running this and how is the results? Thanks
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
Francesco78 @nicola onestamente non ricordo se lo avessi scelto anchored or ananchored.
debs83 Is this strategy standing for DAX please?
Nicolas Title says that it is for Hang Seng
juanj @Holy Grail, glad you like it. Would you perhaps mind sharing your results here: https://www...
CaptainCaveman I am reluctant to say this buy I was a member of Dr Elder trading group for a while . The fa...
micquan The design is too complex and the performance is low.
Janfi Hello, I'm new to ProRealCode and I do not understand the following summation[n](indicator...
Kaci It seems he's just checking that the previous MACD is < 0 for maximum one period ? I'...
Daniel Martin Hi do you know how have and entry after the second cross? There is crosses below 0 and cross...
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'...
Maik2404 es sind leider nur long Positionen und keine Short zu erkennen.
Maik2404 Vytautas: es bleibt aber nur bei long Auslösungen
ullle73 this one is not a winner, have backtested it on almost all pairs, does not have an edge
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.
Nicolas Thanks for the update David!
sublime06 quelle parametre utilisé vous pour obtenir ces resultat ? merci
ullle73 you still use tihs one David?

Top