Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cache for an indicator and days loaded?

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

    Cache for an indicator and days loaded?

    Hello I've developed an indicator where it prints some rectangles + lines, etc depending on the days loaded, I'm wondering if is there any way to load for instance 300 days, print this lines, and then put less days to don't waste too much time loading the next time.

    The thing is, if I add 10 days in the char, what happens after 10 days? The lines I've drawn before they won't be visible, right?

    #2
    Hello cmtjoancolmenero,

    The script is going to process the data each time it is loaded. The drawing objects will only appear if the drawing method is called after the script is loaded.

    However, if you wanted to write some information (such as the anchor date and price) to a text file, and then load this information from the text file and then on the last historical bar call the draw methods on a loop this might be what you are trying to do. I'm not certain this would be any faster than drawing the objects as they are processed in the historical data.

    "The thing is, if I add 10 days in the char, what happens after 10 days? The lines I've drawn before they won't be visible, right?"

    If the chart is reloaded, this would be correct. Drawing objects can only appear over bars loaded on the chart.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    152 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    304 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    244 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    175 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X