[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 117

 
eddy:

we can write if (!condition && !condition2)

the same if (!(condition1 || condition2))

 

how do I make a parameter optional in a user function?

e.g. how to make tf an optional parameter, so that it equals zero if it is not specified

int time (int shift, int tf){
return(iTime(NULL,tf,shift);}
 
eddy:

how do I make a parameter optional in a user function?

e.g. how to make tf an optional parameter, so that it equals zero if it is not specified


int time (int shift, int tf=0)
 
and if you execute time(i,60) will return(iTime(NULL,60,i)?
 
eddy:
and if you execute time(i,60) - will it return(iTime(NULL,60,i)?
No, it will refer to the time function with the parameters i and 60. All the rest is not within my scope.
 
Hi all! Does anyone have an indicator that would draw a channel on a chart(lower and upper boundary calculated as a deviation of possible price)??? Does anyone remember such an indicator?
 
eddy:
and if you execute time(i,60) - will it return(iTime(NULL,60,i)?
Yes.
 
todem:
possible price deviation
For example, there is one, and there are plenty more on this subject in the kodobase. Google it.
 
alsu:
For example, there is one, and there are plenty more in the kodobase on the subject. Google it.

Yeah yeah yeah it's kinda like that, but it's crooked like the graph itself.... Googled it for three days.
 
todem:

Yeah yeah yeah like that, but it's curvier than the graph itself....
Set the degree of regression to 1, it goes straight.
Reason: