거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
5557
평가:
(13)
게시됨:
2018.11.20 12:51
WPR Custom.mq5 (10.12 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The following characteristics were made input parameters:

  • color of the indicator main line
  • width of the indicator main line
  • values of the two indicator levels

WPR Custom

Why was this done

When testing EAs using iWPR (Williams’ Percent Range, %R) standard indicator, the picture is always far from promising: the indicator color cannot be changed (#1) and, most importantly, the level values are always the same (#2)!

Testing standart WPR

At the same time, the EA based on iWPR can use the levels "-25" and "-75", but only the levels that are strictly fixed in the indicator itself ("-20" and "-80") will be shown during visual testing. This display seemed inconvenient to me, therefore some settings were made to the input parameters.

Now, after being called from the EA, the indicator levels exactly match the trading system. Example of calling WPR Custom implemented in the Vlado EA, MQL5 code

//--- create handle of the indicator iWPR
   handle_iCustom=iCustom(m_symbol.Name(),Period(),"WPR Custom",Inp_WPR_Period,
                          Inp_WPR_Color,Inp_WPR_Width,Inp_WPR_Level1,Inp_WPR_Level2);
//--- 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 iWPR indicator for the symbol %s/%s, error code %d",
                  m_symbol.Name(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }

and the result of a display in the strategy tester:

WPR Custom vs EA


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

Secwenta Secwenta

The Expert Advisor counts the number of bullish and bearish bars in a row.

Time_Candle_Custom Time_Candle_Custom

The indicator paints a candle in color corresponding to its direction once per day at a specified time

Vlado Vlado

The EA applies WPR Custom indicator.

Volatility2Step_Alerts_HTF Volatility2Step_Alerts_HTF

The Volatility2Step_Alerts indicator with the timeframe selection option available in the input parameters