NexusFi: Find Your Edge


Home Menu

 





John Ehlers Zero Lag


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,772 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?
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 6,270 since Sep 2015
Thanks Given: 15,955
Thanks Received: 16,194


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