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

How to make offset/displacement of plot?

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

    How to make offset/displacement of plot?

    in other platforms, it is possible from current bar, to plot (or draw) on next bar, called offset (i.e. Tradingview for example).
    however in NT neither plots nor drawing objects accept parameter to put that on "next bar". only the "dirty" trick I do is with time-based charts where i can draw on next bars (with predetermined time-period bars by c# AddMinutes method for time argument ).

    is there any better solution?

    #2
    Hello ttodua,

    Using negative indexes or trying to project into the blank space to the right of the Data Series bars on the chart is not officially supported.


    You can custom render anywhere you would like in OnRender() if you wanted to write some estimation logic on your own to decide where to render things.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3

      all other platforms support that.
      Well, things are very simple, just the dev. team didn't take attention to that. concept is also simple: the next "index" of bar is just one additional same space as the current bar spacing.
      take this example: https://i.imgur.com/kJ8n7Wp.png
      this is an easy thing for NT devs to add that feature (overload) of methods for Draw. (i.e. Draw.Text) to accept the "Number" (which can be i.e. "CurrentBar + 7") and just draw the element 7 slots right than current bar. We (vendors) are having problems for that reason as we cant convert scripts from other platforms for this simple reason.
      (I know that "we can create custom render functions " but you (NT DEVS) could make things simpler without us needed to "custom code " the complex code-blocks for that simple thing. )

      so, please submit feature request (or add the vote if exists).
      Last edited by ttodua; 06-29-2020, 01:55 AM. Reason: feature_request_tt

      Comment


        #4
        Moreover, i think it's something strange that NT support talks about "impossibility" of totally and absolutely simple feature, while it actually already exists.
        add any indicator on chart and change the "Displacement" value and you will see it quite well plots on "next empty bars":Click image for larger version  Name:	UpQckZT.png Views:	0 Size:	58.3 KB ID:	1107121


        so, please just come'on and dont say unreal things. just please tell dev' team to add that feature from coding too for individual plots or drawing elements.

        Comment


          #5
          Dear NT, submit this as feature request.

          Also, can you tell me how to use OnRender to make drawings in "future"?

          I've tried to detect the slots by :

          for (int idx = ChartBars.FromIndex; idx <= ChartBars.ToIndex; idx++)

          however, the ".ToIndex" property loops till last visible bar, and thus i cant get any access to "future" space.
          So, any hints?

          Comment


            #6
            Hello ttodua,

            You can basically custom render whatever you want wherever you want within the chart area. Drawing objects specifically haven't been designed to use negative indexes. This means I am not saying unreal things.
            I am happy to submit a feature request on your behalf. Once I have a tracking ID for the request I will post in this thread for future reference.

            The ChartBars.FromIndex and ChartBars.ToIndex are for the chartbars, giving the index of first bar and last bar. This doesn't include bars that do not exist.

            If you are wanting to look into slots and not where there is a bar in ChartBars, you may want to use ChartControl.LastSlotPainted or GetSlotIndexByX.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello ttodua,

              This request is being tracked with ID# SFT-5043.

              As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

              Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by cre8able, Yesterday, 09:15 PM
              2 responses
              14 views
              0 likes
              Last Post cre8able  
              Started by Trader146, Today, 09:17 PM
              0 responses
              6 views
              0 likes
              Last Post Trader146  
              Started by ttrader23, 05-08-2024, 09:04 AM
              9 responses
              43 views
              0 likes
              Last Post ttrader23  
              Started by ZeroKuhl, Yesterday, 04:31 PM
              8 responses
              46 views
              0 likes
              Last Post ZeroKuhl  
              Started by reynoldsn, Today, 07:04 PM
              0 responses
              11 views
              0 likes
              Last Post reynoldsn  
              Working...
              X