Current Date
Author: magicgb
Creation Date: 9/29/2008 4:53 PM
profile picture



How would I write these statments?

if GetDate(Bar)>=CurrentDate then


if GetDate(Bar)>=20080826 then

profile picture


See (a more general) answer in WL5 FAQ: "An equivalent WealthScript function can't be found."

DateTime represents a date and time in C#. CurrentDate is DateTime.Now. Date/time comparison can be made through DateTime.Compare. The web is full with helpful tutorials on date manipulation in C# such as this one.

For more examples, see QuickRef entries that deal with the Date structure e.g. ExitDate property or the included Bad History Data Check strategy.