problem with ADE ListS.COunt

Questions about MultiCharts and user contributed studies.
waldem
Posts: 115
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

problem with ADE ListS.COunt

Postby waldem » 28 Mar 2020

Hallo all do you have any idea why the command "ListS.COunt" count the line but not the last? if i have 10 row the output is 9.

this is my code:

Code: Select all

var:chklist (0),listaportafoglio(ListS.New),body(" "); chklist = ListS.Clear(listaportafoglio); chklist = ListS.ReadFile(listaportafoglio,percorso_file); for value11 = 1 to ListS.COunt(listaportafoglio) begin body = body + ListS.Get(listaportafoglio,value11) + newline; end; print (ListS.COunt(listaportafoglio));
this is my txt file that i'm reading:

CHECK LIST creata in Data: 28/03/2020
titolo=NOR1 EURO COV E;simbolo=LU0173776989;Prx.Acq=0.000
titolo=TEM ASIA BOND AA;simbolo=LU0229951891;Prx.Acq=18.990

why the string "print (ListS.COunt(listaportafoglio)); " return 2 and not 3?
someone could help me?
thanks
walter

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: problem with ADE ListS.COunt

Postby TJ » 28 Mar 2020

Try counting from zero.

waldem
Posts: 115
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

Re: problem with ADE ListS.COunt

Postby waldem » 29 Mar 2020

Hallo TJ, with zero i got error "list out of bounds".
walter

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: problem with ADE ListS.COunt

Postby Anna MultiCharts » 01 May 2020

Hello waldem,

We couldn't reproduce the issue on our end (see attached picture). Try checking the path to the file.
listS.COunt.png
(106.12 KiB) Not downloaded yet


Return to “MultiCharts”