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 AaronKoRn, Today, 09:49 PM
          0 responses
          10 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Today, 08:42 PM
          0 responses
          9 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Today, 07:51 PM
          0 responses
          10 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,980 views
          3 likes
          Last Post jhudas88  
          Started by rbeckmann05, Today, 06:48 PM
          0 responses
          9 views
          0 likes
          Last Post rbeckmann05  
          Working...
          X