NexusFi: Find Your Edge


Home Menu

 





EhlersFilter for Ninja 7


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 4 posts (11 thanks)
    2. looks_two Azzzz with 2 posts (1 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 redratsal with 1 posts (1 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.8 thanks per post
    2. looks_two Big Mike with 2 thanks per post
    3. looks_3 cory with 2 thanks per post
    4. looks_4 Azzzz with 0.5 thanks per post
    1. trending_up 3,644 views
    2. thumb_up 17 thanks given
    3. group 5 followers
    1. forum 9 posts
    2. attach_file 4 attachments




 
Search this Thread
  #1 (permalink)
 Azzzz 
Ontario
 
Experience: Intermediate
Platform: Ninja
Broker: Amp Futures/Zen-Fire
Trading: ES, currancy
Posts: 24 since Nov 2009
Thanks Given: 12
Thanks Received: 6

I'm migrate to Ninja 7; I really like the indicator EhlersFilter which works in 6.5 but get errors when I try to import. It asks for RValurCharts which I have successfully installed. Is anyone running this indicator in 7?... Thanks


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
CFTC Launches Innovation Task Force for AI Trading Syste …
Traders Hideout
CME Cuts Precious Metals Margins Up to 21% Starting Toda …
Commodities
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
 
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)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090



Azzzz View Post
I'm migrate to Ninja 7; I really like the indicator EhlersFilter which works in 6.5 but get errors when I try to import. It asks for RValurCharts which I have successfully installed. Is anyone running this indicator in 7?... Thanks

Hi Azzzz,

I don't know if I understood well your question, nevertheless the doublema v7 https://nexusfi.com/free_downloads/vip_elite_circle/ has the EhlersFilter included:
1) you can use this indicator
2) you can take the EhlersFilter easylanguage code and personalize it


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 Azzzz 
Ontario
 
Experience: Intermediate
Platform: Ninja
Broker: Amp Futures/Zen-Fire
Trading: ES, currancy
Posts: 24 since Nov 2009
Thanks Given: 12
Thanks Received: 6

That did it..


Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114

I am guilty of having used code, which I had taken from the NinjaTrader forum here: NinjaTrader Support Forum - View Single Post - Ehlers Filter


Today I checked it for the first time and found it inconsistent with the Easy Language code which was published by John Ehlers.

The source for the code by John Ehlers can be found on his website, here is the link: https://www.mesasoftware.com/Papers/Ehlers%20Filters.pdf


Figure 6. EasyLanguage Code for the Distance Coefficient Ehlers Filter
 
Code
	Inputs:		Price((H+L)/2),
				Length(15);
	Vars:		count(0),
				LookBack(0),
				SumCoef(0),
				Num(0),
				Filt(0);
	Array:		Coef[25](0),
				Distance2[25](0);
	
	For count = 0 to Length - 1 begin
		Distance2[count] = 0;
		For LookBack = 1 to Length - 1 begin
			Distance2[count] = Distance2[count] + (Price[count] – Price[count 
	+ LookBack])*(Price[count] - Price[count + LookBack]);
		end;
		Coef[count] = Distance2[count];
	end;
	Num = 0;
	SumCoef =0;
	For count = 0 to Length -1 begin
		Num = Num + Coef[count]*Price[count];
		SumCoef = SumCoef + Coef[count];
	end;
	If SumCoef <> 0 then Filt = Num / SumCoef;
	Plot1(Filt, "Ehlers");


I found that the NinjaTrader implementation does not reflect the original code, so I have modified the indicator to show the Ehlers code. I am posting here, because I would love to have a third opinion on the indicator before I publish it. Sometimes John Ehlers has changed the code himself, so it may well be that there is a version, which I do not know.

Please find attached the modified indicator. I have not preset it to price type Median, as I want that it can be easily called by other indicators. The chart below shows that there is a difference between the forum indicator and the
recoded version. The recoded version is also optimized, as I have suppressed a dataseries object.



Attached Files
Elite Membership required to download: EhlersFilter.zip
Reply With Quote
Thanked by:
  #6 (permalink)
 
cory's Avatar
 cory 
virginia
the coin hunter
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,093


Fat Tails View Post
..

...

no matter what I enter, it always reset to 15, is this only value it can run on?


Attached Thumbnails
Click image for larger version

Name:	2012-07-12_1559.png
Views:	251
Size:	65.7 KB
ID:	81141  
Reply With Quote
Thanked by:
  #7 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


cory View Post
no matter what I enter, it always reset to 15, is this only value it can run on?

@cory: Thank you for the hint. I had changed the name from length to period to comply with NinjaTrader speak. However, I have decided to keep the parameter length to allow for the correct calculation of the average during the training period. The only thing I forgot, was to change the serialization to period.


You have discovered a little bug, which is now removed. I have also replaced indicator file and chart above.


There is still a difference between the two versions of the indicators.


Reply With Quote
Thanked by:
  #8 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114

The indicator code, which I had published above, did not properly set plot values for the first two bars of the chart. While this does not cause any harm, when the indicator is simply applied to chart, it may cause problems (exception thrown), when the Ehlers filter is called by another indicator.

I have therefore modified the code of the indicator to return proper values for all bars. I have also promoted it to the download section of the forum.

https://nexusfi.com/download/ninjatrader-7/indicators/1259-download.html?view

This indicator can be optionally called by the Bollinger Universal, Keltner Universal, Heikin Ashi and SuperTrend U11 indicators.


Reply With Quote
Thanked by:
  #9 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114

Today I discovered a small problem as the indicator did not produce a meaningful result, when the period was set to 1. The problem would probably have occurred as well with the original Easy Language code published by John Ehlers.

I have now corrected the bug and updated the indicator. When the period is set to a value smaller than 4, the indicator will now use a triangular moving average of that period as input series for calculating the Ehlers coefficients. For larger periods the coefficients are calculated from the TMA(4) as for the prior version.


The updated version is available here:

https://nexusfi.com/download/ninjatrader-7/indicators/1259-download.html?view


I will probably need to update the SuperTrend, Heikin-Ashi and Bollinger/Keltner indicators as well.


Reply With Quote
Thanked by:
  #10 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557


Notifications sent.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on October 1, 2012


© 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