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

Re: Code Help for Trading Day



PureBytes Links

Trading Reference Links

Thanks to Alex and drwar.

It took me sometime to realize that I actually needed to rename the
function too and get rid of the words 'of the month'..
 ... in case someone else is on a low learning curve like me.
Dr. Greg Hunt

Alex Matulich wrote:

> You have to assign a value to the function.  To do this, you assign a
> value to a 'variable' which is the same name as the function, but not
> declared in your variable list.
>
> For example, suppose you call your function "tradingday" then the code
> would be:
>
> {TRADING DAY OF THE MONTH}
> Vars: Mo(0), TradeDay(0);
>
> Mo = Month(Date);
> TradeDay = iff(Mo <> Mo[1], 1, TradeDay + 1);
> tradingday = TradeDay;
>
> --
>   ,|___    Alex Matulich -- alex@xxxxxxxxxxxxxx
>  // +__>   Director of Research and Development
>  //  \
>  // __)    Unicorn Research Corporation -- http://unicorn.us.com