Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Display "Session Template" on a chart

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

    Display "Session Template" on a chart

    Hi there,

    Does anyone know how to display the "Session Template" a chart is currently using, on the chart itself? For example, "CME FX Futures RTH".

    Perhaps there is an indicator which does this, or, I could write a simple indicator to do this?

    Thanks advance,
    Michelle

    #2
    Hello,

    Yes this is possible and could be done from an indicator. I was unable to locate anything that does this specifically already although there may be something in the sharing section that I am unaware of.

    if you would like to create a indicator you could use the following steps and syntax:
    1. Click Tools -> new NinjaScript -> Indicator
    2. Click Next
    3. Give the indicator a name and the click Generate.
    4. In the file that opens, Replace the line:
      Code:
      Plot0.Set(Close[0]);
    5. with
      Code:
      DrawTextFixed("myText", Bars.Session.TemplateName, TextPosition.TopRight);
    6. And the press F5 or right click and compile.


    You should now be able to apply this to the chart and see the name, this would be the most basic/simple way to display this.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse for your reply however the solution is not what I am after. When I say "Session Template" I mean that I want the value of Data Series > Session Template > "whatever it is set to" to be displayed (for example, Default 24/7)

      Following your solution I had "NQ 12-16 (60min),1) displayed as shown in the attached screenshot.
      Attached Files

      Comment


        #4
        Originally posted by michellepace View Post
        Thanks Jesse for your reply however the solution is not what I am after. When I say "Session Template" I mean that I want the value of Data Series > Session Template > "whatever it is set to" to be displayed (for example, Default 24/7)

        Following your solution I had "NQ 12-16 (60min),1) displayed as shown in the attached screenshot.
        Time for a visit to the eye doctor perhaps? It says "Default 24x7" in the top right of your image?

        Comment


          #5
          Originally posted by sledge View Post
          Time for a visit to the eye doctor perhaps? It says "Default 24x7" in the top right of your image?
          Ooops!!

          Thanks!

          Comment


            #6
            Originally posted by michellepace View Post
            Ooops!!

            Thanks!
            While you are about it, make Overlay true: there is no need to waste screen real estate with an empty indicator display.

            Comment


              #7
              Thank-you very much to everyone.

              I have attached the indicator ShowSessionTemplate.xml (copy to Documents\NinjaTrader 7\templates\Indicator) which appears in the top right hand corner of a chart should anyone else find it useful.

              The chart template I am using is A_Default.xml (copy to Documents\NinjaTrader 7\templates\Chart) . See screenshot attached.
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              89 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              48 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              31 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              34 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              69 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X