거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

Reduce_risks - MetaTrader 5용 expert

게시자:
Vladimir Karputov
조회수:
5437
평가:
(32)
게시됨:
2018.01.31 14:04
업데이트됨:
2018.03.29 11:56
Reduce_risks.mq5 (114.03 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

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.

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: 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.