Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Know the time frame in realtime

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

    Know the time frame in realtime

    How can I know the time frame of my chart in real time? I want to print it, for example, in the output window. So if my Automatic Strategie is working in Fut. S&P in a chart of 5 minutes, I would like to have a variable with "5 minutes".

    Thanks.

    #2
    Originally posted by soyjesus View Post
    How can I know the time frame of my chart in real time? I want to print it, for example, in the output window. So if my Automatic Strategie is working in Fut. S&P in a chart of 5 minutes, I would like to have a variable with "5 minutes".

    Thanks.
    if (BarsPeriod.Id == PeriodType.Tick && BarsPeriod.Value > 100)
    Print("This is a tick chart of over 100 ticks per bar");

    Other possibilities are PeriodType.Range, PeriodType.Minute, etc. the BarsPeriod.Value is length.

    Mike

    Comment


      #3
      Ok, solved. Thank you very much, Mike.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      86 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
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      67 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X