Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A little transformation

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

    #31
    Patrick-


    Thank you, now it finds the second highest volume as it should, but the most of red bars are painted yellow as well for some reasons now... I can't get why...


    Arthur

    Comment


      #32
      Hello Arthur,

      Thank you for your response.

      Can you provide a screenshot of the red bars being colored yellow?

      I look forward to your response.

      Comment


        #33
        Patrick-


        Thanks a lot for your help! I decided to leave just a first part of indicator. I think it would take a while to sort it out completely as well as I can see what I need more clearer now after a first implementation.

        But since the actual Bid and Ask volume figures differt per each bar, could you please suggest me the best way to compare those. If I use Bid chart, how should I find a volume of the current bar from Ask chart in order to compare it within indicator condition?


        Many thanks,
        Arthur
        Last edited by FxInception; 10-25-2013, 07:50 PM.

        Comment


          #34
          Hello Arthur,

          Thank you for your response.

          You can use GetCurrentAsk() and GetCurrentBid() and still use last for the Price Based On on your chart.

          For information on GetCurrentAsk() please visit the following link: http://www.ninjatrader.com/support/h...currentask.htm

          For information on GetCurrentBid() please visit the following link: http://www.ninjatrader.com/support/h...currentbid.htm

          Please let me know if I may be of further assistance.
          Last edited by NinjaTrader_PatrickH; 10-28-2013, 05:04 PM.

          Comment


            #35
            Patrick-


            So, if I want to find a mean volume ((Bid volume + Ask Volume)/2), will the following be correct?

            double MeanVol = (Volume [GetCurrentAsk(0)] + Volume [GetCurrentBid(0)]) / 2


            Thank you,
            Arthur

            Comment


              #36
              Hello Arthur,

              Thank you for your response.

              You would use GetCurrentAskVolume() and GetCurrentBidVolume():
              Please let me know if I may be of further assistance.

              Comment


                #37
                Hello Patrick,


                I found that GetCurrent... and GetCurrent...Volume works only in real time, but I would like to check the historical values as well.

                Let suppose I have ES 12-13 1 min Bid and ES 12-13 1 min Ask charts on separate panels as well as their volumes.

                Is it any way to call a volume or any other indicator values from a particular chart?


                Many thanks,
                Arthur

                Comment


                  #38
                  Hello FxInception,

                  Thank you for your post.

                  There is no method to pull the historical bid or ask volume, but you can pull historical volume using Volume[barsAgoIndex]: http://www.ninjatrader.com/support/h...t7/volume2.htm

                  Please let me know if I may be of further assistance.

                  Comment


                    #39
                    Hello Arthur,

                    I think you should be able to save the historical bid and ask values in a DataSeries object and refer to them later in your strategy.

                    Pls see here


                    Cheers!
                    StockFundoo

                    Comment


                      #40
                      Hello guys,


                      I'm pretty sure that there are strateges like: if ES 12-13 Bid volume is higher than 20000, we buy or sell CL... or something like that...

                      So how to call that indicator values from a particular chart series?

                      Stock Fundoo,

                      what shoud I type in brackets then?

                      myDataSeries.Set (.........);

                      and I should use Volume(MyDataSeries,....) after?


                      Many thanks,
                      Arthur

                      Comment


                        #41
                        Hi Arthur,

                        I think following should provide the Bid Ask volume:
                        GetCurrentBidVolume(0)
                        GetCurrentAskVolume(0)

                        So, what can be done is something like:

                        private DataSeries BidDataSeries;

                        // to save bid vol in data series
                        BidDataSeries.Set(GetCurrentBidVolume(0));

                        // to retrieve the data

                        myBidVol = BidDataSeries[0];

                        Below link provides lot of adddtional information:


                        Hope this helps!

                        Comment


                          #42
                          Hello FxInception,

                          Thank you for your response.

                          StockFundoo is correct on how to call the Bid or Ask Volume in a multiple time frame script:
                          Originally posted by StockFundoo View Post
                          Hi Arthur,

                          I think following should provide the Bid Ask volume:
                          GetCurrentBidVolume(0)
                          GetCurrentAskVolume(0)
                          The '0' is the barsInProgress index, zero being the primary bar series. For information on using multiple time frames in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

                          And the information for storing the Data Series for the Bid and Ask Volume is correct as well. This will only store data from when your strategy or indicator first starts and nothing before.
                          Originally posted by StockFundoo View Post
                          So, what can be done is something like:

                          private DataSeries BidDataSeries;

                          // to save bid vol in data series
                          BidDataSeries.Set(GetCurrentBidVolume(0));

                          // to retrieve the data

                          myBidVol = BidDataSeries[0];

                          Below link provides lot of adddtional information:


                          Hope this helps!
                          Please let me know if you have any questions.

                          Comment


                            #43
                            Thank you both for explanations!

                            It really helps to create a real-time indicator according to my needs.

                            Lets forget about the volumes for a second. If I work on CL chart, is it possible to create an indicator based on ES or any other chart in general?


                            Many thanks,
                            Arthur

                            Comment


                              #44
                              Hello Arthur,

                              Thank you for your response.

                              It is possible to do this via code or even through the Indicators and Data Series menu on the chart. please visit the following link for a video on setting this up in the chart: http://youtu.be/x_6BN5SIiig

                              For information on using another time frame or instrument in your code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

                              Please let me know if I may be of further assistance.

                              Comment


                                #45
                                Patrick-


                                Is it possible to add a note to a following line, which price it is based on?

                                Add("AAPL", PeriodType.Minute, 1);


                                Maybe something like this:

                                Add("ES 12-13 Bid", PeriodType.Minute, 1);
                                or
                                Add("ES 12-13", PeriodType.Minute, 1-Bid);


                                Thank you,
                                Arthur

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                601 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                347 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                103 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                559 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                558 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X