Help With EasyLanguage Notation of John Ehlers 4 Pole Gaussian Filter - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

Help With EasyLanguage Notation of John Ehlers 4 Pole Gaussian Filter
Updated: Views / Replies:2,583 / 1
Created: by cameroon Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Help With EasyLanguage Notation of John Ehlers 4 Pole Gaussian Filter

  #1 (permalink)
Trading Apprentice
New York, New York
Futures Experience: Intermediate
Platform: Thinkorswim
Favorite Futures: Stocks
Posts: 1 since Mar 2012
Thanks: 0 given, 0 received

Help With EasyLanguage Notation of John Ehlers 4 Pole Gaussian Filter

Here's the EasyLanguage code for John Ehlers' 4 Pole Gaussian Filter:

Four Poles: f = alpha^4g + 4(1-alpha)f[1] - 6(1-alpha)^2f[2] + 4(1-alpha)^3f[3] - (1-alpha)^4f[4]
g=price and where alpha = =-Beta+SQR(Beta^2 +2*Beta), and Where Beta = (1 – cos(symbol)) / (1.414^2/N – 1), where symbol = 2pi/P, N = # of poles in the filter, in this case 4, and P = Period, i.e 15

Here's what I came up with: (I just solved what 2pi b/c I don't know the function to use for pi, and I solved what 1.414^(2/N); N=4(4 Pole), so equals 1.18911732 minus 1 from the EasyLanguage formula above. The problem I'm experiencing is that I get a legit plot for 15 period, but once I adjust the plot, i.e move to 20 period, it goes insane, rendering it useless for higher than 20 period. Reason? Any suggestion would be awesome.

input period = 15;
input paintbars = {"Yes", default "No"};
def price = vwap;
def symbol = (6.28318531) / period;
def beta = (1 – Cos(symbol)) / (0.18911732);

def alpha = -beta + Sqr(power(beta,2) + (2 * beta));
rec Gaussian = (Power(alpha, 4)) * price + (4 * (1 - alpha)) * Gaussian[1] - 6 * Power(1 - alpha, 2) * Gaussian[2] + 4 * Power(1 - alpha, 3) * Gaussian[3] - Power(1 - alpha, 4) * Gaussian[4];

plot GF= Gaussian;

Reply With Quote
  #2 (permalink)
Trading Apprentice
San Francisco
Futures Experience: Intermediate
Platform: NinjaTrader, thinkorswim
Favorite Futures: ES
Posts: 1 since Apr 2012
Thanks: 0 given, 1 received

The thing to remember with EasyLanguage code is that it automatically converts degrees to radians whereas thinkscript does not. Here's a Gaussian 2-pole filter in thinkscript. Hope this helps.

declare upper;
input period = 9;

script DegToRad {
input degrees = 0.0;
plot DegToRad = degrees * Double.Pi / 180;

def beta1 = 2.415 * (1 - Cos(DegToRad(360.0 / period)));
def alpha = -beta1 + Sqrt(beta1 * beta1 + 2 * beta1);

def mCoef1 = alpha * alpha;
def mCoef2 = 2 * (1 - alpha);
def mCoef3 = -(1 - alpha) * (1 - alpha);

rec mFilterSeries = mCoef1 * hl2 + mCoef2 * mFilterSeries[1] + mCoef3 * mFilterSeries[2];

plot GaussianFilter = if IsNaN(close[2*period]) then Double.NaN else mFilterSeries;


Reply With Quote
The following 3 users say Thank You to divzero for this post:


futures io > > > > > Help With EasyLanguage Notation of John Ehlers 4 Pole Gaussian Filter

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
John Ehlers Zero Lag ebtrader ThinkOrSwim Programming 9 May 21st, 2018 07:43 PM
Center of Gravity by John Ehlers Silvester17 NinjaTrader 10 June 9th, 2014 04:45 PM
Edit a Vote Pole zt379 Off-Topic 1 October 8th, 2011 12:39 AM
Remove scientific notation jakfourie Matlab, R project and Python 2 September 7th, 2011 05:12 PM
Stripper Works Pole On NYC ‘L’ Train kbit Off-Topic 0 May 27th, 2011 10:59 AM

All times are GMT -4. The time now is 01:27 AM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts
Page generated 2018-05-23 in 0.08 seconds with 19 queries on phoenix via your IP