Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ticker symbol in chart?

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

    Ticker symbol in chart?

    Hello


    Is there a way to turn on the ticker symbol to appear in large letters in the background of the chart? (like many other platforms do, kinda handy)


    Thanks!

    #2
    Hello Irukandji,

    NinjaTrader does not include this functionality, but this would be possible to do using a custom coded indicator.

    I would normally say that the NinjaTrader Support does not create, debug, or modify, code or logic for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.

    But..

    I already had an indicator used to demonstrate how to draw text that I just enlarged the size of the text for. Since its already basically created and took minimal effort I have no issue providing this to you. I'm uploading to the file sharing as others may find this useful.
    https://ninjatraderecosystem.com/user-app-share-download/symbol-watermark/

    The link above is publicly available.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.



    (The original example I am linking below.)
    https://ninjatrader.com/support/foru...609#post541609
    Last edited by NinjaTrader_Jim; 07-27-2021, 06:03 AM. Reason: Update link to User App Share
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea!


      OK, I've imported it successfully but how do I start using it? Is there a way so it automatically adds it to all charts? And is there a way to control the opacity of the text?



      Thanks!

      Comment


        #4
        Hi Irukandji,

        Right-click the chart > select Indicators > select SymbolWatermark > click the add link > click the OK button.

        The indicator can be included with a chart template. Use Default if you want the chart template to load automatically. Below is a public link to the help guide.


        The opacity, size, and color can be set from the indicator parameters.

        (The first upload I forgot to set the panel to 'Same as input'. You might need to set the panel to 1 (or remove the indicator and download and import again)).
        Last edited by NinjaTrader_ChelseaB; 07-08-2018, 10:21 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          Hi Irukandji,



          (The first upload I forgot to set the panel to 'Same as input'. You might need to set the panel to 1 (or remove the indicator and download and import again)).

          How do I remove the old one altogether from the list of available indicators?


          Also - does it load the ticker symbol only, or can it also load the sector, like:



          "WYNN - Casinos & Gaming"


          Thanks.

          Comment


            #6
            Hello Irukandji,

            I've only written it to show the instrument symbol.

            You could modify this to include the description.

            Change
            textLayout = new SharpDX.DirectWrite.TextLayout(Core.Globals.Direct WriteFactory, Instrument.FullName, textFormat, 1000, textFormat.FontSize);

            To
            textLayout = new SharpDX.DirectWrite.TextLayout(Core.Globals.Direct WriteFactory Instrument.FullName+ " - " + Instrument.MasterInstrument.Description, textFormat, 1000, textFormat.FontSize);
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              I've never coded anything in NT8 (or anywhere!) but I'll give it a go


              But first, how do I remove the old one? (I actually have 2 indicators I need to remove now)


              Thanks.

              Comment


                #8
                Hi Irukandji,

                You don't need to remove the old one...

                You can import and replace it when prompted.

                You can also edit this in the NinjaScript Editor.

                But you really want to remove it,

                To remove open source indicators:
                • Click New -> NinjaScript Editor -> select to expand the Indicator folder
                • Right-click the indicator by name -> select Remove

                To remove an open source strategy:
                • Click New -> NinjaScript Editor -> select to expand the Strategies folder
                • Right-click the strategy by name -> select Remove

                To remove a third party assembly package please:
                • Click Tools -> Remove NinjaScript Assembly...
                • Select the assembly to remove -> click the Remove button
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hi Irukandji,

                  (The first upload I forgot to set the panel to 'Same as input'. You might need to set the panel to 1 (or remove the indicator and download and import again)).

                  Is the panel default something I can change in the ninja script?


                  Thanks.

                  Comment


                    #10
                    Hello


                    Few things:


                    1. Changing the opacity number in the indicator settings doesn't seem to change the opacity of the symbol in the chart


                    2. On my charts, the watermark is skewed to the left - how can I position it to be centrally positioned in my charts?


                    3. I edited the ninja script and added the extra instruction to see the sector info - then I hit the save button, but I'm still only seeing the ticker symbol in the watermark - is there another step I need to complete?


                    Thanks!

                    Comment


                      #11
                      Hello Irukandji,

                      The opacity was a mistake. I've corrected this and re-uploaded.

                      The watermark I've set to be in the middle.
                      Have the width of the chart minus half the width of the text.
                      (float)(chartScale.Width / 2) - (float)(textLayout.Metrics.Width / 2)

                      But you can try massaging this how you would like.


                      Yes, after making changes to a script, the script must be compiled. Right-click the code > select Compile. Then the script needs to be reloaded on the chart. Right-click the chart > select Reload NinjaScript.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Hi Chelsea


                        I imported the new version - opacity working now, thanks.


                        But my symbol is still skewed to the left of chart - I took a screenshot of a random chart to show you (attached)


                        Thanks!
                        Attached Files

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hello Irukandji,

                          I've only written it to show the instrument symbol.

                          You could modify this to include the description.

                          Change
                          textLayout = new SharpDX.DirectWrite.TextLayout(Core.Globals.Direct WriteFactory, Instrument.FullName, textFormat, 1000, textFormat.FontSize);

                          To
                          textLayout = new SharpDX.DirectWrite.TextLayout(Core.Globals.Direct WriteFactory Instrument.FullName+ " - " + Instrument.MasterInstrument.Description, textFormat, 1000, textFormat.FontSize);



                          Hi - I ran the compile, but the result is not correct - it doesn't appear to be looking up the master instrument description - is the command wrong somehow? (see images)


                          Thanks!
                          Attached Files

                          Comment


                            #14
                            Hi - update! I was playing around with chart defaults and for some reason, now it is loading the watermark with more information - however.... it is not sector information - it seems to just be the full company name.



                            Thanks (see pic)
                            Attached Files

                            Comment


                              #15
                              Hello Irukandji,

                              I'm not understanding what you are referring to as "sector information".

                              I had misunderstood that you were attempting to add the description that's in the instrument manager to the string.

                              Can you show a screenshot of the value in NinjaTrader you are trying to add to the string in the indicator?
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Max238, Today, 01:28 AM
                              4 responses
                              36 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by r68cervera, Today, 05:29 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by geddyisodin, Today, 05:20 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by timko, Today, 06:45 AM
                              2 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Started by habeebft, Today, 07:27 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post habeebft  
                              Working...
                              X