Any way of plotting arrays efficiently ?

Questions about MultiCharts and user contributed studies.
Automeq
Posts: 108
Joined: 16 Apr 2014
Has thanked: 15 times
Been thanked: 1 time

Any way of plotting arrays efficiently ?

Postby Automeq » 05 Apr 2021

Let’s say I want a scanner where I can see the last 8 closes for a specific symbol, as below.
Multicharts screener.PNG
(6.06 KiB) Not downloaded yet


I can do this creating an indicator and having

Code: Select all

plot1 (c[1]); plot2 (c[2])
....


However this is very inefficient (the example is simple but what I want involves more than 8 days and more complicated calculation than just the close of the day).

What I wanted was something like a loop:

Code: Select all

Array: CloseOfDay[8](0); Variables: Counter (8); For Counter = 0 to 8 begin CloseOfDay [Counter] = C[Counter]; End;
However, after the loop is completed I stuck with the same problem. I have to write 8 plots:

Code: Select all

plot1 (CloseOfDay [1] ); plot2 (CloseOfDay [2] );
....

What I wanted was something to include in the loop like:

plot [Counter] (CloseOfDay [Counter] );

As far as I know this is not possible. Plot has to be Plot1, Plot2, Plot3, etc.

It's not possible to have Plot linked to a loop, right ?

If anyone has a good idea to turn this more efficiently it would be very much appreciated

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Any way of plotting arrays efficiently ?

Postby Svetlana MultiCharts » 08 Jun 2021

Hello Automeq,
As far as I know this is not possible. Plot has to be Plot1, Plot2, Plot3, etc.
It's not possible to have Plot linked to a loop, right ?
That is correct.


Return to “MultiCharts”