Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

General Question

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

    General Question

    I made a simple code:

    Code:
     if(ToTime(Time[0]) == 93000) { Print("Occurred"); }
    within a 30 day chart.

    Why does this code print out more then 30 times? It prints it over 7000 times for each bar. Shouldn't it just print 30 times... once for each day?

    #2
    Maciek, in which kind of chart / timeframe have you applied this script / conditon?

    Comment


      #3
      I have this in a 1 minute chart, but my chart also incorporates information from the tick chart... using

      Code:
      Add(PeriodType.Tick, 1);
      How can I prevent my code from using that tick chart in that instance. Its weird since it is applied to a 1 minute chart but uses the tick chart data.

      Comment


        #4
        If you added a series in, then all series will call the OnBarUpdate() method, triggering your code.

        To select which series calls should make it through, you would need to filter code parts by using BarsInProgress -

        Comment


          #5
          Ohh nice. thats cool thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          174 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          329 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          252 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          356 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          182 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X