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

Another Indicator Alternative for Axom.Com



PureBytes Links

Trading Reference Links


Here's one more alternative to the indicator posted at
http://www.axom.com/commodities  .  This is one that we'll develop further,
in future postings:


First, create a User Function (call this one "HonyBake") as follows:


Input:HamLen(Numeric),Price(NumericSeries);

Vars:RealHam(0),ImagHam(0),WaitoHam(0),J(0),P(0);

RealHam=0;
ImagHam=0;

For J=0 to HamLen-1 Begin
 WaitoHam=Price[J];
 If HamLen<>0 Then Begin
  RealHam=RealHam+Cosine(360*J/HamLen)*WaitoHam;
  ImagHam=ImagHam+Sine(360*J/HamLen)*WaitoHam;
 End;
End;

If AbsValue(RealHam) > .001 Then Begin
 P=ArcTangent(ImagHam/RealHam);
End
Else Begin
 P=90*Sign(ImagHam);
End;

If RealHam<0 then P = P+180;
P=P+90;
If P<0 then P=P+360;
If P>360 then P=P-360;
HonyBake=P;




Next, create the indicator "Honey Baked" as follows:


Input: HamLen(20), Price(TypicalPrice), P1Adv(0), P2Adv(15),SmooLen(10);

Vars:  Spiral(0);

Spiral = HonyBake(HamLen,Price);

Plot1(50+50*Average(Sine(Spiral + P1Adv),SmooLen),"Honey Baked");
{Plot2(50+50*Average(Sine(Spiral + P1Adv + P2Adv),SmooLen),"Hon Baked +");}



As you'll notice, the code for Plot 2 is commented out.  Feel free to remove
the braces on this plot and re-insert the indicator after you've gotten a
feel for Plot 1 by itself.  As usual, you Sultans of Smooth out there may
adjust SmooLen to suit your needs.  Or (what's this?) replace the price
input with some sort of calculated (variable length) function of price....



All the best,

The Omega Man


So I walked upon high,
and I stepped to the edge,
to see my world below.

And I laughed to myself,
while the tears rolled down,
'cause it's the world I built.

The world I built.