Trading Articles
Article Categories
Article Tools
Help with ListN Plotting
Updated August 23, 2021
trending_up
2,596 views
thumb_up
1 thanks given
group
2 followers
forum
1 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
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 and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
(login for full post details)
#1 (permalink )
Montreal
Experience: Intermediate
Platform: MultiCharts
Broker: DeepDiscountTrading.com
Trading: CL
Posts: 363 since Jul 2011
Thanks: 465 given,
550
received
Hi,
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:
Plot1(Listn.Get(ListID, 1));
Plot2(Listn.Get(ListID, 2));
Plot3(Listn.Get(ListID, 3));
etc
Is there a simple one line method to just plot everything from my Excel file?
Thanks.
Code
Inputs: File_Directory("C:\Book1.csv");
var: listid(0);
listid = Listn.New;
value1 = Listn.Readfile(listid, File_Directory);
Plot1(Listn.Get(ListID, 1));
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Posts: 2,363 since Apr 2013
Thanks: 426 given,
1,579
received
olobay,
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.
Regards,
ABCTG
olobay
Hi,
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:
Plot1(Listn.Get(ListID, 1));
Plot2(Listn.Get(ListID, 2));
Plot3(Listn.Get(ListID, 3));
etc
Is there a simple one line method to just plot everything from my Excel file?
Thanks.
Code
Inputs: File_Directory("C:\Book1.csv");
var: listid(0);
listid = Listn.New;
value1 = Listn.Readfile(listid, File_Directory);
Plot1(Listn.Get(ListID, 1));
The following user says Thank You to ABCTG for this post:
Last Updated on August 23, 2021
Ongoing