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

DrawText into Data Box

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

    DrawText into Data Box

    At (Bars.DayBreak) I have a computed value I need to display

    It seems the data box is not "API available" - unless something has changed?

    I tried to plot it adjacent to e.g. the lower chart boundry as a unique object using DrawText - but I'm not sure how to reference the y position. Is there a way to determine the lower chart y-scale boundry to use as y-value?

    It seems if I use DrawFixed I can only keep a single value displayed - which would be ok if there was a way to make that dependent on the cursor position.

    Any thoughts welcome!

    thanx
    tb

    #2
    Likely would need to override the Plot() method. Check out the CustomPlotSample indicator.
    RayNinjaTrader Customer Service

    Comment


      #3
      Ray, thanks - that was quick!

      Is there a way to have a user defined data series display in the data box?

      On some occasion I had an empty colored field showing up in the databox, not sure when that happened though...

      Comment


        #4
        Only DataSeries objects that are part of the Values collection will show up in the DataBox. Calling Add() to add a plot will add a DataSeries object to this collection. Thus, only DataSeries objects that are used to store values that are plotted will display.
        RayNinjaTrader Customer Service

        Comment


          #5
          One idea - for the "wishlist" - would be if you could just "nail" the y position to Top or Bottom (relative to the chart window at time of drawing) and have the x position selectable, kind of a crossing between DrawText or DrawTextFixed

          Maybe extending the TextPosition enumeration for DrawTextFixed to "BottomCurrentBar" or "BottomFloating" (etc.) would help.

          Comment


            #6
            Thank you for the suggestion. We will put it on the list of future considerations.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by tb2000 View Post
              One idea - for the "wishlist" - would be if you could just "nail" the y position to Top or Bottom (relative to the chart window at time of drawing) and have the x position selectable, kind of a crossing between DrawText or DrawTextFixed

              Maybe extending the TextPosition enumeration for DrawTextFixed to "BottomCurrentBar" or "BottomFloating" (etc.) would help.
              This is possible.
              Override the Plot method.
              Use the bounds parameter for your Y offset. It has a variety of properties like bounds.Top, bounds.Bottom that you can use to accurately place your text or symbols on the chart regardless of where the Price bars change the Y Axis

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by suroot, 04-10-2017, 02:18 AM
              4 responses
              3,021 views
              0 likes
              Last Post truepenny  
              Started by Stanfillirenfro, Today, 07:23 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              2 responses
              22 views
              0 likes
              Last Post cmtjoancolmenero  
              Started by olisav57, Yesterday, 07:39 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by cocoescala, 10-12-2018, 11:02 PM
              7 responses
              944 views
              0 likes
              Last Post Jquiroz1975  
              Working...
              X