Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Telegram !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Experts

Reduce_risks - expert pour MetaTrader 5

Publié par:
Vladimir Karputov
Vues:
5243
Note:
(32)
Publié:
2018.01.31 14:04
Mise à jour:
2018.03.29 11:56
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

This is an MQL5 version of the Expert Advisor from the article "How to reduce trader's risks".

The EA works on each tick and can be optimized:

  • Get some data (on indicators and time series) only if a new bar appears

Sample tester runs with the appropriate settings (the terminal was relaunched before each test, the caches were not cleared):

Reduce_risks Tester Settings

1 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.173. Test passed in 0:08:34.093 (including ticks preprocessing 0:00:29.109)
2 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.047. Test passed in 0:08:20.531 (including ticks preprocessing 0:00:28.453)
3 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.031. Test passed in 0:07:56.172 (including ticks preprocessing 0:00:30.969)

Below is the graph before the code optimization:

Reduce_risks Tester Graph

Now, three runs after a small code optimization:

1 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.047. Test passed in 0:06:25.609 (including ticks preprocessing 0:00:30.750)
2 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.047. Test passed in 0:06:20.875 (including ticks preprocessing 0:00:28.743)
3 EURUSD,M1: 90097615 ticks, 1090402 bars generated. Environment synchronized in 0:00:00.043. Test passed in 0:06:15.305 (including ticks preprocessing 0:00:27.475)

As we can see, now that some variables are declared with 'static' type and re-written on a new bar only, we can save 2 minutes.

The attached file of the version 1.013 contains the optimized code.

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/19726

Chandelier exit Chandelier exit

Chandelier exit indicator is designed to keep traders in a trend and prevent an early exit as long as the trend extends. Typically, the Chandelier Exit will be above prices during a downtrend and below prices during an uptrend.

Lot calculator - risk management tool Lot calculator - risk management tool

This tool allows you to calculate the correct lot size of the next trade by following some simple money management rules.

Rsi(var) Rsi(var)

RSI variation.

Rsi(var) with averages Rsi(var) with averages

Rsi(var) with averages.