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:	177
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 SalmaTrader, 07-07-2026, 10:26 PM
          0 responses
          35 views
          0 likes
          Last Post SalmaTrader  
          Started by CarlTrading, 07-05-2026, 01:16 PM
          0 responses
          20 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 06-17-2026, 10:32 AM
          0 responses
          13 views
          0 likes
          Last Post CaptainJack  
          Started by kinfxhk, 06-17-2026, 04:15 AM
          0 responses
          19 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Started by kinfxhk, 06-17-2026, 04:06 AM
          0 responses
          22 views
          0 likes
          Last Post kinfxhk
          by kinfxhk
           
          Working...
          X