NexusFi: Find Your Edge


Home Menu

 





John Ehlers Zero Lag


Discussion in ThinkOrSwim

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




 
Search this Thread

John Ehlers Zero Lag

  #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?
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
 
xplorer's Avatar
 xplorer 
London UK
Site Moderator
 
Experience: Beginner
Platform: CQG
Broker: S5
Trading: Futures
Posts: 5,981 since Sep 2015
Thanks Given: 15,506
Thanks Received: 15,423


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 Twitter Reply With Quote




Last Updated on September 10, 2019


© 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