Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Market Data Question
Collapse
X
-
Market Data Question
Hi, I am using onmarketdata to look at bid and ask. My question is can I add other instruments and look at those bid and ask? Could someone point me in the right direction? Thanks.Tags: None
-
Hello 26psicivic,
Thank you for your post.
Yes, when using a multi-instrument script a subscription to OnMarketData() will be created for all bars series added to the script. You could use AddDataSeries() to add a series for whichever other instruments you would like to look at in your script, though it is important to understand that OnMarketData() can be very CPU intensive and should only be used when needed. You could filter through the different instruments in the OnMarketData() updates with marketDataUpdate.Instrument, as this is one of the MarketDataEventArgs:We have a more general guide to working with Multi-Time Frame & Instruments scripts here:Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PhillT, 04-19-2024, 02:16 PM
|
4 responses
31 views
0 likes
|
Last Post
by PhillT
Today, 04:24 PM
|
||
Started by ageeholdings, 05-01-2024, 05:22 AM
|
5 responses
36 views
0 likes
|
Last Post
by ageeholdings
Today, 03:21 PM
|
||
Started by reynoldsn, Today, 02:34 PM
|
0 responses
8 views
0 likes
|
Last Post
by reynoldsn
Today, 02:34 PM
|
||
Started by nightstalker, Today, 02:05 PM
|
0 responses
15 views
0 likes
|
Last Post
by nightstalker
Today, 02:05 PM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
8 responses
30 views
0 likes
|
Last Post
by llanqui
Today, 01:57 PM
|
Comment