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

Re: CL_Need ELA help PLEASE!



PureBytes Links

Trading Reference Links

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
>> >