NexusFi: Find Your Edge


Home Menu

 





John Ehlers Zero Lag


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,741 views
    2. thumb_up 1 thanks given
    3. group 56 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Srt4ever
Miami+Florida/united states
 
Posts: 1 since Aug 2019
Thanks Given: 0
Thanks Received: 0

Good afternoon, Im looking for the original John Ehlers Zero Lag indicator for ThinkorSwim, if anyone has it or can program it can you please send it my way, thank you have a great day.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The Backwardation Signal: How the CL Futures Curve Tells …
Commodities
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
CPI Eve: Fed Hike Odds Hold at 52% for the First Time, I …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 6,241 since Sep 2015
Thanks Given: 15,909
Thanks Received: 16,138


Srt4ever View Post
Good afternoon, Im looking for the original John Ehlers Zero Lag indicator for ThinkorSwim, if anyone has it or can program it can you please send it my way, thank you have a great day.


Reply With Quote
Thanked by:
  #3 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35



Srt4ever View Post
Good afternoon, Im looking for the original John Ehlers Zero Lag indicator for ThinkorSwim, if anyone has it or can program it can you please send it my way, thank you have a great day.

Here is another version by Mobius.

 
Code
# Zero Lag EMA (Using an Error Correcting Filter) 
# Mobius 
# Ported to TOS 08.31.2016 from Article by John Ehlers 
# Using an EMA error term, the current price – EMA[1], the amplitude of the error term is altered by multiplying the error by a gain term. The new filter is an EC or Error Corrected EMA. 

# Inputs: 
input Length = 20; 
input GainLimit = 50; 
input LabelsOn = yes; 

 

# Vars: 
def alpha; 
def BestGain; 
def EC1; 
def Gain; 
def EC; 
def Error; 
def LeastError; 
def EMA; 

alpha = 2 / (Length + 1); 
EMA = alpha * close + (1 - alpha) * EMA[1]; 
plot EMAdata = EMA; 
EMAdata.SetDefaultColor(Color.Yellow); 
Gain = fold g = -GainLimit to GainLimit 
       do getValue(g / 10, g); 

EC1 = fold V = -GainLimit to GainLimit 
      do alpha * (EMA + (fold i = -GainLimit to GainLimit 
                         do i / 10) * (Close - EC1[1])) + (1 - alpha) * EC1[1]; 

Error = AbsValue(Close - EC1); 
If Error < 1000000 
Then { 
LeastError = Error; 
BestGain = Gain; 
} else { 
LeastError = LeastError[1]; 
BestGain = 0; 
} 

EC = alpha * (EMA + BestGain * (Close - EC1)) + (1 - alpha) * EC1; 

Plot ECdata = EC; 
ECdata.SetDefaultColor(Color.Cyan); 
AddLabel(LabelsOn, "Standard EMA", color.yellow); 
AddLabel(LabelsOn, "Error Corrected EMA", color.cyan); 
#End Code Error Corrected EMA


Follow me on X Reply With Quote




Last Updated on September 10, 2019


© 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