NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-13-2008, 01:05 PM   #1
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default indicator bid / ask volume help

I'm would like to add bid / ask data to a current indicator. Does anyone know how I can address this data within my existing formula?

Thanks for your time.

Safetrading
safetrading is offline  
Reply With Quote
Old 07-13-2008, 01:25 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Try GetCurrentBid() and GetCurrentAsk(). You may also want to build your own Level II book. Check this reference sample out: http://www.ninjatrader-support.com/v...ead.php?t=3478
NinjaTrader_Josh is offline  
Reply With Quote
Old 07-13-2008, 04:27 PM   #3
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by Josh View Post
Try GetCurrentBid() and GetCurrentAsk(). You may also want to build your own Level II book. Check this reference sample out: http://www.ninjatrader-support.com/v...ead.php?t=3478

Thanks for the reply. I tried your suggestion above and also looked at the referenced zip file, but to no avail. Here is the line I edited with your suggestion above;

UpperBand.Set(Bollinger(GetCurrentAsk()-GetCurrentBid().Avg, 2, 34).Upper[0]);

This line gives me this error; CS0117, which states;

'double' does not contain a definition for 'Avg'

Any thoughts?

safetrading is offline  
Reply With Quote
Old 07-13-2008, 05:14 PM   #4
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You can't do it like that because Get() are not DataSeries. You can only call DataSeries objects from that parameter in the Bollinger(). If you wish to still call this spread calculation you will need to make your own DataSeries containing that calculation. Please see the help guide article for DataSeries objects.
NinjaTrader_Josh is offline  
Reply With Quote
Old 07-13-2008, 05:32 PM   #5
safetrading
Senior Member
 
Join Date: May 2008
Posts: 221
Thanks: 12
Thanked 2 times in 2 posts
Default

Quote:
Originally Posted by Josh View Post
Try GetCurrentBid() and GetCurrentAsk(). You may also want to build your own Level II book. Check this reference sample out: http://www.ninjatrader-support.com/v...ead.php?t=3478

Thanks Josh, I'll look up the data series.
safetrading is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Volume Spike Indicator RK_trader Indicator Development 8 12-08-2011 06:10 AM
Institutional Volume Indicator Chicago Miscellaneous Support 3 08-29-2009 06:33 PM
Volume Delta Indicator Robotman Charting 21 10-19-2008 10:52 AM
Buy/Sell Volume indicator not working properly Pipqueen General Programming 1 12-26-2007 06:39 PM
Color Volume Bars Indicator (Download) Version 5 Only awuit Indicator Development 3 11-29-2007 04:25 PM


All times are GMT -6. The time now is 08:55 PM.