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

Re: date>date[1]



PureBytes Links

Trading Reference Links

Ah, many thanks to Eric and Alex who both suggested the same thing. I'll 
give that a shot but one further Q before I do... 

sess1firstbartime  returns the time of the *end* of the first bar which 
effectively would leave the first bar out of any calculations, is that 
right? If so, are there any other alternatives? What do you clever 
programmers use?

Ian

> Ian,
> 
> >> On intra-day charts, I quite often want to set up some variables 
> > on >the first bar of the day and usually use:
> >> 
> >> if data>date[1] then...
> 
> This won't work if you're using 24-hour data.  I assume you want the
> first bar of the day session, not the first bar after midnight.  You 
> can
> use instead
> 
> if time = Sess1FirstBarTime then...
> 
> ...provided you have the session times in GlobalServer set up
> correctly.  If you've messed with them, then you may need to specify
> an actual time rather than the builtin value Sess1FirstBarTime.
> 
> -- 
>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>  // +__>   Director of Research and Development
>  //  \ 
>  // __)    Unicorn Research Corporation -- http://unicorn.us.com
> 
>