fff222
11-30-2010, 11:02 AM
Hi. I would like know what kind of action is available in ninjascript after I get the data via OnMarketData, e.g. the present bid price. Is the ".print" function only display the data in the output window? How can I then further manipulate the data I get above, for example to make an indicator? Thanks a lot for helps.
NinjaTrader_RyanM
11-30-2010, 11:27 AM
Hello fff222,
You can use C# to capture values in these methods, although it's not reccommended to base calculations on bar objects here. The event is not tied to bar updating.
There is an example of printing some of the values associated with this method here:
http://www.ninjatrader.com/support/helpGuides/nt7/onmarketdata.htm
You can capture these values into a variable as well. We have a sample on working with OnMarketDepth(). This will be useful for storing similar data as OnMarketData()
Creating your own Level II data book (Accessing market depth) (http://www.ninjatrader-support.com/vb/showthread.php?t=3478) -