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

Re: Easylanguage Question



PureBytes Links

Trading Reference Links

At 12:34 AM -0600 2/15/99, Jerry S wrote:
>I'd appreciate if anyone could help me out with the following easylanguage
>question: I'm using Reuters EOD data and my problem is that they supply
>the Dow/Nasdaq and other indices separately from the volume and i'm having
>trouble creating the OBV indicator in Tradestaion. I inserted the
>corresponding volume as data2 into my chart and i tried writing a custom
>OBV function that references data2 but i get an error message saying
>"arithmetic/numeric expression required" where data2 is.

Assuming the volume you want is listed as the closing "price" of the volume
data, you probably want:

Function OBVforData2

if currentbar > 0 then begin
   if Close[0] > Close[1] then
      OBVforData2 = OBVforData2[1] + Close of Data2
   else if Close[0] < Close[1] then
      OBVforData2 = OBVforData2[1] - Close of Data2
   else
      OBVforData2 = OBVforData2[1];
end else
      OBVforData2=0;


Bob Fulks