Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Outputing the period

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

    Outputing the period

    When I am looking to send to the output window the instrument, I would use Instrument.FullName

    Is there a way to output what chart period the script is running on? like for instance 60 min.

    thank you.

    #2
    Hello spikebuck77,
    Thanks for writing in and I am happy to assist you.

    You can use the below code to print the period id and its value
    Code:
    Print("PeriodType= " + this.BarsPeriod.Id.ToString() + " PeriodValue= " +  this.BarsPeriod.Value.ToString());


    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Exactly what I was looking for, thank you.

      Comment


        #4
        Originally posted by spikebuck77 View Post
        When I am looking to send to the output window the instrument, I would use Instrument.FullName

        Is there a way to output what chart period the script is running on? like for instance 60 min.

        thank you.
        Code:
        Print("Chart Period: " + BarsPeriod.Value + " " + BarsPeriod.Id.ToString());

        Comment


          #5
          Hello spikebuck77,
          Thanks for your response.
          Please let me know if I can assist you any further.
          JoydeepNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          164 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          317 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          350 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X