Functions by Category Functions by Alphabetical list
This statement is the column equivalent of the classic if statement. It expects a column as the first parameter, although the true and false component can be values or columns. All three parameters can be deeply nested with other If statements. This function always returns a column. If([Comparasion],[True statement],[False statment]);
is equivalent to: if ([Comparasion) {[True statement]}
else {[False statement]}
Examples: #Change the up and down days to Yellow and Blue
PlotPrice('Candle');
SetBarColor(If(Close>Open,1,0),Yellow);
SetBarColor(If(Close<open,1,0),blue); $plusdm="If(High" $yeslow="Ref(Low,-1);" $yeshigh="Ref(High,-1);">$yeshigh & Low>=$yeslow, High-$yeshigh,
If(High>$yeshigh & Low<$yeslow & High-$yeshigh >$yeslow-Low,High-$yeshigh,0));
</open,1,0),blue);>
Related functions: - , + , * , / , % , ** , += , -= , *= , /= , %= , **= , ++ , -- , <=> , >= , > , < , <= , == , != , & , | , ~ , << , >>
|