Ads 468x60px

Smaller time frame always follow the bigger time frame. It's better wait be patience to enter in position than risk with BIG SL. Having strong trading discipline and taking losses when necessary is a sign of serious trading approach

Saturday, August 11, 2012

EASY WAY TO COMPARE DATES


Did you know that you can easily compare dates by using the "EncodeDate()"? Here are some examples: 
 
uses
  SysUtils;

{...}

if(Date > EncodeDate( 1997, 1, 1 ))then
begin
  { display "this program has expired" }
end;

{...}

if( EncodeDate( 1997, 1, 1 )
  > EncodeDate( 1996, 1, 1 ) ) then
begin
  {...}
end;
Listing #1 : Delphi code. Download datecomp (0.27 KB).

comments