Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Pivot Indicator Not Working

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

    Simple Pivot Indicator Not Working

    Hello world. I've attached this simple indicator that I'm working on. For some reason it won't load the data. I use it on a Range bar chart. It's purpose is to take data from multi-time frame (dailyBars). Please look at attached and help if possible.
    Attached Files

    #2
    Hello ginx10k,

    Thank you for your post.

    Your issue is that you're checking if the secondary series has at least BarsRequiredToPlot bars loaded before plotting:

    if (CurrentBars[0] < BarsRequiredToPlot || CurrentBars[1] < BarsRequiredToPlot)
    return;

    Since this is a 1 day series, you'd need to have at least 20 days of data loaded for this to plot anything.

    Try changing that to this:

    if (CurrentBars[0] < BarsRequiredToPlot || CurrentBars[1] < 1)
    return;

    You should then see it plot if at least 1 day of data is loaded on the chart.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Hi Kate. so I just tried what you suggested, and I still get no plot and just an error. I also tried
      Code:
      if (CurrentBars[0] < 1)
      and still nothing.

      Comment


        #4
        Hello ginx10k,

        Thank you for your reply.

        I'm attaching the script with the change I made and I can confirm this is working on my end. Please see the screenshot below:

        Click image for larger version

Name:	2021-10-08_11-52-29.png
Views:	159
Size:	71.7 KB
ID:	1174231

        I would suggest comparing your script with the one with my change below to see what may be different between the two.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Kate, thank you so much. it works well. I appreciate it.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          571 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          330 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
          548 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          549 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X