Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Floating image or text indicator

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

    Floating image or text indicator

    Click image for larger version

Name:	sample image.JPG
Views:	706
Size:	89.3 KB
ID:	1175763 I would like to create a simple indicator that is essentially a floating message, with an x/y coordinate away from the closing price so that the message moves with price and never moves out of view like a static text block would do. Does something like this already exist as an indicator? ...or can someone point me in the right direction as far as creating it within NT8?

    #2
    Hello BullyWig Trader,

    Thanks for your post.

    I am not aware of an existing indicator that accomplishes your goal.

    That said, this could be accomplished using SharpDX DrawTextLayout to custom render text on a chart in a static location using x and y coordinates.

    See the help guide documentation below for detailed information about using SharpDX methods for custom rendering.

    Using SharpDX For Custom Rendering: https://ninjatrader.com/support/help...sharpdx_for_cu stom_chart_rendering.htm

    SharpDX DrawTextLayout: https://ninjatrader.com/support/help...textlayout.htm

    Also, see the attached example script, SharpDXDrawTextLayout, which demonstrates this.

    And, see the SampleCustomRender indicator which comes default with NinjaTrader.

    To view the code of a script, you would open a New > NinjaScript Editor window, open the Indicators folder, and select the script you would like to view.

    Let us know if we may assist further.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Most importantly, can the static x/y points be anchored to price so that it actually floats along with price? That's what i am looking for; not sure if that was clear or not. thanks for your response.

      Comment


        #4
        Hello BullyWig Trader,

        Thanks for your note.

        Yes, it would be possible for the text to move along with the price of the current bar.

        You would use ChartControl.GetXByBarIndex(ChartBars, CurrentBar) to get X coordinate of the last bar and use that for the 'float x' value in the previously attached script. For the 'float y' value in the previously attached script, you would use chartScale.GetYByValue(Bars.GetClose(Bars.Count - 1) to move the text along the Y-axis.

        See the help guide documentation below for more information.
        ChartControl.GetXByBarIndex() - http://ninjatrader.com/support/helpG...bybarindex.htm
        ChartScale.GetYByValue() - http://ninjatrader.com/support/helpG...etybyvalue.htm

        Let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          On a related note, do you know of an (ecosystem) indicator that allows me to display a smaller image of a chart within a full sized chart?

          I've seen it before but can't find that indicator now. Could you please help? Thanks in advance​.

          Comment


            #6
            Hello oldporkchops,

            I am not aware of an item like that myself, if any users know of that item they will certainly post here. If it was originally on the ecosystem you may need to browse through the files on there to see if anything looks similar or if you can spot the one you had previously seen.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            549 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            549 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X