Using custom events to output the current Level II data book

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Educational Resources > Reference Samples > Indicator >

Using custom events to output the current Level II data book

Previous page Return to chapter overview Next page

Custom events allow you the flexibility to access indicator/price information whenever you deem it necessary. You do not need to wait for the next incoming tick or next bar update before you can process some code logic.

 

Key concepts in this example

Creating a custom event from a Timer object
Printing Level II books whenever you receive a Timer event

 

Important related documentation

List
Timer
TriggerCustomEvent()
State.Terminated
MarketDataType

 

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 Tools > Import > NinjaScript
3.Select the downloaded file

 

SampleCustomEvents_NT8.zip