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

NT8 GetCurrentBidVolume() & GetCurrentAskVolume() Return same value

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

    NT8 GetCurrentBidVolume() & GetCurrentAskVolume() Return same value

    I'm trying to get difference between GetCurrentBidVolume() & GetCurrentAskVolume() on a Tic Replay chart but both methods return the same value.
    I'm using: Calculate = Calculate.OnBarClose;

    long bidvol = GetCurrentBidVolume();
    long askvol = GetCurrentAskVolume();
    int buysellstrength = (int) askvol - (int) bidvol; //buysellstrength always = 0

    Print(String.Format("{0:MMM dd HH:mm:ss} {1} {2}",Time[0],bidvol,askvol));

    Any help appreciated.
    Note: I couldn't download the NT8 version of BuySellStength because the NinjaEcoSystem download isn't working.

    #2
    check this
    Attached Files
    Last edited by Emma1; 05-23-2020, 06:29 PM.

    Comment


      #3
      Thanks Emma1!

      Comment


        #4
        Hi saturntd, thanks for your question.

        The Get methods can only be used in real time. To get historical bid/ask data, we have an example here on this page:



        See the example titled "Accessing the current best bid and ask at the time of a trade"

        A working example would be the BuySellVolume indicator.

        Try Chrome for your browser when downloading from the Ecosystem website, I am able to download anything while using Google Chrome.

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Thanks Chris. the Buysellstrength indicator Emma1 sent worked fine.
          I am using Chrome to download but can't get it to work. I've also tried Incognito & it doesn't work either. Not sure what happened, Chrome used to work fine, Tried 2 other browsers, no luck.

          Comment


            #6
            Hi saturntd, thanks for your reply.

            I asked my supervisor on the downloading issue and we actively looking into the problem to resolve ASAP.

            Kind regards.
            Chris L.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ETFVoyageur, 05-07-2024, 07:05 PM
            17 responses
            133 views
            0 likes
            Last Post ETFVoyageur  
            Started by ETFVoyageur, Today, 10:13 PM
            1 response
            7 views
            0 likes
            Last Post ETFVoyageur  
            Started by somethingcomplex, Today, 10:36 PM
            0 responses
            6 views
            0 likes
            Last Post somethingcomplex  
            Started by sofortune, Yesterday, 10:28 AM
            5 responses
            22 views
            0 likes
            Last Post sofortune  
            Started by guyonabuffalo, Today, 10:01 PM
            0 responses
            4 views
            0 likes
            Last Post guyonabuffalo  
            Working...
            X