NexusFi: Find Your Edge


Home Menu

 





How to apply dominant cycle period, amplitude and phase shift


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one wldman with 3 posts (2 thanks)
    2. looks_two mk77ch with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Royal Flush with 1 posts (0 thanks)
    1. trending_up 6,460 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 4 attachments




 
Search this Thread
  #1 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 162 since Oct 2010
Thanks Given: 30
Thanks Received: 423

hi guys,

i found an indicator which calculates the dominant cycle, amplitude and phase shift using the discrete hilbert transform. my idea is to use those informations to create a sinus wave form indicator which plots those cycles according to those calculations.

 
Code
private double phase = 10.0;
private int shift = 0;
private double pi = 3.14159265;

calc = Math.Sin(((CurrentBar+shift)*(pi/phase)));

Cycle.Set(calc);
does anybody have an idea how i could add those parameters to plot a valid cycle?

thank you and cheers,
mike


Started this thread Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696


searched the forums? Pretty sure you will find already complete that which you desire to create.

Dan


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,583 since Aug 2011
Thanks Given: 2,093
Thanks Received: 9,696

@mk77ch

I think most of the cycle period work here in NT is based on the work of John Ehlers. The adaptive cci that I use definitely is. I have a guy when it comes to cycle period analysis... an old friend from a the past. He has a website that I think might interest you. There is some content that is "free". I know Lars pretty well and over the years have learned a lot from his approach. However I never purchased any products from him. In the formative days he provided a great deal for free to help with testing. Anyway I have no commercial connection. I do, though , pay attention to Lars and check his latest work every chance I can. Here is his site. I'd scrub it for details to his approach to the topic. www (dot) whentotrade (dot) com.


Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 
ElChacal's Avatar
 ElChacal 
Houston, TX
 
Experience: Intermediate
Platform: NinjaTrader TWS Barchart
Broker: IB / IB
Trading: SPY, QQQ
Posts: 419 since Nov 2014
Thanks Given: 474
Thanks Received: 278

@mk77ch
Have you had any luck phase shifting with your code? I came up with a "waveform" (not a sinewave though) that I would like to shift forward a little but I've had no luck. I found a couple of codes in Matlab that allegedly do this using Fast Fourier Transforms.
I am just wondering if you had any luck phase shifting, if so what approach are you employing?
Thanks!


Reply With Quote
  #7 (permalink)
 
Royal Flush's Avatar
 Royal Flush 
Stanstead, Quebec, Canada
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL
Posts: 122 since Dec 2010
Thanks Given: 71
Thanks Received: 64


wldman View Post

I have been unable to find any information on the net regarding how to read Elhers Dominant Cycle. Below it appears that it is a leading indicator saying that the next dominant cycle will be up. This seems to good to be true, is it?


Reply With Quote
  #8 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 162 since Oct 2010
Thanks Given: 30
Thanks Received: 423

this is an old thread but i recently started again to try and get a bit more into the subject as i believe this could be pretty powerful.

i will attach the indicators and a screenshot. maybe somebody who is into math and cycles could shed some light on this. the question which still remains is if it is possible to generate a cycle oscillator based on the period, amplitude and phase values from this indicator.

thank you in advance, math stranger genius
mike


I never lose. I either win or learn.
Nelson Mandela

The Potion | Konje | Pride | Stick Season | Breathe
Attached Thumbnails
Click image for larger version

Name:	dht.png
Views:	429
Size:	50.9 KB
ID:	212283  
Attached Files
Elite Membership required to download: dht.cs
Elite Membership required to download: cycle.cs
Started this thread Reply With Quote




Last Updated on July 15, 2016


© 2026 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 - Downloads - Top
no new posts