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

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


  • To: omega-list@xxxxxxxxxx
  • Subject: Re: How to detect the very last bar in a series???
  • From: Jakub Borys <jborys@xxxxxxx>
  • Date: Wed, 3 Jun 1998 10:46:37 -0700
  • In-reply-to: <199806022153_MC2-3EF7-5205@xxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

Have you tried LastBarOnChart function?

Jake

At 09:53 PM 6/2/98 -0400, you wrote:

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