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

DoubleZigZag - MetaTrader 5용 expert

게시자:
Vladimir Karputov
조회수:
9637
평가:
(34)
게시됨:
2017.08.10 12:50
업데이트됨:
2018.06.26 13:25
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The author of the idea is Maksim, and the author of the mq5 code is barabashkakvn.

The Expert Advisor uses two ZigZag indicators for analysis: a smaller zigzag with parameters (13.5,3) and a larger zigzag with parameters multiplied by eight: (13*8,5*8,3*8)

//--- create handle of the indicator iCustom
   handle_iCustom=iCustom(Symbol(),Period(),"Examples\\ZigZag",13,5,3);
//--- if the handle is not created 
   if(handle_iCustom==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iCustom indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//--- create handle of the indicator iCustom
   handle_iCustomX8=iCustom(Symbol(),Period(),"Examples\\ZigZag",13*8,5*8,3*8);
//--- if the handle is not created 
   if(handle_iCustomX8==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iCustomX8 indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }

To make a trading decision, the two legs of the last peak of a larger ZigZag (13*8,5*8,3*8) are analyzed, while the number of peaks of the smaller ZigZag (13,5,3) contained in these two legs is counted.

If a signal to open a BUY position is received, all SELL positions are closed. Vice versa: if a signal to open a SELL position is received, all BUY positions are closed.

Expert Advisor parameters:

  • k is the ratio of the number of peaks of the smaller zigzag in the legs of the larger zigzag
  • k2 is the ratio of the price difference in the peaks of the larger zigzag

Example: 

DoubleZigZag

The larger ZigZag (13*8,5*8,3*8) is shown in red, the smaller zigzag ZigZag (13,5,3) is yellow.

Respectively, ABC are the peaks of the larger ZigZag (13*8,5*8,3*8).

The legs AB and AC contain nine peaks of the smaller ZigZag (13,5,3).


Testing results on EURUSD,M1:

DoubleZigZag

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

ColorBarRange_HTF ColorBarRange_HTF

The indicator draws a channel using the High and Low values of a candlestick of a higher timeframe specified in the indicator input parameters.

ColorBarOpen_HTF ColorBarOpen_HTF

The indicator draws the open level of a candlestick of a higher timeframe specified in the indicator input parameters.

AutoTradeLevels AutoTradeLevels

The indicator marks all performed trades with short horizontal lines.

Boa_ZigZag_Arrows_HTF Boa_ZigZag_Arrows_HTF

The Boa_ZigZag_Arrows indicator with the timeframe selection option available in the indicator input parameters.