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

Custom Moving Average Input Color - MetaTrader 5용 지표

조회수:
7545
평가:
(24)
게시됨:
2018.03.01 11:34
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

New input parameter "line color" has been added.

Custom Moving Average Input Color

You probably noticed that if an Expert Advisor uses the Moving Average indicator data, then this indicator is displayed ONLY in red in the visual tester mode. If such an EA uses data of three Moving Averages, all three indicators are shown in red.

Three MA in one color

So it is very difficult to distinguish between them.

To solve the issue with the visual display of Moving Averages, the "line color" parameter was added in the strategy tester. Now, the Expert Advisor needs to access iCustom instead of iMA (example from the code Crossing of two iMA) :

//--- create handle of the indicator iMA
   handle_iMA_First=iCustom(m_symbol.Name(),Period(),"Custom Moving Average Input Color",
                            InpMAPeriodFirst,InpMAShiftFirst,InpMAMethodFirst,InpMAFirstColor,PRICE_CLOSE);
//handle_iMA_First=iMA(Symbol(),Period(),InpMAPeriodFirst,InpMAShiftFirst,InpMAMethodFirst,PRICE_CLOSE);
//--- if the handle is not created 
   if(handle_iMA_First==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iMA indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }

As seen in the Crossing of two iMA EA, Moving Averages are shown in different colors in the visual strategy tester:

Crossing of two iMA

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

AccurateTimer AccurateTimer

Increased accuracy of the standard timer.

ZScore ZScore

The ZScore indicator shows relative price deviation from its average value.

MA with Band MA with Band

The indicator displays a Moving Average with bullish and bearish areas.

Advance Trend Pressure Advance Trend Pressure

The Advance Trend Pressure oscillator shows the trend direction and strength line. It can additionally show the bullish and bearish components of the trend.