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

index (STR,SUBSTR,POSITION)

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

The index function searches for one string within another, but without the wildcard-like behavior of a full regular-expression pattern match. It returns the position of the first occurrence of SUBSTR in STR at or after POSITION. If POSITION is omitted, starts searching from the beginning of the string. The return value is based at 0.

If the substring is not found, returns one less than the base, ordinarily -1.

Examples:

  index('one two three','two'); #returns 4
  index('one two three','four'); #returns -1

Related functions:

length , substr

© 2011 seer trading systems ltd
feedback FAQ legal privacy