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

Assignment to a function error when coding



PureBytes Links

Trading Reference Links

Folks:

On a quiet trading day, I am slowly trying to digest interesting looking posts
that had system or indicator codes in them--Who knows? One day I may even be
able to code something. Anyway...amongst others, I found this funtion and when I
code it, I get this error message:

Assignment to a function is not allowed

This error appeared in serveral posts from several people, so it must be either
a common error, or I am commonly unaware of what I am doing. I would appreciate
any help.

Here's the code for one of the functions. It returns the above verify error:


{Function:LOrwi}
{ This function is equal to Kase' Function XS.  IT is
 the RWI indicator written about by Mile Poulos in TASC.
 The indicator uses 0 as a minimum value althouhg the
 RWI can be negative.}

vars: mlval(0);
mlval = 0;

for value99 = 8 to 65 begin
   value5 = (high[value99] - low)/SquareRoot(value99);
   if value5> mlval then mlval = value5;
end;

value6 =average(TrueRange,34);

if  value6 > 0 then
K.LOrwi = mlval / value6 else K.LOrwi =K.LOrwi [1];