Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have created a file that plots a horizontal line from price data in an Excel csv file. Everything works fine but I would like to know if there is a better way to code the plot portion of the code to just plot everything. Right now, if I have 10 rows of data in my Excel file, I would need 10 plot statements in my indicator, incrementing the ref number on every line. For example:
you could loop through the contents of your list and use a switch statement to pass an entry to a respective plot number. However, you would still have to add X different plots where X is the number of rows you read into the list. It might look more elegant, but it will likely not be less code compared to what you are doing now.