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