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 cory with 1 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.8 thanks per post
    2. looks_two cory with 2 thanks per post
    3. looks_3 Big Mike with 2 thanks per post
    4. looks_4 Azzzz with 0.5 thanks per post
    1. trending_up 2,902 views
    2. thumb_up 17 thanks given
    3. group 5 followers
    1. forum 9 posts
    2. attach_file 4 attachments




 
Search this Thread

EhlersFilter for Ninja 7

  #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?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
The Program
20 thanks
GFIs1 1 DAX trade per day journal
19 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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

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
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


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:	170
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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

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.



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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

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:




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,399 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,538


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 Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on October 1, 2012


© 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