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

Statistics of candles - MetaTrader 5용 스크립트

조회수:
5192
평가:
(26)
게시됨:
2018.01.22 09:20
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Counting the number of series of bullish and bearish bars. Displaying the result as a chart. Saving the screenshot of the resulting chart. The script uses the CGraphic class.


Input Parameters

  • Count of bars - the number of bars (from the rightmost bar on the chart), for which the calculation will be preformed;
  • Verification - the flag for printing the copied timeseries of this symbol and the resulting array of bar series. NOTE: should only be enabled if the Count of bars parameter does not exceed 15-30. Otherwise the amount of printed data will be very large;
  • Save screenShot - enable/disable saving of screenshots of the resulting chart;
  • Sleep (milliseconds) - a delay in displaying the resulting chart.

Series of bars are coded according to the following principle:

   enum ENUM_SERIES_TYPE
     {
      Bull=1,  // ↑
      Bear=-1, // ↓
     };

A "bullish" candlestick has the code of "1", a "bearish" candlestick has the code of "-1".

Another parameter for the name of the series is calculated as follows:

current series (ENUM_SERIES_TYPE) * the umber of bars in a row in this series

int name_series=current_series_type*count_series;

Note: the very last series is not included in calculations, because you cannot know how long the series will last.

Screenshots are saved (if Save screenShot is enabled) to [data folder]\MQL5\Files\Statistics of candles\. An example of a saved screenshots of the resulting charts. Series are drawn along the X axis, i.e. the "-5" series means five bearish bars in a row, and "2" means two bullish bars in a row:

AUDCAD,H1. 1200 bars

Fig. 1. AUDCAD,H1. 1200 bars

EURUSD,H1. 1200 bars

Fig. 2. EURUSD,H1. 1200 bars

RTS-12.17,M5. 1200 bars

Fig. 3. RTS-12.17,M5. 1200 bars

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/19304

MACD Crossing the zero level (color candles) MACD Crossing the zero level (color candles)

Color candlesticks display areas, in which the MACD indicator crosses the zero line.

MACD Crossing the zero level MACD Crossing the zero level

Displays areas, in which the MACD indicator crosses the zero line.

WPRValues WPRValues

The indicator shows a text block with the values ​​of the user defined WRP oscillator period for each timeframe.

DeMarkerValues DeMarkerValues

The indicator shows a text block with the values ​​of the user defined DeMarker oscillator period for each timeframe.