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

Draw.TextFixed places text in indicator pane as wished, however

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

    Draw.TextFixed places text in indicator pane as wished, however

    i have one indicator where i'm adding TextFixed to display the indicator's current value and that indicator is not on Panel 1 but the text box with its proper background color prints in the margin of the indicator where it should be even though the indicator is on Panel 3 and it is an indicator that uses OrderFlowCummulativeDelta and the CumulativeDelta bars are placed in Panel 3 so the indicator plots plot over the Cumulative Delta Bars.
    I'm adding indicator values to another indicator which i would like to plot in the margin of the indicator (on Panel 5) but as goes TextFixed the text boxes are plotting on Panel 1...

    Why does the CumulativeDelta overlay indicator print its TextFixed bottom.right in the indicator panel when it should be plotting on Panel 1 - is it based on what panel contains the input data for that indicator ? that's the only thing i can figure out...

    Do i need to use some other printing method to get the text boxes to plot within the same panel as their indicator ?

    #2
    i think i figured it out, just too late to try it tonight... using Draw.TextFixed = make a separate indicator that loads data from my sub-panel indicator and placed in that sub-panel to print the 2 necessary indicator values in the right margin of the indicator panel...
    is there a way to achieve this using SharpDx... i've had a little success creating text in the main panel margin using it...

    Comment


      #3
      Hello stafe,

      Thank you for your inquiry.

      Draw.Text fixed will always draw on Panel 1. This method draws text in one of 5 available pre-defined fixed locations on panel 1 (price panel) of a chart.



      You can create text using SharpDX.

      Using SharpDX for custom chart rendering - https://ninjatrader.com/support/help...XTextRendering

      I also recommend taking a look at the "SampleCustomRender" indicator included in the platform which demonstrates using SharpDX and draws text in the lower right hand corner of the chart.

      Please let us know if you have any further questions.
      Gaby V.NinjaTrader Customer Service

      Comment


        #4
        i guess i found a loop-hole you don't know about... i'll include my cumulativedeltaV3bidask indicator so you can try it out for yourselves... i added a text element in the right margin using Draw.TextFixed and it stays with the indicator that is applied to OrderFlow_cumulative_delta bid/ask bars CumulativeDeltaV3bidask.cs ... i'll tinker later today if i get the chance and build one that uses my TSIhisto indicator (similar to MACD but using TSI) for data input... it could be that this "quirk" only works with a bar series - which may be the way OFCD was coded but since the source is hidden i just don't know.... but heaven's whatever you do please don't change the OFCDbars code so that my "quirk" doesn't work any longer...

        the section of code that prints the CD value in the bottomright of the indicator panel is line 384

        forgot to mention, but it may be clear, the input for the attached indicator needs to be OFCDbid/ask bars...
        Attached Files
        Last edited by stafe; 04-08-2024, 12:29 PM. Reason: forgot to mention but ""it"" may be clear

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NM_eFe, Today, 10:13 AM
        0 responses
        3 views
        0 likes
        Last Post NM_eFe
        by NM_eFe
         
        Started by hdge4u, Yesterday, 12:23 PM
        1 response
        10 views
        0 likes
        Last Post hdge4u
        by hdge4u
         
        Started by 1001111, Today, 09:45 AM
        0 responses
        12 views
        0 likes
        Last Post 1001111
        by 1001111
         
        Started by DTSSTS, 01-28-2024, 12:07 PM
        11 responses
        559 views
        0 likes
        Last Post bmo111
        by bmo111
         
        Started by Torontobluejays, Today, 08:43 AM
        0 responses
        3 views
        0 likes
        Last Post Torontobluejays  
        Working...
        X