Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator that only draws lines read from a file

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

    Indicator that only draws lines read from a file

    Hi,

    I'm looking to create an indicator that will read levels from a .csv file (support/resistance, price, a ranking 1 to 5), and plot them on the chart. Basically this is a one time action once the "apply" or "ok" button is pressed. It is merely a convenience for plotting lines (like F6 Horizontal Lines) at the prices, with preset colors, thicknesses, and types based on the data from the .csv file.

    I have much of the logic done, but am stumped for where I would call the file read and plot methods from for this one time action. Like which Calculate.??

    Thanks

    #2
    Hello GrumpyDude,

    The reading code should go in OnStateChange -> DataLoaded, that is called once the script is setup and is only called once.

    To draw a single time you could do that by waiting for the last bar in processing and then looping over your data. That can be done from OnBarUpdate using a condition like this:

    Code:
    if(CurrentBar == Count - 2)
    {
    
    }

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    612 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    355 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    561 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    564 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X