Derek Worswick
Mitglied seit 10 Jahre 9 Monate

(e) TradeStation 2000i - Enhanced Hibert Cycle Period Formula

Hello,

Could you please help me with the TradeStation 2000i formula for
the Enhanced Hibert Cycle Period.

Hoping you can oblige.

Regards,

Derek
________________________________________________________________

TradeStation 2000i - Erhöhte Hibert Zyklus-Periode Formel

Konnten Sie bei der TradeStation 2000i Formel während der erhöhten Hibert Zyklus-Periode bitte helfen

Das Hoffen Sie kann verbinden.

Respekt,

Derek

limitup
Mitglied seit 10 Jahre 9 Monate

Hallo Derek,

do you mean that???

*********************************************************
Hilbert Phase Indicator

**********************************************************}

Inputs: Price((H+L)/2);

Vars: Smooth(0),
Detrender(0),
I1(0),
Q1(0),
jI(0),
jQ(0),
I2(0),
Q2(0),
Re(0),
Im(0),
Period(0),
SmoothPeriod(0),
SmoothPrice(0),
DCPeriod(0),
RealPart(0),
ImagPart(0),
count(0),
DCPhase(0);

If CurrentBar > 5 then begin
Smooth = (4*Price + 3*Price[1] + 2*Price[2] + Price[3]) / 10;
Detrender = (.0962*Smooth + .5769*Smooth[2] - .5769*Smooth[4] - .0962*Smooth[6])*(.075*Period[1] + .55);

{Compute InPhase and Quadrature components}
Q1 = (.0962*Detrender + .5769*Detrender[2] - .5769*Detrender[4] - .0962*Detrender[6])*(.075*Period[1] + .55);
I1 = Detrender[3];

{Advance the phase of I1 and Q1 by 90 degrees}
jI = (.0962*I1 + .5769*I1[2] - .5769*I1[4] - .0962*I1[6])*(.075*Period[1] + .55);
jQ = (.0962*Q1 + .5769*Q1[2] - .5769*Q1[4] - .0962*Q1[6])*(.075*Period[1] + .55);

{Phasor addition for 3 bar averaging)}
I2 = I1 - jQ;
Q2 = Q1 + jI;

{Smooth the I and Q components before applying the discriminator}
I2 = .2*I2 + .8*I2[1];
Q2 = .2*Q2 + .8*Q2[1];

{Homodyne Discriminator}
Re = I2*I2[1] + Q2*Q2[1];
Im = I2*Q2[1] - Q2*I2[1];
Re = .2*Re + .8*Re[1];
Im = .2*Im + .8*Im[1];
If Im <> 0 and Re <> 0 then Period = 360/ArcTangent(Im/Re);
If Period > 1.5*Period[1] then Period = 1.5*Period[1];
If Period < .67*Period[1] then Period = .67*Period[1];
If Period < 6 then Period = 6;
If Period > 50 then Period = 50;
Period = .2*Period + .8*Period[1];
SmoothPeriod = .33*Period + .67*SmoothPeriod[1];

{Compute Dominant Cycle Phase}
SmoothPrice = (4*Price + 3*Price[1] + 2*Price[2] + Price[3]) / 10;
DCPeriod = IntPortion(SmoothPeriod);
RealPart = 0;
ImagPart = 0;
For count = 0 To DCPeriod - 1 begin
RealPart = RealPart + Sine(360 * count / DCPeriod) * (SmoothPrice[count]);
ImagPart = ImagPart + Cosine(360 * count / DCPeriod) * (SmoothPrice[count]);
End;
If AbsValue(ImagPart) >0 then DCPhase = Arctangent(RealPart / ImagPart);
If AbsValue(ImagPart) <= 0.001 then DCPhase = 90 * Sign(RealPart);

{Compensate for one bar lag of the Weighted Moving Average}
DCPhase = DCPhase + 360 / SmoothPeriod;

DCPhase = DCPhase + 90;
If DCPhase > 360 then DCPhase = DCPhase - 360;
If ImagPart < 0 then DCPhase = DCPhase + 180;
If DCPhase > 315 then DCPhase = DCPhase - 360;

Plot1(DCPhase, "Phase");

End;

is it usefull?

metatrader
Mitglied seit 10 Jahre 9 Monate

@ Derek,

you find the code right here:

http://www.traders.com/Documentation/FEEDbk_docs/Archive/112000/TradersTips/TradersTips.html

The code for MetaStock is here:

http://www.traders.com/Documentation/FEEDbk_docs/Archive/122000/TradersTips/TradersTips.html

Just change the date part (i.e. 11200 to 042005)in the hyperlink to get a lot of good code, the actual issue you find here:

http://www.traders.com/Documentation/FEEDbk_docs/TradersTips/TradersTips.html

Have a lot of fun

Derek Worswick
Mitglied seit 10 Jahre 9 Monate

Hello,

Many thanks for your help with the Enhanced Hilbert Cycle Period Formula.

No problems with the MetaStock “Enhanced Hilbert Cycle Period Formula”.

The Enhanced Hilbert Cycle Period Formula gives a higher numeric value that the normal Hilbert Period?

Having lots of fun.

Regards,

Derek

Sammy
Mitglied seit 10 Jahre 9 Monate

@ metatrader

Thanks for the links.

Did you discover how to obtain the code pages dated before year 2000?

Sammy

Rückrufservice
Beschreiben Sie bitte Ihr Anliegen, damit wir uns auf den Rückruf vorbereiten können.
Ja, ich habe die Datenschutzerklärung zur Kenntnis genommen und willige ein, dass die von mir angegebenen Daten inklusive der Kontaktdaten zwecks Bearbeitung der Anfrage und für den Fall von Anschlussfragen elektronisch erhoben und gespeichert werden. Meine Daten werden dabei nur streng zweckgebunden zur Bearbeitung meiner Anfrage genutzt und nicht ohne Einwilligung weitergegeben. Diese Einwilligung kann jederzeit mit Wirkung für die Zukunft widerrufen werden.

Jetzt registrieren

Jetzt registrieren und ZMP Live+ 14 Tage kostenlos testen!
  • Dauerhaft kostenfrei
  • Keine Zahlungsinformationen erforderlich