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

Re:Easylanguage Question OBV



PureBytes Links

Trading Reference Links

You won't be able to use OBV, you'll have to perform the math where Data1 is the
Price and Data2 is the volume. I think this is it, I don't have any volume as
Data2 to test it.

{************************************User
Function*********************************)
    {Data2OBV}

if currentbar >0
then begin
 if Close[0] > Close[1] then 
  Data2OBV  = (Close Data2)[1] + (Close Data2)
 else if Close[0] < Close[1] then 
  Data2OBV = (Close Data2)[1] - (Close Data2)
 else
  Data2OBV = Data2OBV[1];
end
else
 Data2OBV=0;

{*************************Indicator**********************}

{MyOBV}

Plot1(Data2OBV,"OBV");



"The darkest hour in any man's life is when he sits down to plan
 how to get money without earning it"

Sentinel Trading
rjbiii@xxxxxxxxx

____________________Reply Separator____________________
Subject: Easylanguage Question
Author: owner-realtraders@xxxxxxxxxxxxxx
Date:  2/15/99 1:34 AM

Greetings,
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.

This is my code:
Function OBVforData2-

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

Obviously, this is wrong. I'm relatively new to EL so if anyone
could help me solve this I'd really appreciate it.
Jerry