Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

work with bid and ask quantity

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

    work with bid and ask quantity

    Hello,

    I know how to work in my script-strategies with close, open, high, low in primary dataseries and added dataseries and also to use them in indicators.

    Thanks to this great forum and the great support.

    But I couldn´t find somewhere how I can "grab" the ask-quantity and bid-quantity eg

    if (ask-quantity at close of bar < 10)
    {then do}

    Thank you for any hint!

    Best regards
    Tony

    #2
    If I understand the question correctly this should do the trick. Take a look at the example here for getting the ask volume



    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi Lance,

      thank you for your response.

      This seems to be but I do not understand how to do from this simply

      if("ask at high of bar" == valuex)
      {.....}

      Isn´t there another example more or can you give me an example - should only be one line. Once I understood the syntax I can work with this as I also.

      Thank you for your support.

      Best regards
      Tony

      Originally posted by NinjaTrader_Lance View Post
      If I understand the question correctly this should do the trick. Take a look at the example here for getting the ask volume



      Let me know if I can further assist.

      Comment


        #4
        If you need to do it in OnBarUpdate() you could use: http://www.ninjatrader.com/support/h...taskvolume.htm

        Let me know if I can be of further assistance.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Hi Lance,

          thank you, this is a help.

          But how can I get the askvolume at the low of an upbar (RangeBar with close[0]>low[0])?
          How can I join the getcurrentaskvolume and the low of the bar?

          I also found in the meantime the link in the forum
          http://www.ninjatrader-support.com/v...ead.php?t=3478
          in another thread but the link doesn´t work - I find a strange landing-page. Did one remove the sample?

          Thank you for your support.

          Best regards
          Tony



          Originally posted by NinjaTrader_Lance View Post
          If you need to do it in OnBarUpdate() you could use: http://www.ninjatrader.com/support/h...taskvolume.htm

          Let me know if I can be of further assistance.

          Comment


            #6
            I'm not sure where that link would have gone or if it's maybe from 6.5.

            Perhaps I don't understand your question. What do you mean by join the ask volume and low of the bar? You could make an array of 2 double values. Store the volume in slot 0 and low price in slot 1.
            LanceNinjaTrader Customer Service

            Comment


              #7
              Hello Lance,

              thank you for your response.

              With join I mean to get the ask volume at the low of the bar.

              // of course this here is wrong but maybe I can explain this way
              if (GetCurrentAskVolume(Low[0]) == certainvalue) then do...

              I tried with doubles but how can I tell NT that I want the AskVolume at the Low[0]?

              Thank you.
              Tony

              Originally posted by NinjaTrader_Lance View Post
              I'm not sure where that link would have gone or if it's maybe from 6.5.

              Perhaps I don't understand your question. What do you mean by join the ask volume and low of the bar? You could make an array of 2 double values. Store the volume in slot 0 and low price in slot 1.

              Comment


                #8
                There won't be a straightforward way to do this.

                You would have to manually store this value as it happened and then reference it later.

                First thing that comes to mind would be storing the ask volume each tick that was the low of a bar, Overriding previous values if that low is lower than the previous.

                Ask volume is not tied to a price point but a place in time. So you would need to get the time the low happened and store the ask at that point.

                Let me know if I can further assist.
                LanceNinjaTrader Customer Service

                Comment


                  #9
                  Hello Lance,

                  thank you for your response.

                  This is exactly what I mean. But how can I store ask volume each tick that was the low of a bar.

                  Thank you for your support.

                  Best regards
                  Tony

                  Originally posted by NinjaTrader_Lance View Post
                  There won't be a straightforward way to do this.

                  You would have to manually store this value as it happened and then reference it later.

                  First thing that comes to mind would be storing the ask volume each tick that was the low of a bar, Overriding previous values if that low is lower than the previous.

                  Ask volume is not tied to a price point but a place in time. So you would need to get the time the low happened and store the ask at that point.

                  Let me know if I can further assist.

                  Comment


                    #10
                    Unfortunately I won't be able to provide you with a robust solution free of charge.

                    The general concept would be to store historical values in a storage container and reference them as needed. You would also need to have a way to override previous values that were no longer at the price point.

                    Consider taking a look at tools like the GOMI package as they deal a lot with this type of data: https://www.bigmiketrading.com/wiki/trading-wiki/Gomi

                    If you're looking for someone to make this for you: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

                    Let me know if I can further assist.
                    LanceNinjaTrader Customer Service

                    Comment


                      #11
                      Thank you.

                      I try to find a solution with one of your consultant partners.

                      Best regards
                      Tony

                      Originally posted by NinjaTrader_Lance View Post
                      Unfortunately I won't be able to provide you with a robust solution free of charge.

                      The general concept would be to store historical values in a storage container and reference them as needed. You would also need to have a way to override previous values that were no longer at the price point.

                      Consider taking a look at tools like the GOMI package as they deal a lot with this type of data: https://www.bigmiketrading.com/wiki/trading-wiki/Gomi

                      If you're looking for someone to make this for you: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

                      Let me know if I can further assist.

                      Comment


                        #12
                        Hello,

                        In the helpguide there is onyl the syntax shortly but no explanation. Question please: getcurrentaskvolume shows the trades ocurring at the ask or this is the orderbook?

                        As we have "FirstTickOfBar" I want to ask if there is also possible somehow "LastTickOfBar" (to do with rangebars).

                        If this is not possible I want to ask if I can have in the script

                        if(FirstTickofBar
                        && (Last) GetCurrentAskVolume the bar before.....}


                        Thanks
                        Tony
                        Last edited by tonynt; 12-03-2013, 06:51 AM. Reason: clearify

                        Comment


                          #13
                          "GetCurrentAskVolume" returns the level I Ask data that is currently being reported by the broker

                          There is no "LastTickOfBar" because there is no way of knowing when the last tick of bar happens with range bars until the first tick of the next bar comes through.

                          Your condition is possible but you would need to store and track the ask volume in your own variable.
                          LanceNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by dtaylor, 08-07-2022, 09:43 PM
                          7 responses
                          593 views
                          0 likes
                          Last Post Emma1
                          by Emma1
                           
                          Started by RubenCazorla, Yesterday, 03:23 AM
                          2 responses
                          21 views
                          0 likes
                          Last Post RubenCazorla  
                          Started by Rudmax, 07-02-2024, 05:40 AM
                          30 responses
                          430 views
                          1 like
                          Last Post Rogue_Two  
                          Started by Bobin, 03-12-2024, 08:51 AM
                          22 responses
                          745 views
                          0 likes
                          Last Post Schfifty005  
                          Started by CrissCross, Today, 01:34 PM
                          1 response
                          19 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X