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

Re: EasyLanguage date format



PureBytes Links

Trading Reference Links

On Fri, 3 May 2002 14:33:08 -0400, Schedlbauer, Joseph E. wrote:
>I wrote an external program because I could not code a certain
>system in
>EasyLanguage, and I have the program output a file similar to the
>line
>below. I then paste the file into the PowerEditor so TradeStation
>can show
>me the entries as a system.
>
>IF CURRENTDATE = 20011212 THEN BUY NEXT BAR AT 55.00 STOP ;
>
>Could someone please tell me why this piece of code does not work?
>It will
>verify, but it does not generate a trade entry.  I'm using TS4.  I
>think
>it's a problem with the date format.
>
>It's for use with ASCII daily data formatted as follows:
>
>20011212,54.00,56.00,52.00,53.00,10000,10000
>
>
>Thanks for your help.

In EL the year
2000 = 100
2001 = 101
2002 = 102

So to call current date in EL

If Date = Currentdate 
calls for action on todays date
If Date = 1011212
is what you are trying to call.
If you use 
If Currnetdate = 1011212 it will never happen again as it is in the 
past.
Current Date call the date from the system clock.

Hope that helped.