How to Hide MA period in a code

 

Good day everyone

does anyone have an idea how to hide the Moving average input parameter

extern double S1 = 63;
extern double S2 = MODE_SMA;
extern double S3 = 21;
extern double S4 = MODE_SMA;


double first = iMA(NULL, PERIOD_CURRENT,S1,0,S2,PRICE_CLOSE,current);
    double second = iMA(NULL, PERIOD_CURRENT,S3,0,S4,PRICE_CLOSE,current);
    

to get S1=76;   63+13 = 76

hidden S1=76;  real S1=63


and 0=MODE_SMA   S2=0; 0+15

                    hidden S2=15; raal S2=0

 
Remove extern
 
Abubakar Saidu:

Good day everyone

does anyone have an idea how to hide the Moving average input parameter


extern 

input

these two stand for external and input  which is the users interaction with the program

 
Jefferson Metha:

these two stand for external and input  which is the users interaction with the program

Yes, what is your point?

 

thanks for your support..

with the moving average settings.. more set file can be made with it

i want it to be hidden..

can a set file be hidden..?

 
Abubakar Saidu: i want it to be hidden..

So remove the extern/input and the variable is hidden. As Keith already said.

 
William Roeder:

So remove the extern/input and the variable is hidden. As Keith already said.

Thanks to you all for your support..

i solved it by adding into init

extern int    Signal1 = 21;
extern int    Signal1_period = 9;


int init()
  {
  
   Dgts= Digits;

   Signal1=Signal1+29; 

   Signal1_period=Signal_period-13;
 
    
   return (0);
  }
   
So if i want to get 50MA as signal1 it will be 50-29=21 
50MA= 
extern int Signal1 = 21;
 
Keith Watford:

Yes, what is your point?

All the usual : selling it 😀

Reason: