NinjaScript > Educational Resources > Reference Samples > Indicator >

Manipulating string objects

Print this Topic Previous pageReturn to chapter overviewNext page

Dealing with strings and other related concepts are essential to many computer programs. This sample is a collection of some of the most common string and text related functions including splitting a string, replacing a string with another string, and a few other string functions.

 

Key concepts in this example

Simple text/string manipulation ideas

 

Important related documentation

C#

string.IndexOf()
string.Replace()
string.Split()
Escape characters
Foreach iterator
String literals

 

NinjaTrader

ClearOutputWindow()

 

Note

A related sample demonstrating how to format numbers can be found here.

 

Import instructions

1.Download the file contained in this Help Guide topic to your PC desktop
2.From the Control Center window, select the menu File > Utilities > Import NinjaScript
3.Select the downloaded file and click Import.

 

SampleStringFunctions_NT7.zip