[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CL_Need ELA help PLEASE!



PureBytes Links

Trading Reference Links


John: 

If you look at the print output for 15 EOD bars you get a read out like
the one below. EL first runs thru all the bars then runs thru again
right after the 11 th bar (i=11 total) using only the last 3 bars to
base the final calculation on. Two HELLOs are printed as EL runs thru
two times. I do not see, off hand, how to prevent having 2 hellos. If I
do I will let you know.

If you replace print with plot you get only one result on the last bar.

Changing the MBB setting does not help.

wayne

1000104.00   1600.00      1.00
1000105.00   1600.00      2.00
1000106.00   1600.00      3.00
1000107.00   1600.00      4.00
1000110.00   1600.00      5.00
1000111.00   1600.00      6.00
1000112.00   1600.00      7.00
1000113.00   1600.00      8.00
1000114.00   1600.00      9.00
1000118.00   1600.00     10.00
1000119.00   1600.00     11.00
1000120.00   1600.00     12.00
1000121.00   1600.00     13.00
Hello
1000124.00   1600.00     14.00
1000120.00   1600.00      1.00
1000121.00   1600.00      2.00
Hello
1000124.00   1600.00      3.00


Wayne Mathews wrote:
> 
> John:
> 
> Why are you asking this again? You already have the answer.
> 
> John Manasco wrote:
> >
> > Why does this code print the word Hello twice and what can I do about it? I
> > only want it to print once. Seems TS2Ki wants to initialize the code by
> > going through it once and then executing it. I'm trying to create a report
> > for EOD data.
> >
> > Thanks
> > John
> >
> > If lastbaronchart then begin
> >     for i = 0 to 10 begin
> >        If High[i] - Close[i + 1] > .10 then j = j + 1;
> >     end;
> >     Print( "Hello" );
> > end;
> 
> >> Subject: Re: CL_ELA Help
> >> Date:  Thu, 16 Dec 1999 10:44:27 -0800
> >> From: Wayne Mathews <wayne@xxxxxxxxx>
> >> To: John Manasco <john@xxxxxxxxxxx>
> >> CC: Code-list <code-list@xxxxxxxxxxxxx>, omega-list <omega-list@xxxxxxxxxx>
> >>  References:
> >>             1
> >>
> >> I believe this is a maxbarsback (MBB)item. The code looks back to the
> >> first bar on the chart and runs thru 5 bars to set up. Then it runs thru
> >> the next 5 bars to product the correct results.
> >>
> >> If you plot "Index test" instead of printing it, you should get only the
> >> last 5 results as TS does not plot back past MBB even tho it can print
> >> back to bar 1 (or 2).
> >>
> >> wayne
> >>
> >>
> >>
> >>
> >> John Manasco wrote:
> >> >
> >> > I'm new to Easy Language coding and I don't understand my mistake below. If
> >> > someone has an insight I sure would appreciate it.
> >> >
> >> > This code:
> >> >
> >> > Variables: i(0);
> >> >
> >> > Print("Index test");
> >> > For i = 0 to 4 begin
> >> >  Print(High[i]);
> >> > End;
> >> >
> >> > Produces this result:
> >> >
> >> > Index test
> >> >     447.65
> >> >     454.15
> >> >     447.65
> >> >     447.65
> >> >     447.65
> >> > Index test
> >> >     462.68
> >> >     461.33
> >> >     453.28
> >> >     446.42
> >> >     447.65
> >> >
> >> > The second set of values is correct and I don't understand what happened to
> >> > the first set. I'm running TS2Ki with BMI quotes. I'm testing during the day
> >> > and wonder if that has anything to do with it. Do I need to initialize the
> >> > High array before I use it?
> >> >
> >> > Thanks in advance,
> >> >
> >> > John Manasco
> >> >