Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

2 data series

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

    2 data series

    Hi,
    I use 2 data series in 1 window (2000 tick and 500 tick).
    1. On 2000 uncompleted bar overlaps previous one. I understand it's because 500 chart but is there any way to fix via code? I want the same distance like between previous bars.
    2. On 2000 Chart trader hidden and I can send orders but not on 500. Is it possible to enable it?

    #2
    Hello,

    Thank you for the post.

    Unfortunately this is expected behavior when putting two data series on the same chart; they may not always align in the best way to view their data.

    There are ways to adjust the view, such as changing the Scale Justification of one of the Data Series to 'Overlay' and seeing if that works better for you.

    As for placing orders, to change the instrument you are trading you would want to turn on the Chart Trader temporarily, change the instrument, then turn it back to hidden. Whichever instrument is selected in the Chart Trader will determine where your right-click menu orders are sent.

    Please let us know if you have any further questions.

    Melissa J.NinjaTrader Customer Service

    Comment


      #3
      I can't change instrument bc the same instrument is used in both data series.

      Comment


        #4
        About my 1st question. Overlays isn't option bc it srews up my indicators. Is it possible to redraw this last bar OnRender with same distance as previous bars? As I understand chartControl.Properties.BarDistance doesn't change but it still overlaps.

        Comment


          #5
          Hello Leeroy_Jenkins,

          Thank you for your reply.

          I'm a little confused at what you're asking here. Are you saying you want two bars that are forming at the same time to be next to each other as if they were bars in the same data series?

          I suspect you have your chart set so that equidistant bar spacing is off, so the bars will be spaced according to the time they occur, and overlapping like you're seeing may occur. The only other real choice is to turn on that equidistant bar spacing, but then the 2000 bar will totally overlap with the first 500 bar of that 2000 tick period.

          Thanks in advance; I look forward to assisting you further.
          Kate W.NinjaTrader Customer Service

          Comment


            #6
            equidistant bar spacing is on.
            I wanna fix last unclosed bar on bigger tick chart. As you can see it overlaps previous bar. It overlaps until this bar will be closed. And next bar will overlap previous one etc. I wanna redraw it if it possible. Or change distance between previous one.


            Comment


              #7
              Hello Leeroy_Jenkins,

              Thank you for your reply.

              I'm not able to reproduce this on my charts using Equidistant bar spacing; however, I think it may be related to a known expected issue that occurs with non-time based bars such as tick bars. Here's a screenshot of what I am seeing on my chart:

              Click image for larger version

Name:	2020-03-31_1054.png
Views:	450
Size:	68.7 KB
ID:	1092470
              Note that the bars are overlaid on top of each other, not partially overlapped like you've got.

              What version of NinjaTrader are you running? You can find this under Help > About - the current version is 8.0.21.1.

              Would you be able to supply a screenshot of the settings you have for each data series in the Data Series window?

              How the bar is drawn would be controlled by the ChartStyle. You could consider trying to customize where the last bar is drawn; the ChartStyle class does the actual drawing to the chart and is where you would use SharpDX objects to render bars, and whatever else you would like to accompany the bars (like text).

              You may browse the source code for the built in ChartStyles by opening a NinjaScript editor, and on the right, in the folders list, there will be a folder named ChartStyles.

              To fully understand SharpDX and how the rendering works and I recommend you look at the SampleCustomRender file inside of the Indicators folder.

              Drawing on the chart will take place in OnRender() within your ChartStyle class.

              Please see the following links for more information:

              Using SharpDX for Custom Chart Rendering - https://ninjatrader.com/support/help..._rendering.htm

              ChartStyle - https://ninjatrader.com/support/help...hart_style.htm

              Please let us know if we may be of any further assistance.

              Kate W.NinjaTrader Customer Service

              Comment


                #8
                NT8 8.0.21.1 64-bit
                I created new chart, no indicators. Problem still exists.

                Comment


                  #9
                  Here is video
                   

                  Comment


                    #10
                    Hello Leeroy_Jenkins,

                    Thank you for your replies.

                    The video you provided confirms this is expected behavior.

                    This would be expected since time stamps change for last bars. So one is later than the other and with next tick it could be opposite.

                    On multiseries equidistant charts, all bars are lined up according to their timestamps. e.g. you have a 10 tick series A with last bar time = 01/22/2020 1:37:01 AM at bar slot 100. and a 10 tick series B with last bar time = 01/22/2020 1:37: 03 AM at position 101. Now we get a tick for A, which changes timestamp to 01/22/2020 1:37:05 AM (without creating a new bar). This changes the last bar of B to go to slot 100 and last bar A go to slot 101 --> both bars jump, A forward, B backwards.

                    What you're seeing in your video is this occurring, but basically it's because the primary series gets updated, then the secondary, which moves the timestamp of the secondary bar and causes the squishing up of the bars.

                    This would be a limitation of using NinjaTrader with multiple tick based data series on the same chart.

                    Please let us know if we may be of further assistance to you.
                    Kate W.NinjaTrader Customer Service

                    Comment


                      #11
                      Is it possible to fake last bar time to fix this behavior?

                      Comment


                        #12
                        Hello Leeroy_Jenkins,

                        Thank you for your reply.

                        From my research it appears to be a limitation of NinjaTrader and would be expected to occur.

                        Creating your own BarsType would allow you to place a bar whereever you like, however; as you'd still have two series on the chart, you may still have some effects from this.

                        To create your own custom bar types, you must understand the BarTypes class as well as the ChartStyle class. The BarsType class allows you to manipulate, organize, and present data that will eventually be drawn to your chart with a ChartStyle class. You may browse the source code of BarsType and ChartStyle by opening a NinjaScript editor, and looking at the included BarsTypes there.

                        Please see the following link for more information on BarsTypes:

                        BarsType - https://ninjatrader.com/support/help...?bars_type.htm

                        Please let us know if we may be of any further assistance.
                        Kate W.NinjaTrader Customer Service

                        Comment


                          #13
                          Ok.
                          How to enable hidden chart trader on lower chart? On upper chart it works. I need that right click menu to send orders.

                          Comment


                            #14
                            Hello Leeroy_Jenkins,

                            Thank you for your reply.

                            To change which instrument Chart Trader is enabled on when you have more than one instrument on the chart, you will need to make Chart Trader temporarily visible, then change the Instrument dropdown menu to reflect the instrument you wish to use Chart Trader with. Here's a screenshot showing the Instrument dropdown you need to change:

                            Click image for larger version

Name:	2020-04-01_1038.png
Views:	388
Size:	135.9 KB
ID:	1092636
                            Once you've changed to the desired instrument, you can hide Chart Trader again and any trades you place will be sent to the selected instrument.

                            Please let us know if we may be of further assistance to you.
                            Kate W.NinjaTrader Customer Service

                            Comment


                              #15
                              I have the same instrument in both charts so I can't change instrument in chart trader.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Barry Milan, Yesterday, 10:35 PM
                              4 responses
                              15 views
                              0 likes
                              Last Post Barry Milan  
                              Started by DanielSanMartin, Yesterday, 02:37 PM
                              2 responses
                              13 views
                              0 likes
                              Last Post DanielSanMartin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              4 responses
                              12 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by terofs, Today, 04:18 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post terofs
                              by terofs
                               
                              Started by nandhumca, Today, 03:41 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post nandhumca  
                              Working...
                              X