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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          629 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          564 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X