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

Re: How to detect the very last bar in a series???



PureBytes Links

Trading Reference Links

"If Date=LastCalcDate ..." will work for daily data.  "If lastbaronchart..."
will work on intraday charts as well.  It is a user function that
lastcalctime to the lastcalcdate command to cover both daily and intraday data.

At 09:11 PM 6/2/98 -0700, you wrote:
>why not just:
>
>If Date=LastCalcDate
>
>-----Original Message-----
>From: Bernard Orenstein <bernie@xxxxxxxxxxxxx>
>To: Omega List <omega-list@xxxxxxxxxx>
>Cc: Orphelin <Orphelin@xxxxxxx>
>Date: June 2, 1998 5:16 PM
>Subject: How to detect the very last bar in a series???
>
>
>>I need to detect the very last bar in a series.  Pierre Orphelin's
>>finddate(-1) DLL function seems to give undefined results on the last
>>bar, so the best I could do was come up with the "BarIsLast" function
>>below which incorporates finddate.  It seems to do the job, but I'm not
>>sure how reliably it will work in the long term.  [Note that I need to
>>be able to do this from indicators & systems, thus I can't use "date of
>>next bar".]  Hopefully one of you might know of a better way...
>>
>>Thanks & rgds,
>>Bernie
>>----------
>>Variables:
>>   BarDateNext(0),
>>   BarYearNext(0),
>>   BarYear(0);
>>
>>definedllfunc:"c:\omega\prog\ts_find.dll",dword,"findDate",lpword,int;
>>
>>BarDateNext = findDate(&date,-1);
>>BarYearNext = Year(BarDateNext);
>>BarYear     = Year(Date);
>>
>>BarIsLast = BarYearNext<>BarYear and BarYearNext<>BarYear+1;
>>
>>-------- 
>>Bernard Orenstein - Agents Pty Limited
>>PO Box 956  North Turramurra  NSW 2074  Australia
>>Tel:(02)9440-0920  Fax:(02)9440-0921  Mobile:(0417)279-238
>>Email: bernie@xxxxxxxxxxxxx    Web: http://www.agents.com.au
>>
>>
>>
>>
>
>

Best Regards,
William Brower
Publisher of TS Express 
The Journal for Informed Users of TradeStation
Free Sample Available (Send Mail Address)
Email: 1000mileman@xxxxxxxxxxxxxx
Web: http://www.insideedgesystems.com
Tel: 203-454-2754 Fax: 203-221-9195