Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

modify PriorWeekHOLC

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

    modify PriorWeekHOLC

    Good morning, does anyone know how I can modify the PriorWeekOHLC indicator to show not only the levels of the previous week, but also the levels of all the previous weeks loaded on the chart? i.e., during the current week, the levels of several previous weeks would be shown.
    the easiest would be that the original indicator does not end and continues, but that interferes with the start of new levels.​

    #2
    Hello micaeligleasias,

    Thank you for your post.

    Are you trying to display all the previous weeks in addition to the current? In that case you would need to modify it to use Drawing Objects instead of plots since there is no way to know before hand how many AddPlot() calls are needed based on the how many days are going to be loaded.

    I'm not sure which PriorWeekOHLC indicator you are using but the one from the Ecosystem already has logic for the day of week, so you can use that to generate new tag names for each drawing object.

    Please let us know if you have any further questions.

    Comment


      #3
      Thank you very much for the answer, I have already tried to do it with drawhorizontallines, and visually it is fine, but the problem is that when I stop using plots, SBuilder does not allow me to interact with these levels, (I try to add to my builder strategy some way to indicate that there are areas so that tickets are not taken when the price is going to confront them)
      *(Are you trying to show all previous weeks in addition to the current one? In that case, you would have to modify it to use drawing objects instead of plots, since there is no way to know in advance how many AddPlot() calls are needed based on of the number of days to be loaded.) That's right, I'm trying to do exactly that, if the problem is that you need to know in advance how many addplots are needed, I would settle for the last 4 weeks, since I really only need the high and low levels, so there would be 8 different plots. Would that help find a possible solution???​

      Comment


        #4
        Hello micaeliglesias,

        Indicators will only be accessible in the Strategy Builder if the indicator contains a plot and a value is assigned to that plot. The Strategy Builder would then be able access that plot's value in the Conditions and Actions screen.

        The AddPlot() method can be used to add a plot to the script. You would need to use AddPlot() can create the plots needed for 4 weeks.

        Then, you could assign a value to that plot by calling Value[0] = 'x', where x is the value you are assigning. So instead of using Draw.HorizontalLines() to display the levels on the chart you are instead assigning the values to the Values collection..

        See this help guide page for more information about AddPlot() and sample code: https://ninjatrader.com/support/help...t8/addplot.htm

        Let me know if I may assist further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        599 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        344 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        558 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        557 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X