Is it possible to use the Plot function in a loop?
If yes, how to do it?
For example, I fill an array (Ex: MyArr[200]( 0 )) and I want to plot all the values in it.
How to do it, without using
Plot1(MyArr[1]);
Plot2(MyArr[2]);
Plot3(MyArr[3]);
...
Any ideas?
Best Regards,
Loop with Plot function
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Loop with Plot function
Can you draw a diagram to illustrate your intention?Is it possible to use the Plot function in a loop?
If yes, how to do it?
For example, I fill an array (Ex: MyArr[200]( 0 )) and I want to plot all the values in it.
How to do it, without using
Plot1(MyArr[1]);
Plot2(MyArr[2]);
Plot3(MyArr[3]);
...
Any ideas?
Best Regards,
notes:
Each PLOT can "draw" one data point per bar.
eg.
PLOT1 can draw a dot at price value 100.
if you want another dot, on the same bar (say, at 101),
you must use another plot (eg PLOT2).
if you have 200 data points in the array that you want to plot on the same bar,
then you must have PLOT1, PLOT2... PLOT200.
if you have 200 data points in the array that you want to plot on the previous 200 bars,
you can try this:
Code: Select all
for value1 = 0 to 200
begin
Plot1[value1]( MyArr[ value1 ] ) ;
end;
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Loop with Plot function
You are welcome. I am glad you solved the problem.Thanks a lot for your answer TJ, I have solved my problem, you're always a great help for me!