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

Right Side Margin Problem

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

    Right Side Margin Problem

    In my trading charts, together with the price candles, I also use a customized Panel in the right side margin.

    However, I have a problem when my indicators "Draw" arrows, triangles, dots onto my Price panel. While they print okay in real-time, when I scroll back they all continue to be displayed on top of my Panel itself (which is on the right margin) rather than being hidden underneath over past data/time. They don't behave like the actual price candles do for back data, that are automatically hidden behind the "right-side-margin" I specify under the chart settings.

    Can someone please let me know what I'm doing wrong ? or is there a separate keyword for that that I should check to print drawing into the right-side-margin ?

    See attachment.


    #2
    Hello,

    So the custom panel you have is NOT covering price bars? Or is it?

    If there are no price bars under the panel, do the arrows work in the same way if you do not have the panel on the chart? Can you provide a screen shot of it?
    DenNinjaTrader Customer Service

    Comment


      #3
      In real time my chart has a right-margin set to around 230 so that I have room for placing the custom panel on the price charts on the right side.

      Then in real time, as the candles paint on panel-1, the most recent is always offset by 230, so that it is closest to the left-side edge of my custom panel. In real-time then my custom panel is NOT covering price bars. Also, all of my indicator "Draw.." commands print the appropriate arrow, triangle etc on the price panel at the correct locations.

      However, the problem manifests when I scroll the chart backwards in time. At this time the price candles still obey my charts setting and when scrolling left, the right-most candles do not display beyond the right-margin setting ( and they do not paint under my custom panel either), which is the correct behavior. You can confirm this in the pic.

      But, the problem continues with "Draw.." objects that where painted on the price panel. As I scroll left they continue to be visible and pass over/under the panel area as I continue to scroll leftwards. In the picture I have circled these in red.

      Also you will notice in the picture, my screen consists of panels 1-4. The first is the price panel (1), the second a cci plot (2), third a custom ergotic plot (3) and lastly another custom indicator (4). These additional indicator panel also seem to display the same behavior, with the actual plot lines obeying the charts right-margin settings but not the "Drawing.." objects as they still seem to trespass into the right-margin area under the custom panel area above in panel 1.

      Hope this clarifies. Its been a bit long-winded though. How can I resolve these issues ?

      I'll try to post another pic of the screen if possible.

      Comment


        #4
        Hello,

        I'm not sure I can help because its a custom indicator. If the issue is with the platform or the draw method I can assist. From the sounds of what you mentioned it is niether of those.
        DenNinjaTrader Customer Service

        Comment


          #5
          I think this is not related to the custom panel or indicators. It looks like in NT "Drawn.." objects don't appear to honor the right-side-margin settings for the chart.

          In the screen shot below even after removing the custom panel, the indicator signals will still show up within the panel area but the "plots" will not. It doesn't seem to matter which panel it is, price or indicator.



          Hope this can be resolved.

          Comment


            #6
            Hello,

            Yes, I think you correct. Drawing objects is not permitted in the margin areas.

            I will have someone confirm this on Monday though.
            DenNinjaTrader Customer Service

            Comment


              #7
              Hi Webby,

              can confirm your observation for objects drawn by extending the Plot()-method, same behavior. Wouldn't say this is wrong necessarily, it depends on what you are trying to do. I don't know any trick how to switch this behavior on or off. Guess it would be a request to NT to provide such a switch.

              Regards
              Ralph

              Comment


                #8
                I think the work-around here would be to manage the opacity of the draw area required for the panel, making it opaque so that other indicators "drawn" on price will be hidden behind that opacity setting.

                Need to research some more.

                Comment


                  #9
                  Sounds like something to be done in Plot(). There you have the freedom to place an opaque rectangle of any shape/size you desire.

                  Regards
                  Ralph

                  Comment


                    #10
                    Just to confirm, do you guys have a reference indicator I can throw onto my charts along with instructions of how to reproduce? Thanks.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Josh,

                      the example indicator draws a rectangle into the future to the right side. If you increase the right side margin, the rectangle is not influenced by the margin, it "overwrites" the margin.

                      Regards
                      Ralph
                      Attached Files

                      Comment


                        #12
                        I see. So you guys are working purely in Plot()? This is expected behavior then. The workaround you suggested earlier may be viable to get your desired behavior.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          In future updates to the platform though, it would be good to have all the "Draw" commands honor the chart right margin settings. Thats would be the most desirable behavior.

                          Comment


                            #14
                            Originally posted by Webby View Post
                            In future updates to the platform though, it would be good to have all the "Draw" commands honor the chart right margin settings. Thats would be the most desirable behavior.
                            ... but please as an option (and not general behavior). Because it may be desirable to plot objects around or at the right side of the last bar, which one would like to see as a whole and not cut by the margin area.

                            Regards
                            Ralph

                            Comment


                              #15
                              NinjaScript draw methods do not draw into the right side margin. Anything you do in the Plot() method is outside NinjaScript and into more generic C#. From the Plot() method you can draw however you want. NinjaScript draw are limited to the most recent bar.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by michi08, 10-05-2018, 09:31 AM
                              3 responses
                              740 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by sightcareclickhere, Today, 01:55 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post sightcareclickhere  
                              Started by Mindset, 05-06-2023, 09:03 PM
                              9 responses
                              258 views
                              0 likes
                              Last Post ender_wiggum  
                              Started by Mizzouman1, Today, 07:35 AM
                              4 responses
                              18 views
                              0 likes
                              Last Post Mizzouman1  
                              Started by philmg, Today, 01:17 PM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Working...
                              X