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

Re: Code Help for Trading Day



PureBytes Links

Trading Reference Links

>The problem is that this code will not verify.
>The error says, 'A value was never assigned to the user function.'

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