×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

InStr - MultiCharts
Open main menu

InStr

Revision as of 14:28, 25 January 2012 by 194.84.116.138 (talk) (Created page with "Returns the position of a specified string expression inside another specified string expression. The position of the string being located is indicated by the number of char...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Returns the position of a specified string expression inside another specified string expression.

The position of the string being located is indicated by the number of characters from the left side of the string being evaluated.

Usage

InStr(String1,String2)

Where: [[[String1]] - a string to be evaluated

String2 - a string to be located

Notes

In case the search returns no results 0 is returned

In case if the sought word occurs more than once, the first position will be returned

Search is case sensetive

Example

InStr("Friday is the expiration day", "Friday");

will return a value of 1, indicating that the string "Friday" begins at position 1 of the String "Friday is the expiration day"

InStr("Friday is the expiration day", "Monday");

will return a value of 0, indicating that the string "Monday" does not exist in the String "Friday is the expiration day"