NexusFi: Find Your Edge


Home Menu

 





Hilbert sine wave indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Zondor with 10 posts (58 thanks)
    2. looks_two cory with 8 posts (14 thanks)
    3. looks_3 ntsst3 with 7 posts (3 thanks)
    4. looks_4 noyss with 6 posts (2 thanks)
      Best Posters
    1. looks_one Fat Tails with 7 thanks per post
    2. looks_two Zondor with 5.8 thanks per post
    3. looks_3 vegasfoster with 4.5 thanks per post
    4. looks_4 cory with 1.8 thanks per post
    1. trending_up 82,948 views
    2. thumb_up 134 thanks given
    3. group 38 followers
    1. forum 77 posts
    2. attach_file 27 attachments




 
Search this Thread

Hilbert sine wave indicator

  #61 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Having already posted the code necessary to fix the indicator, I will leave it to someone else to make the corrections and post an updated version.

However nobody seems to have any real interest in this indicator, and I am not sure that it has any real practical value anyway.

The version I posted is, however, an illustration of some good coding techniques. A subject that also garners a low level of interest.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
  #62 (permalink)
 
Silvester17's Avatar
 Silvester17 
Columbus, OH
Market Wizard
 
Experience: None
Platform: NT 8, TOS
Trading: ES
Posts: 3,603 since Aug 2009
Thanks Given: 5,139
Thanks Received: 11,527


Zondor View Post
Having already posted the code necessary to fix the indicator, I will leave it to someone else to make the corrections and post an updated version.

However nobody seems to have any real interest in this indicator, and I am not sure that it has any real practical value anyway.

The version I posted is, however, an illustration of some good coding techniques. A subject that also garners a low level of interest.

@Zondor,

I for one am very grateful!! so I'm happy to be a low level

here's an example. you'll recognize some of your coding techniques:

https://nexusfi.com/elite-trading-journals/30600-alpha-trading-method-ninjatrader-advanced-trade-management-jdneeman-48.html#post394272

Reply With Quote
Thanked by:
  #63 (permalink)
 
learning0101's Avatar
 learning0101 
Houston, Texas
 
Experience: Intermediate
Platform: NinjaTrader,TOS,Etrade,St
Broker: NT:( tos,etrade,CS
Trading: stocks,options,futures,forex
Frequency: Never
Duration: Never
Posts: 287 since Aug 2011
Thanks Given: 3,614
Thanks Received: 222


Hi @Zondor
well I have no clue about coding(as anyone can see) but did try taking what you posted and replacing in the other indi posted.
Apparently more to it than what I tried.
Here is what I got.


Oh well gave it a shot.
Thanks for all your contributions!

Reply With Quote
  #64 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Cory's version of the Sine Wave probably should not be used, no matter how efficiently I managed to get it to run.

I concur with @Fat Tails that the second version he mentions in post 35 is the preferred one:


Quoting 
2) HilbertSinewaveOscillator:



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.

The fix for the fake period is that alpha should be a function of period. Setting alpha =1.0/(1+period) seems to work well. The Sine Wave on this chart has a period of 50.

Having taken care of that, maybe I will get around to coloring the region between the two plots and drawing support and resistance lines on the price panel.


"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #65 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

To the Hilbert Transform version of sine wave, has been added
  • calculation of alpha based on period
  • S/R lines based on logic in the Cory version.

I think there is room for improvement in the logic that draws the S/R lines, which do not seem consistent with the start of trend, pullback, and end of trend logic of the Emini-watch® version.

This is not fully speed optimized, but it's a lot better than what I started from.

The smoothing of the input series in the HT is by the median indicator. This needs to be looked at further.




"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Attached Thumbnails
Click image for larger version

Name:	YM 06-14 (RJay's TickRangeAdaptive2  100 TradeTicks  3 PriceTicks)  4_8_2014.jpg
Views:	341
Size:	161.8 KB
ID:	143288  
Attached Files
Elite Membership required to download: ___HilbertSinewaveOscillator2.cs
Elite Membership required to download: HilbertTransform2b.cs
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #66 (permalink)
 
noyss's Avatar
 noyss 
Ibiza. Spain
 
Experience: Intermediate
Platform: MT4
Broker: Darwinex
Trading: EminiSP, Crude, Euro/Dolar, Bitcoin.
Posts: 76 since Jul 2012
Thanks Given: 121
Thanks Received: 32


Zondor View Post
To the Hilbert Transform version of sine wave, has been added
  • calculation of alpha based on period
  • S/R lines based on logic in the Cory version.

I think there is room for improvement in the logic that draws the S/R lines, which do not seem consistent with the start of trend, pullback, and end of trend logic of the Emini-watch® version.

This is not fully speed optimized, but it's a lot better than what I started from.

The smoothing of the input series in the HT is by the median indicator. This needs to be looked at further.






Yeah! looks better than Cybernetics analisys SineWave

Thanks!

Reply With Quote
  #67 (permalink)
hermes777
Toronto
 
Posts: 8 since Mar 2014
Thanks Given: 3
Thanks Received: 0

Hello Alicante! I had a long time ago apartment in Denia behind Valencia you know where it is. I had a nice time there. We drunk coffee Karachilio and cheap home wine all the time. Only problem was drinking water - always salty.
Hermes777
P.S. Not Hot Forex anymore because US and Canadian traders are not allowed by their governments to trade at HF!
As I can see on this forum are mostly Ninja traders. I cannot use those indicators on the new ZOO-MT4/5.

Reply With Quote
  #68 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731

Moved the calculation of the Hilbert Transform into the Sine Wave so that there are no longer any dependencies on external classes, and made some performance improvements to reduce CPU load substantially. Please report any problems.

I think this is now the best performing Hilbert Sine Wave of this type that can be found anywhere. However, John Ehlers has introduce a newer, Even Better Sine Wave that is nothing like this one.


__Oscillator Hilbert Sinewave.cs



"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #69 (permalink)
 
noyss's Avatar
 noyss 
Ibiza. Spain
 
Experience: Intermediate
Platform: MT4
Broker: Darwinex
Trading: EminiSP, Crude, Euro/Dolar, Bitcoin.
Posts: 76 since Jul 2012
Thanks Given: 121
Thanks Received: 32


Zondor View Post
Moved the calculation of the Hilbert Transform into the Sine Wave so that there are no longer any dependencies on external classes, and made some performance improvements to reduce CPU load substantially. Please report any problems.

I think this is now the best performing Hilbert Sine Wave of this type that can be found anywhere. However, John Ehlers has introduce a newer, Even Better Sine Wave that is nothing like this one.


Attachment 144656





Hi Zondor,


Using these 2 indicators __Oscillator Hilbert Sinewave and __HilbertSinewaveOscillator2 . I still prefer __HilbertSinewaveOscillator2. I use range bars and japanese bars and works better your first one for me.


Thank you for your work

Reply With Quote
Thanked by:
  #70 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: Ninjatrader®
Broker: CQG, Kinetick
Trading: Gameplay Klownbine® Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731



Quoting 
Using these 2 indicators __Oscillator Hilbert Sinewave and __HilbertSinewaveOscillator2 . I still prefer __HilbertSinewaveOscillator2. I use range bars and japanese bars and works better your first one for me.


They SHOULD, work exactly the same, unless the second one has coding errors.

"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.”
Prof. Albert Bartlett
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on November 20, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts