NexusFi: Find Your Edge


Home Menu

 





Ehlers Cycle Period Indicator


Discussion in NinjaTrader

Updated
    1. trending_up 7,841 views
    2. thumb_up 19 thanks given
    3. group 4 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 kabakj 
Palo Alto, CA/USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: GE
Posts: 3 since Jan 2013
Thanks Given: 2
Thanks Received: 2

Does anyone know of a Ninja implementation of John Ehlers' Cycle Period Indicator?

I've searched this forum and the internet for it without success. However the code is freely available in EasyLanguage (link below), and looks pretty straightforward. I note an earlier thread here in 2010 to do this, but the project doesn't seem to have been completed. There are a couple of comments in this and also the Ninja Support Forum that this useful indicator is missed. Whether you use Ehlers' indicators or not, I've found the cycle period to be a useful starting point to set the period of many oscillator-type indicators.

A similarly useful and simple indicator to code, also available in EasyLanguage, is the Ehlers S/N Indicator, that tells you when NOT to trade - speaks for itself!

Any suggestions would be much appreciated - I'm a defecting MetaStock user and attempting to set up with NinjaTrader. Thanks much.

See first entry on this page for PDF download:
https://scholar.google.com/scholar?hl=en&lr=&q=related:AA4nwjBTvAcJ:scholar.google.com/&um=1&ie=UTF-8&sa=X&ei=W8b1UIzWCKiU2QXYnIHgAg&sqi=2&ved=0CDYQzwIwAA


Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MegaETH Proves the Crowd Right: Prediction Markets Calle …
Prediction Markets & Event Contracts
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
New Section 301 Probes Target 16 Trading Partners -- Tra …
Traders Hideout
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
CFTC Launches Innovation Task Force for AI Trading Syste …
Traders Hideout
 
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
  #2 (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

all over the place on NexusFi (formerly BMT) and net.

What are you looking for?


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 kabakj 
Palo Alto, CA/USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: GE
Posts: 3 since Jan 2013
Thanks Given: 2
Thanks Received: 2


As noted, Cycle Period and S/N Ratio. Thanks.


Started this thread Reply With Quote
Thanked by:
  #4 (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,734

CCI – Making it better | Tucker Report

It's very straightforward to port over from EasyLanguage to Ninjascript.

However, most of the Ehlers implementations floating around out there are very, shall we say, naively coded. They include the typical beginner mistakes of failing to define reusable instances of external classes and calculating on every tick variables that only need to be calculated either once ONLY, or once per bar.

Which doesn't sound like something you would be interested in. Until you realize that the wasted CPU cycles contribute to Ninjatrader freezing up in fast markets.


"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 X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 kabakj 
Palo Alto, CA/USA
 
Experience: Advanced
Platform: NinjaTrader
Trading: GE
Posts: 3 since Jan 2013
Thanks Given: 2
Thanks Received: 2

Zondor, Not conversant with either EasyLanguage or NinjaScript I can't do this myself.


Started this thread Reply With Quote
  #6 (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,734

The Ehlers MESA Moving average is a Ninjatrader System Indicator, @MAMA.

This code shows how it can be modified to run better, especially on CalculateOnBarClose false.

Because redundant intrabar ticks that would not affect the value of the output are filtered out, the number of OnBarUpdate cycles executed on COBC false is reduced by as much as 90%. Many of the variables only need to be calculated once per bar, instead of on every tick as in the original, so each of those cycles is cheaper to run.

These techniques can easily be applied to virtually all of the Ehlers indicators.

Since this is a system indicator and the modifications were obvious, I don't see a problem with making it freely available.

Special thanks to Bill Dyer and Wilbur Whately.


"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: MA MESA.cs
Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on January 15, 2013


© 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