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!
See more
See less

Partner 728x90

Collapse

indicator bid / ask volume help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      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?

      Comment


        #4
        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.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          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.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bmartz, 03-12-2024, 06:12 AM
          4 responses
          31 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          12 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X