no one of the overloads can be applied to the function call could be one of 2 function(s)

 

Hello guys and girls, I'm trying to build an Indicator and please find the part of the code below I'm finding problems with. Hope you can help! The 2 errors are copied below the script.  

int OnInit() {

   // Link buffers with indicator data
   SetIndexBuffer(0, currentBidBuffer, INDICATOR_DATA);
   SetIndexBuffer(1, currentAskBuffer, INDICATOR_DATA);
   SetIndexBuffer(2, previousBidBuffer, INDICATOR_DATA);
   SetIndexBuffer(3, previousAskBuffer, INDICATOR_DATA);

   // Set graphical properties for the indicator
   IndicatorSetInteger(INDICATOR_DIGITS, _Digits);
   IndicatorSetInteger(INDICATOR_MAXIMUM, 100); // Set the maximum value for the indicator scale
   IndicatorSetInteger(INDICATOR_MINIMUM, 0);   // Set the minimum value for the indicator scale

   // ...

   return(INIT_SUCCEEDED);
}

The errors that I'm getting are these ones:

'IndicatorSetInteger' - no one of the overloads can be applied to the function call ForexIndicator5.mq5 45 5
   could be one of 2 function(s) RealForexVolumeIndicator.mq5 45 5 
      built-in: bool IndicatorSetInteger(ENUM_CUSTOMIND_PROPERTY_INTEGER,int) RealForexVolumeIndicator.mq5 45 5
      built-in: bool IndicatorSetInteger(ENUM_CUSTOMIND_PROPERTY_INTEGER,int,int) RealForexVolumeIndicator.mq5 45 5
'IndicatorSetInteger' - no one of the overloads can be applied to the function call RealForexVolumeIndicator.mq5 46 5
   could be one of 2 function(s) RealForexVolumeIndicator.mq5 46 5 
      built-in: bool IndicatorSetInteger(ENUM_CUSTOMIND_PROPERTY_INTEGER,int) RealForexVolumeIndicator.mq5 46 5
      built-in: bool IndicatorSetInteger(ENUM_CUSTOMIND_PROPERTY_INTEGER,int,int) RealForexVolumeIndicator.mq5 46 5

I tried several things but can't find a way out. Hope you can help! 

Improperly formatted code edited by moderator.
 
Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

Please always use the CODE button (Alt-S) when inserting code.

Code button in editor

 

Use IndicatorSetDouble for the Max/Min and not IndicatorSetInteger

IndicatorSetDouble(INDICATOR_MAXIMUM, 100); // Set the maximum value for the indicator scale
IndicatorSetDouble(INDICATOR_MINIMUM, 0);   // Set the minimum value for the indicator scale
Documentation on MQL5: Custom Indicators / IndicatorSetDouble
Documentation on MQL5: Custom Indicators / IndicatorSetDouble
  • www.mql5.com
IndicatorSetDouble - Custom Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: