Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bad histo bars

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

    bad histo bars

    I tried to print using bars and they came out bent. See the attachment.

    Does anyone know why this is happening?

    Thank you.
    Attached Files

    #2
    Hello,

    Thank you for writing in.

    If all indicators are removed from the chart does the display print normally?
    KyleNinjaTrader Customer Service

    Comment


      #3
      It does print normally when I do that. I still would like to know why it's happening.

      I'm having another issue with histo bars and drawtext. I'm performing a calculation using level 2 data. I've done it before without a problem. Calc on bar close = true. After a price bar closes and prints, the histo bar associated with that price bar continues to move around and change value. The price bar in progress has no histo bar printed yet. The most recent histo bar, that should be set, continues to jump around. Do you know why this is happening?

      Concerning drawtext: I copy/pasted this code from an indicator--level 2 data--so I know it works. But my values are not printing as they should. If it's set to print 40 ticks below the low of a bar, it will sometimes do that and other times print in a random spot. This makes the chart very hard to read. Do you know what could be causing this?

      Thank you.

      Comment


        #4
        Hello imalil,

        Thank you for your response.

        Can you attach the indicator to your response?
        You can attach your indicator to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your Indicator > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.

        Comment


          #5
          Sorry, I'm not allowed to send it out at this time. In general: a calculation is running on level 2 data--it's using total filled bid ask volume of the bar. This works fine. The modification we are playing with is using total placed bid ask volume, filled or not. Everything is the same except for the type of volume. I don't know if this is causing our problem, but everything works fine with filled volume.

          Do you know how we can use total placed bid ask volume the same way we use total filled bid ask volume?

          Thank you.

          Comment


            #6
            imalil,

            I am not certain as I do not know how you are pulling the filled versus placed.

            Comment


              #7
              Understood. Then could you tell me a way to pull these two volume types so they can be used for the same purpose?

              Or: can I pull these two volume types the same or similar way? If so, what is that way?

              I need this type of information so I can do my own troubleshooting first.

              Thank you.

              Comment


                #8
                Hello,

                I wanted to jump back a few posts and answer your initial questions, Kyle had asked to remove the other indicators to which you had replied:

                Originally posted by imalil View Post
                It does print normally when I do that. I still would like to know why it's happening.
                Unfortunately it is hard to say without being able to run the indicators and explore why that is happening, likely something is plotting over the indicator or the scale is being adjusted to fit both which may make the indicator look different. Again these are just guesses as we don't have a sample to see this.

                Originally posted by imalil View Post
                I'm having another issue with histo bars and drawtext. I'm performing a calculation using level 2 data. I've done it before without a problem. Calc on bar close = true. After a price bar closes and prints, the histo bar associated with that price bar continues to move around and change value. The price bar in progress has no histo bar printed yet. The most recent histo bar, that should be set, continues to jump around. Do you know why this is happening?
                I would not be certain what is occurring based on this description, would you be able to simplify the script to a form that demonstrates this and also is something you can provide for us to review? For scripting questions it is easy to guess or make assumptions without seeing the syntax being used.


                Originally posted by imalil View Post
                Concerning drawtext: I copy/pasted this code from an indicator--level 2 data--so I know it works. But my values are not printing as they should. If it's set to print 40 ticks below the low of a bar, it will sometimes do that and other times print in a random spot. This makes the chart very hard to read. Do you know what could be causing this?
                This specifically could be solved using Print() statements. Print the value you are getting to see what value is produced, if it is different than expected or far different than the average result you are seeing, you likely need to adjust logic or find the error in how that value is calculated.


                As for your final question, I believe Patrick was just referring to not knowing what logic you are using so there would be no way to answer that question. In general you could likely use similar logic in the two market data overrides OnMarketData and OnMarketDepth. Again without knowing what syntax you are using I couldnt provide any insight on how to solve your specific question.


                Thank you.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Thanks for the reply. To get total placed bid ask volume I'm using this:

                  protected override void Initialize()

                  {
                  Add("ES 03-16", PeriodType.Tick, 150, MarketDataType.Ask);
                  Add("ES 03-16" , PeriodType.Tick, 150, MarketDataType.Bid);
                  Add(new Plot(Color.FromKnownColor(KnownColor.RoyalBlue), PlotStyle.Bar, "BidandAskVol"));
                  Overlay= true;
                  CalculateOnBarClose = false;
                  }
                  protected override void OnBarUpdate()
                  {
                  BidandAskVol.Set(VOL(BarsArray[1])[0] + VOL(BarsArray[2])[0]);
                  }
                  Ninja CS told me to do it this way. I would like to do it without using a DataSeries. I would like to use a variable, as I do for my total traded bid ask volume. Is this possible? Can you give me another way, with example, to get this volume besides the way I'm using?

                  Thank you.

                  Comment


                    #10
                    Hello,

                    For historical this would be the only way to see ask or bid data or to add the series for each.
                    If historical is not needed, In realtime this is not the case, you could just utilize the GetCurrentAskVolume and GetCurrentBidVolume methods in your equation.

                    Code:
                    BidandAskVol.Set(GetCurrentAskVolume() + GetCurrentBidVolume());
                    I look forward to being of further assistance.
                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks, this gives me a new result, but here's the problem I'm having.

                      My question has to do with the two different types of volume: placed and filled. We have a calculation running on each bar using level 2 data. The volume we are using is the volume that shows in the data box. I'm told that is FILLED volume. Our calculation works fine with this. But as a test, I want to run the calculation using PLACED volume. I used your method:

                      GetCurrentAskVolume()
                      and it works; I get a different ask volume to my output window. And historical is not important. But when our formula runs I get two identical answers even though I'm supposed to be using two totally different kinds of ask and bid volume. So clearly our indicator is using only filled volume even though I'm telling it, using GetCurrentAskVolume() and GetCurrentBidVolume(), to use placed volume.

                      I realize you don't know what our indicator is doing, but how do you force an indicator to use placed volume instead of filled?

                      Thank you.

                      Comment


                        #12
                        Hello,

                        Thank you for the reply.

                        You are correct, I would have no idea how your logic is working. To change the outcome, you would need to see why the values you are using are not being used.

                        There is no real way to force a volume to be used, instead it would just be: have you used that volume in all of your logic?

                        I would suggest using Print statements and print the values in the logic to find where the series volume is being used.

                        If you have a sample of the logic you could provide, I could possibly see the error but likely just using Prints and reviewing the code should allow you to find the answer. If the Volume[0] series is being used or VOL, that would likely be the cause as that is the data series volume.

                        I look forward to being of further assistance.
                        JesseNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by TraderBCL, Today, 04:38 AM
                        2 responses
                        16 views
                        0 likes
                        Last Post TraderBCL  
                        Started by martin70, 03-24-2023, 04:58 AM
                        14 responses
                        106 views
                        0 likes
                        Last Post martin70  
                        Started by Radano, 06-10-2021, 01:40 AM
                        19 responses
                        609 views
                        0 likes
                        Last Post Radano
                        by Radano
                         
                        Started by KenneGaray, Today, 03:48 AM
                        0 responses
                        5 views
                        0 likes
                        Last Post KenneGaray  
                        Started by thanajo, 05-04-2021, 02:11 AM
                        4 responses
                        471 views
                        0 likes
                        Last Post tradingnasdaqprueba  
                        Working...
                        X