PureBytes Links
Trading Reference Links
|
Suggestion, make a few small changes in the system code to create the
OddBall Indicator so you can see when a trade is approaching. {Coment} out
the buy/sell lines and add four plot lines. Set up a chart with the snp in
data1 and NYA advancing issues in data2. Use a small time bar such as 3 or
5 minutes. The indicator will have a steplike appearance covering each
sampling period.
bobr
{Oddball Indicator}
{Variation of oddball system by Mark Brown.
Indifferent to bar length if <= interval, and to extraneous night session
data.
First and last are start and end times. Interval is time in minutes between
pollings.}
Inputs: bz(3), sz(1), first(1000), interval(60), last(1600);
var: rai(0), action(0);
array: obtime[1000](0), obvalue[1000](0);
obtime[1] = timetominutes(first);
value1 = 1;
while obtime[value1] < timetominutes(last) begin
value1 = value1 + 1;
obtime[value1] = obtime[value1-1] + interval;
end;
action = 0;
for value2 = 1 to value1 begin
if timetominutes(time) = obtime[value2] then begin
if obvalue[value2] > 0 then begin
rai = ((close of data2) / obvalue[value2] - 1) * 100;
If rai > bz Then action = 1;
If rai < sz Then action = -1;
end;
obvalue[value2] = close of data2;
end;
end;
{
if action = 1 then buy;
if action = -1 then sell;
}
Plot1(rai,"rai");
Plot2(bz,"bz");
Plot3(0,"0");
Plot4(sz,"sz");
===================================================
----- Original Message -----
From: "Charles Johnson" <cmjohnsonxx@xxxxxxxxx>
To: "Omega-List" <omega-list@xxxxxxxxxx>
Sent: Friday, October 19, 2001 3:42 PM
Subject: Oddball system variation
> I thought sharing this might be helpful to someone.
>
> {Variation of oddball system by Mark Brown.
> Indifferent to bar length if <= interval, and to extraneous night session
> data.
> First and last are start and end times. Interval is time in minutes
between
> pollings.}
>
> Inputs: bz(3), sz(1), first(1000), interval(60), last(1600);
> var: rai(0), action(0);
> array: obtime[1000](0), obvalue[1000](0);
>
> obtime[1] = timetominutes(first);
> value1 = 1;
> while obtime[value1] < timetominutes(last) begin
> value1 = value1 + 1;
> obtime[value1] = obtime[value1-1] + interval;
> end;
>
> action = 0;
> for value2 = 1 to value1 begin
> if timetominutes(time) = obtime[value2] then begin
> if obvalue[value2] > 0 then begin
> rai = ((close of data2) / obvalue[value2] - 1) * 100;
> If rai > bz Then action = 1;
> If rai < sz Then action = -1;
> end;
> obvalue[value2] = close of data2;
> end;
> end;
>
> if action = 1 then buy;
> if action = -1 then sell;
>
>
|