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

Re: Exitlong Next day on Open



PureBytes Links

Trading Reference Links

I know that some others already answered your
question, but still just for the educational value for
all who are learning:

- Dont use CurrentDate, use Date when you want to the
refer to the date of a bar.    CurrentDate return the
PC clock date or something, and it is the same all
across the chart.   When you use the word 'Date', it
return the date of the bar you are analyzing.

- If you want to add a certain number of days to a
date you will have to convert the date to a julian
number, then add whatever number to it, and then
convert it from a julian to a date.   You can use
something like:

value1 = DateToJulian(Date) + 1;
value2 = JulianToDate(value1);

Then value2 will contain the next day's date. Julians
are nothing other than a count where 1/1/1900 is day
1, 1/2/1900 is day 2, etc, etc, until we reach today
which is Julian day 36,339 (if I am correct).   The
advantage of them is that you don't need to bother
rolling over the months, years when doing date
arithmetecs.  (BTW: EasyLanguage dates are really
numbers, so today is 62,899 - which you can read as
06-28-99)

H	

--- Mike Werner <werner_trading@xxxxxxxxx> wrote:
> All,
> 
> I am trying to find the best way to exitlong the
> next day on open. I have
> tried using the EntryDate(1) function but
> currentdate does not come out in
> the same format.
> 
> I would like to say :
> 
> If currentdate = Entrydate(1) +1 and open > close[1]
> then exitlong next bar
> at open.
> 
> This does not work. What am I missing???
> 
> Any ideas??
> 
> Thanks.
> 
> Mike
> 
>