Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Indicateurs

Custom Moving Average Inputs - indicateur pour MetaTrader 5

Vues:
4786
Note:
(14)
Publié:
2018.09.27 15:51
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Two settings have been added to input parameters: line color (Color) and line width (Width).

Custom Moving Average Inputs

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, two parameters were added in the strategy tester: line color and line width. Now, the Expert Advisor needs to access iCustom instead of iMA:

//--- create handle of the indicator iMA
   handle_iMA_First=iCustom(m_symbol.Name(),Period(),"Custom Moving Average Inputst",
                            InpMAPeriodFirst,InpMAShiftFirst,InpMAMethodFirst,InpMAFirstColor,InpMAFirstWith,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);
     }

Now, the indicator color and width can be managed directly from the Expert Advisor:

Custom Moving Average Inputs on chart

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/21779

UltraMFI_HTF UltraMFI_HTF

The UltraMFI indicator with the ability to change the indicator timeframe using the input parameters.

i-AnyRangeCldTail i-AnyRangeCldTail

An indicator of ranges of arbitrary time intervals with the extension of the interval generated within the specified session until the next session.

Custom Bulls Power Inputs Custom Bulls Power Inputs

A modification of the "Bulls Power" indicator: now the line color and line width can be set in input parameters.

Custom Bears Power Inputs Custom Bears Power Inputs

A modification of the "Bears Power" indicator: now the line color and line width can be set in input parameters.