help to change in the indicator

 

i have attached the indicator below and i want to put value in decimial but i cannot able to put value less the 1 ,so please help me to do change in my code to get value in decimial .

//--- input parameters
input int                  InpAmplitude            = 1;           // Amplitude
input group             "Arrow"
input uchar                InpCodeUpArrow          = 233;         // Arrow code for 'UpArrow' (font Wingdings)
input uchar                InpCodeDnArrow          = 234;         // Arrow code for 'DnArrow' (font Wingdings)
input int                  InpShift                = 10;          // Vertical shift of arrows in pixel
input group             "Alerts"
input string               InpSoundName            = "alert.wav"; // Sound Name
input uchar                InpSoundRepetitions     = 3;           // Repetitions
input uchar                InpSoundPause           = 3;           // Pause, in seconds
input bool                 InpUseSound             = false;       // Use Sound
input bool                 InpUseAlert             = false;        // Use Alert
input bool                 InpUseMail              = false;        // Use Send mail
input bool                 InpUseNotification      = false;        // Use Send notification
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

 
Manish Sathe: i have attached the indicator below and i want to put value in decimial but i cannot able to put value less the 1 ,so please help me to do change in my code to get value in decimial .

That input is an integer type. Changing the input parameter into a floating-point type is easy, but ... you have to consider how it is used in the rest of the code.

As it stands, that parameter is used in a way that will only work correctly if it is an integer type and not a floating-point. In the code it is used by the iMA() function that expects an integer, and it is also used in other calculations to calculate a bar shift.

So, it makes no sense in changing it to a floating-point type if the rest of the code is incapable or incompatible to that data type. You would need to refactor all of the existing code too, so as to be able to cater for floating-point type.

 

Please note that having multiple MQL5 Community accounts is in Violation of Terms and Conditions — 12.13. The User shall use only one unique MQL5 ID on the www.mql5.com website

For this reason, the account ( Harshavardhan Sathe ), used for a duplicate topic I want to change the input value InpAmplitude from int to float, has been permanently banned.