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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 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
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X