Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
Functions by Category Functions by Alphabetical list

If([Column],[Column]/[Value],[Column]/[Value]) returns [Column]

Usable in an seer event objectUsable in an seer indicator objectUsable in an seer chart object

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:

- , + , * , / , % , ** , += , -= , *= , /= , %= , **= , ++ , -- , <=> , >= , > , < , <= , == , != , & , | , ~ , << , >>

© 2008 seer trading systems ltd
feedback FAQ legal privacy