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,982 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

  #51 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

yet another 'adaptation' of SW with this one you can change price factor, look back period and alpha. Disclaimer:I have no idea of what are various calculations that I cut and paste from multiple internet sources.

Attached Thumbnails
Click image for larger version

Name:	ES 12-13 (5 Min)  10_22_2013.jpg
Views:	792
Size:	68.6 KB
ID:	126410  
Attached Files
Elite Membership required to download: SWave.cs
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
What broker to use for trading palladium futures
Commodities
 
  #52 (permalink)
 supermht 
Naperville IL
 
Experience: Intermediate
Platform: ninjatrader
Broker: NT broker
Trading: NQ ES 6E GC CL
Posts: 962 since Feb 2010
Thanks Given: 1,189
Thanks Received: 661

cory. have you made change to volume stop? i use you r volumestop7 on es 5min chart, but it is different from yours

Reply With Quote
  #53 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



supermht View Post
cory. have you made change to volume stop? i use you r volumestop7 on es 5min chart, but it is different from yours

I haven't posted any chart with volstop lately and I haven't change the core logic since ver. 3 so any version is good.

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


akso73 View Post
Just realized I had the selection for snr set to false. Cancel that request.

Is there Hilbert Sine Wave also for the new MT4?
Thanks Hermes
P.S. Ha, ha, ha... I am stars away from FX pupil.

Reply With Quote
  #55 (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

Coding of recently posted SWave indicator was a resource hog and a general mess, so without further ado, here is a (hopefully) improved version.

You will be able to run this one on COBC false if you are so inclined, without causing your processor to explode.

Rounding reduces the amount of wasted CPU load due to calculations that go past any reasonable number of significant digits.


"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 Files
Elite Membership required to download: __SWave.cs
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #56 (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

Looks as though, for most instruments, rounding to only five decimal places has no effect on the output. The one exception so far is the 6J, where 7 decimal precision seems to be needed.

Which raises the question of whether the CPU cycles needed for the rounding are less than those saved by reducing the precision of the calculations. I suppose this could be answered by measuring the backfill time for different configurations and printing it to the output window, but I haven't done that.

Has anyone tested my version against Cory's to see if they plot identically? I haven't bothered to do that yet, either.

Such laziness shows why I will never become a FUNded Trader®.

Maybe we should try using JFE's new, Even BETTER Sine Wave, to paint support and resistance lines on price charts.

"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
Thanked by:
  #57 (permalink)
 timefreedom 
Indianapolis, IN USA
 
Experience: Advanced
Platform: Ninjatrader TOS Custom
Broker: Several
Trading: ES CL ZB
Posts: 374 since Dec 2009
Thanks Given: 226
Thanks Received: 381


Zondor View Post
Looks as though, for most instruments, rounding to only five decimal places has no effect on the output. The one exception so far is the 6J, where 7 decimal precision seems to be needed.

Which raises the question of whether the CPU cycles needed for the rounding are less than those saved by reducing the precision of the calculations. I suppose this could be answered by measuring the backfill time for different configurations and printing it to the output window, but I haven't done that.

Has anyone tested my version against Cory's to see if they plot identically? I haven't bothered to do that yet, either.

Such laziness shows why I will never become a FUNded Trader®.

Maybe we should try using JFE's new, Even BETTER Sine Wave, to paint support and resistance lines on price charts.

Sounds like an interesting idea.

Reply With Quote
  #58 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


Zondor View Post
...
Has anyone tested my version against Cory's to see if they plot identically? I haven't bothered to do that yet, either.

Such laziness shows why I will never become a FUNded Trader®.

Maybe we should try using JFE's new, Even BETTER Sine Wave, to paint support and resistance lines on price charts.

no, they don't plot the same

Attached Thumbnails
Click image for larger version

Name:	ZS 05-14 (1 Min)  3_11_2014.jpg
Views:	546
Size:	91.6 KB
ID:	140024  
Reply With Quote
  #59 (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

Who would like to check my code and find the error? My version is not plotting correctly. So for now, don't use it.

However, I found the problem. The b2 coefficient must be calculated on every tick, AFTER Smooth[0] is known, because it is dependent on Smooth[0].

So the calculation of b2 can be left where it is, but the portion of it that depends on Smooth[0] must be stripped out of it and put into the Detrender calculation.
 
Code
                         if(FirstTickOfBar)   
                        {....                     
                         b1= Math.Round(3*price_val[1]+2*price_val[2]+price_val[3],NumberOfSignificantDigits); // rev march 11 2014
                         b2= Math.Round(-2*Smooth[1]+Smooth[2],NumberOfSignificantDigits);
                         ....}

                        Smooth[0]=(4*price_val[0]+b1)/10; // rev march 11 2014
			
			if (CurrentBar < barsback+7)   Detrender[0]=(price_val[0]-2*price_val[1]+price_val[2])/4;
			else			
			Detrender[0]=Math.Round((a12*(Smooth[0]+b2)+b3),NumberOfSignificantDigits); // rev march 11 2014
Another problem is that Smooth[0] does not seem to apply the correct weightings to the priceval terms. I think it should be (4*priceval[0]+3*priceval[1]+2*priceval[2]=1*priceval[3]) /10. That's why the calculation of Smooth[0] and of b1 should be changed as indicated above, and why this version does not plot identically to the one posted by @cory.

Now that I have revealed the problems, who would like to fix them? My updated version plots exactly the same as other versions of SineWave that I have seen, and loads EXTREMELY fast.




"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
Thanked by:
  #60 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090



Zondor View Post
Who would like to check my code and find the error? ..

looks good enough, who knows what it suppose to do any way?

Reply With Quote
Thanked by:




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