Hilbert sine wave indicator - NinjaTrader | futures io social day trading
futures io futures trading


Hilbert sine wave indicator
Updated: Views / Replies:48,220 / 77
Created: by ntsst3 Attachments:27

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 27  
 
Thread Tools Search this Thread
 

Hilbert sine wave indicator

  #31 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,215 since Jun 2009
Thanks: 628 given, 6,312 received

per request, add bull/bear series to be used in strategy according to Ninja sample, don't know if it works (for strategy)or not.
looks at ninja sample first to get the idea before calling it from my indi.

Attached Files
Register to download File Type: cs HilbertSW.cs (14.6 KB, 406 views)
Register to download File Type: zip SampleBoolSeries.zip (5.3 KB, 267 views)
Reply With Quote
The following 4 users say Thank You to cory for this post:
 
  #32 (permalink)
Elite Member
Vienna,Europe
 
Futures Experience: Advanced
Platform: NT
Favorite Futures: ES,NG
 
Posts: 45 since Dec 2010
Thanks: 92 given, 34 received


jigdaddy View Post
Can you send us a link to where you bought the indicator?

TIA!

Hilbert Sine Wave – This Little Know Indicator Transformed My Trading

Reply With Quote
 
  #33 (permalink)
Membership Temporarily Revoked
Hongkong
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: IB
Favorite Futures: Piano
 
Posts: 2 since Dec 2010
Thanks: 2 given, 0 received


https://futures.io/ninjatrader/3673-hilbert-sine-wave-indicator-4.html#post244423

Sir:

I am testing......

any different ?

Attached Thumbnails
Hilbert sine wave indicator-new.bmp   Hilbert sine wave indicator-old.bmp  
Reply With Quote
 
  #34 (permalink)
Fortitudo et Honor
Austin, TX
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Futures
 
Posts: 882 since Mar 2011
Thanks: 128 given, 703 received



I think he was asking the gentleman who has the TOS version that allows custom inputs. Barry's version doesn't allow custom inputs (for the S/R calc's or plots).

I'd be interested in seeing the more open version as well.

"A dumb man never learns. A smart man learns from his own failure and success. But a wise man learns from the failure and success of others."
Reply With Quote
 
  #35 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary

Hilbert Sinewave Potpourri

Most of the versions of the Hilbert Sinewave Oscillator, which I have seen are flawed. The formula used by John Ehlers is complex - see his book "Cybernetic Analysis for Stocks and Futures" pp 154,155, and the translation to eSignal by his partner Chris Kryza already uses a different formula. Both formulae have a severe bug, and should not be adopted without modifcation.

I have found three versions for NinjaTrader:


1) Sinewave

Source: NinjaTrader Support Forum - View Single Post - Ehlers Sine Wave

The indicator follows the original TradeStation by John Ehlers as closely as possible. The bug made by John Ehlers is conserved, a second bug - false period for GetMedian - is added. A relatively useless feature has been added to replace the triangular smoothing of the input series used by John Ehlers with other more fancy smoothing methods (Hull, JMA, VWMA, ....). The indicator plots S/R lines based on cyclical tops and bottoms on the price panel. These slow down NinjaTrader a bit. It would make more sense to draw them with a second indicator that uses a real plot, instead of those unhealthy Draw() methods.

Verdict: Do not use it.

2) HilbertSinewaveOscillator:

https://futures.io/download/ninjatrader-7/indicators/840-download.html?view

The indicator uses a different approach to calculate the sinewave. It uses the HilbertTransform2 indicator with a setting of 0.07. The period which can be set via indicator is fake, as it is never used by the calculations. I have not fully understood the formula.

Verdict: The indicator comes close to the original Ehlers formula, the bug is removed.

3) HilbertSW:

Indicator from this thread. Nice indicator, but has nothing or little to do with the Hilbert Sinewave indicator by John Ehlers.


There are various implementations in other software packages, which all differ in various details. The subject is not really easy to discuss. At some stage I had built my own versions of the sinewave indicators. I have not published them, because this would have further contributed to the general confusion.

Actually I would like to discuss the issue with somebody, who has a thorough understanding of the underlying logic of these filters.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 23 users say Thank You to Fat Tails for this post:
 
  #36 (permalink)
Trading Apprentice
taipei/taiwan
 
Futures Experience: Advanced
Platform: MC
Favorite Futures: EUR/USD
 
Posts: 2 since Apr 2013
Thanks: 0 given, 0 received


vegasfoster View Post
found this on nt forum, not sure if it is wut ur looking for

Hi, do you have sine wave indicator for TS or MC?
thank you for your kind help!

Reply With Quote
 
  #37 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received


jodo View Post
Hi, do you have sine wave indicator for TS or MC?
thank you for your kind help!

Here you go.

 
Code
{Sine Wave indicator - //// From 'Cybernetic Analysis for Stocks and Futures' by John Ehlers //// code compiled by dn
 } // plot on a subgraph separate from the price region.

Inputs: Price((H+L)/2), alpha(.07); 

Vars: Smooth(0),Cycle(0),I1(0),Q1(0),I2(0),Q2(0),DeltaPhase(0),MedianDelta(0),MaxAmp(0),AmpFix(0),Re(0),Im(0),DC(0),
 alpha1(0),InstPeriod(0),DCPeriod(0),count(0),SmoothCycle(0),RealPart(0),ImagPart(0),DCPhase(0);

Smooth = (Price+2*Price[1]+2*Price[2]+Price[3])/6;
 Cycle = (1-.5*alpha)*(1-.5*alpha)*(Smooth-2*Smooth[1]+Smooth[2])+2*(1-alpha)*Cycle[1]-(1-alpha)*(1-alpha)*Cycle[2];
 If CurrentBar <7 then Cycle=(Price-2*Price[1]+Price[2])/4; 
Q1=(.0962*Cycle+.5769*Cycle[2]-.5769*Cycle[4]-.0962*Cycle[6])*(.5+.08*InstPeriod[1]);
 I1 = Cycle[3];
 If Q1<>0 and Q1[1]<>0 then DeltaPhase=(I1/Q1-I1[1]/Q1[1])/(1+I1*I1[1]/(Q1*Q1[1]));
 If DeltaPhase <0.1 then DeltaPhase=0.1;
 If DeltaPhase > 1.1 then DeltaPhase = 1.1;
 MedianDelta = Median(DeltaPhase,5);
 If MedianDelta =0 then DC=15 else DC=6.28318/MedianDelta+.5;
 InstPeriod=.33*DC+.67*InstPeriod[1];
 Value1 = .15*InstPeriod+.85*Value1[1];
 DCPeriod = IntPortion(Value1); 
RealPart = 0; 
ImagPart = 0; 
For count = 0 To DCPeriod - 1 begin 
RealPart = RealPart + Sine(360 * count / DCPeriod) * (Cycle[count]); 
ImagPart = ImagPart + Cosine(360 * count / DCPeriod) * (Cycle[count]); 
End; 
If AbsValue(ImagPart) > 0.001 then DCPhase = Arctangent(RealPart / ImagPart); 
If AbsValue(ImagPart) <= 0.001 then DCPhase = 90 * Sign(RealPart); 

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

Plot1(Sine(DCPhase), "Sine",blue); 
Plot2(Sine(DCPhase + 45), "LeadSine",green); 

{Note: This indicator tries to determine the current phase of the cycles you are in. A sinewave indicator has an advantage over 
other oscillators such as RSI and Stochastic because it predicts rather than waits for confirmation. This assumes that the measured 
phase has existed at least briefly in the past and will continue at least briefly into the future. 
The phase languishes when the market is in a trend mode, and can even have a negative rate of change.
 This indicator gives entry and exit signals 1/16th of a cycle period in advance of the cycle turning point 
and seldom gives false whipsaw signals when the market is in a trend mode.}

Reply With Quote
The following user says Thank You to olobay for this post:
 
  #38 (permalink)
Trading Apprentice
taipei/taiwan
 
Futures Experience: Advanced
Platform: MC
Favorite Futures: EUR/USD
 
Posts: 2 since Apr 2013
Thanks: 0 given, 0 received


olobay View Post
Here you go.

 
Code
{Sine Wave indicator - //// From 'Cybernetic Analysis for Stocks and Futures' by John Ehlers //// code compiled by dn
 } // plot on a subgraph separate from the price region.

Inputs: Price((H+L)/2), alpha(.07); 

Vars: Smooth(0),Cycle(0),I1(0),Q1(0),I2(0),Q2(0),DeltaPhase(0),MedianDelta(0),MaxAmp(0),AmpFix(0),Re(0),Im(0),DC(0),
 alpha1(0),InstPeriod(0),DCPeriod(0),count(0),SmoothCycle(0),RealPart(0),ImagPart(0),DCPhase(0);

Smooth = (Price+2*Price[1]+2*Price[2]+Price[3])/6;
 Cycle = (1-.5*alpha)*(1-.5*alpha)*(Smooth-2*Smooth[1]+Smooth[2])+2*(1-alpha)*Cycle[1]-(1-alpha)*(1-alpha)*Cycle[2];
 If CurrentBar <7 then Cycle=(Price-2*Price[1]+Price[2])/4; 
Q1=(.0962*Cycle+.5769*Cycle[2]-.5769*Cycle[4]-.0962*Cycle[6])*(.5+.08*InstPeriod[1]);
 I1 = Cycle[3];
 If Q1<>0 and Q1[1]<>0 then DeltaPhase=(I1/Q1-I1[1]/Q1[1])/(1+I1*I1[1]/(Q1*Q1[1]));
 If DeltaPhase <0.1 then DeltaPhase=0.1;
 If DeltaPhase > 1.1 then DeltaPhase = 1.1;
 MedianDelta = Median(DeltaPhase,5);
 If MedianDelta =0 then DC=15 else DC=6.28318/MedianDelta+.5;
 InstPeriod=.33*DC+.67*InstPeriod[1];
 Value1 = .15*InstPeriod+.85*Value1[1];
 DCPeriod = IntPortion(Value1); 
RealPart = 0; 
ImagPart = 0; 
For count = 0 To DCPeriod - 1 begin 
RealPart = RealPart + Sine(360 * count / DCPeriod) * (Cycle[count]); 
ImagPart = ImagPart + Cosine(360 * count / DCPeriod) * (Cycle[count]); 
End; 
If AbsValue(ImagPart) > 0.001 then DCPhase = Arctangent(RealPart / ImagPart); 
If AbsValue(ImagPart) <= 0.001 then DCPhase = 90 * Sign(RealPart); 

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

Plot1(Sine(DCPhase), "Sine",blue); 
Plot2(Sine(DCPhase + 45), "LeadSine",green); 

{Note: This indicator tries to determine the current phase of the cycles you are in. A sinewave indicator has an advantage over 
other oscillators such as RSI and Stochastic because it predicts rather than waits for confirmation. This assumes that the measured 
phase has existed at least briefly in the past and will continue at least briefly into the future. 
The phase languishes when the market is in a trend mode, and can even have a negative rate of change.
 This indicator gives entry and exit signals 1/16th of a cycle period in advance of the cycle turning point 
and seldom gives false whipsaw signals when the market is in a trend mode.}

thank you so much!
However, do you have the advanced version? which may be called "Better Sine Wave" for TS or MC
Many thanks!!

Reply With Quote
 
  #39 (permalink)
Elite Member @ Ibiza
Ibiza. Spain
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG
Favorite Futures: CL
 
noyss's Avatar
 
Posts: 72 since Jul 2012
Thanks: 121 given, 29 received


Fat Tails View Post
Most of the versions of the Hilbert Sinewave Oscillator, which I have seen are flawed. The formula used by John Ehlers is complex - see his book "Cybernetic Analysis for Stocks and Futures" pp 154,155, and the translation to eSignal by his partner Chris Kryza already uses a different formula. Both formulae have a severe bug, and should not be adopted without modifcation.

I have found three versions for NinjaTrader:


1) Sinewave

Source: NinjaTrader Support Forum - View Single Post - Ehlers Sine Wave

The indicator follows the original TradeStation by John Ehlers as closely as possible. The bug made by John Ehlers is conserved, a second bug - false period for GetMedian - is added. A relatively useless feature has been added to replace the triangular smoothing of the input series used by John Ehlers with other more fancy smoothing methods (Hull, JMA, VWMA, ....). The indicator plots S/R lines based on cyclical tops and bottoms on the price panel. These slow down NinjaTrader a bit. It would make more sense to draw them with a second indicator that uses a real plot, instead of those unhealthy Draw() methods.

Verdict: Do not use it.

2) HilbertSinewaveOscillator:

https://futures.io/download/ninjatrader-7/indicators/840-download.html?view

The indicator uses a different approach to calculate the sinewave. It uses the HilbertTransform2 indicator with a setting of 0.07. The period which can be set via indicator is fake, as it is never used by the calculations. I have not fully understood the formula.

Verdict: The indicator comes close to the original Ehlers formula, the bug is removed.

3) HilbertSW:

Indicator from this thread. Nice indicator, but has nothing or little to do with the Hilbert Sinewave indicator by John Ehlers.


There are various implementations in other software packages, which all differ in various details. The subject is not really easy to discuss. At some stage I had built my own versions of the sinewave indicators. I have not published them, because this would have further contributed to the general confusion.

Actually I would like to discuss the issue with somebody, who has a thorough understanding of the underlying logic of these filters.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Hi Fat tails,


Did you make any improvements on your Sinewave indicator?



Reply With Quote
The following user says Thank You to noyss for this post:
 
  #40 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,600 received
Forum Reputation: Legendary



noyss View Post
Hi Fat tails,


Did you make any improvements on your Sinewave indicator?



I had played around with the various models of the SineWave indicator. However, so far I have not understood, how to use this indicator in an efficient way.

I would like to discuss the matter with somebody, who has an advanced understanding of the Ehlers SineWave indicator. Of course, I am willing to share everything that I have coded.

Reply With Quote
The following user says Thank You to Fat Tails for this post:

Reply



futures io > > > > Hilbert sine wave indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blue Wave Trading BigDog Trading Reviews and Vendors 17 January 9th, 2014 06:49 AM
latest in 'wave' indicator with special affect. cory Off-Topic 0 May 3rd, 2011 01:35 PM
Sine Weighted MA (SWMA) Sam7768 NinjaTrader 16 November 28th, 2010 12:55 PM
Wave indicator Big Mike The Elite Circle 27 January 7th, 2010 12:01 PM
Next Wave down will be bigger ! ?? max-td Traders Hideout 11 August 17th, 2009 01:17 PM


All times are GMT -4. The time now is 10:49 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-11 in 0.15 seconds with 40 queries on phoenix via your IP 54.145.16.43