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