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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    49 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    69 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    36 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    96 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    59 views
    0 likes
    Last Post PaulMohn  
    Working...
    X