Jeffrey Kennedy Trend Analyzer

Viewing 15 posts - 1 through 15 (of 33 total)
  • Author
    Posts
  • #34055 quote
    Lighthouse
    Participant
    Master

    Help needed to translate to PRT

    In brief it is built using Williams%R, 5 period or 10 period or 15 period,  calculated on (ExponentialMovingAverage[5]-ExponentialMovingAverage[20])

    I cannot do it…. it gives me error or, anyway, not what is shown below

     

    from: http://indexswingtrader.blogspot.it/2012/05/so-you-think-you-can-count-but-can-you.html

    Followers of R.N. Elliott do count waves. This week Pretzel Logic’s Market Charts and Analysis (see blogroll) published a two part Introduction on understanding Elliott Wave Theory. After reading that 101 on counting waves, a handy tool for counting waves and thus analyzing the wave structure would come in handy, right?

    It happens some years ago Elliott Wave International’s chief commodity analyst and “Futures Junctures Service” editor Jeffrey Kennedy” presented his Trend Analyzing Tool in a webinar. On Tuesday, 22 December 2009, EWI disclosed the formula to the public on their website.

    JK Fast Line measures the most immediate, near-term progression of a market’s trend and smallest degree of the Elliott wave structure.

    JK Base Line measures the intermediate progression of a market’s trend.
    JK Slow Line (not show on screen shot) measures the long-term progression of a market’s trend.

    In the original JK_TA each panel of the indicator consists of three lines: a 5-period %R, a 10-period %R and a 15-period %R of the line concerned.
    A reading of 100 indicates an uptrend. A reading of 0 indicates a downtrend.

    The JK TA as such is as a proxy for clarifying the underlying Elliott wave structure:

    When all three lines in any version are flatlining (blended into one), it signals an impulsive, or motive, structure. See the blue lines in screen shot.
    On the other hand, anytime you see the three lines separate, it’s a strong signal that the market is yielding a countertrend, or corrective pattern.

    The JK_TA can be used on any instrument and on any time frame:
    The first, second and third chart depict the basic indicator for different time frames. The fourth chart shows a custom variant of JK_TA: the Fast, Base and Slow lines packed together in one panel,  selectable by the 5%R, 10%R or 15%R version of the three indicators.

    Anyone needing help in counting waves can download the thinkscript studies from the comment section. While the default settings are 5 and 20, these may be adjusted to ones preferences.
    Ready? Start counting!
    The indicator is based on Williams%R, which is provided in the TOS studies set.

    The default settings are three different Williams%R lines, each calculated for a
    Fast: (20-period exponential moving average) substracted from (5-period exponential moving average)
    Base: (5-period exponential moving average)
    Slow: (20-period exponential moving average)

     

    
    # Jeffrey Kennedy's Trend Analyzer Tool - JK_TA
    # Original by Jeffrey Kennedy/Elliott Wave Internatial Inc.
    # as presented on Tue, 22 December 2009 on www.elliottwave.com
    #
    # thinkscript by TrendXplorer
    # website: www.trendxplorer.info
    # e-mail: trendxplorer@gmail.com
    # Revised: May 29, 2012
    
    #hint:Jeffrey Kennedy's Trend Analyzer ToolnWhen all three lines in any version are flatlining as one, it signals an impulsive, or motive, structure.nAnytime the three lines separate, it's a strong signal that the market is yielding a countertrend, or corrective, pattern.
    
    #hint setting: select Fast, Base or Slow version of the 5-period %R, 10-period %R and 15-period %R settings for the JFTA_5, JFTA_10 and JFTA_15 lines.
    
    #
    # --- script begin ---- 
    #
    
    declare lower;
    
    input setting = {FAST, default BASE, SLOW};
    input price = close;
    input fastLength = 5;
    input slowLength = 20;
    
    def value;
    def color;
    switch (setting) {
    case FAST:
     value = ExpAverage(close, fastLength) - ExpAverage(close, slowLength);
     color = 1;
    case BASE:
     value = ExpAverage(close, fastLength);
     color = 2;
    case SLOW:
     value = ExpAverage(close, slowLength);
     color = 3;
    }
    
    # Original Williams%R calculation by TD Ameritrade IP Company, Inc. (c) 2007-2012
    def hv5 = Highest(value, 5);
    def lv5 = Lowest(value, 5);
    plot JKTA_5 = if hv5 == lv5 then 0 else ((hv5 - value) / (hv5 - lv5) * (-100) + 100);
    
    def hv10 = Highest(value, 10);
    def lv10 = Lowest(value, 10);
    plot JKTA_10 = if hv10 == lv10 then 0 else ((hv10 - value) / (hv10 - lv10) * (-100) + 100);
    
    def hv15 = Highest(value, 15);
    def lv15 = Lowest(value, 15);
    plot JKTA_15 = if hv15 == lv15 then 0 else ((hv15 - value) / (hv15 - lv15) * (-100) + 100);
    
    JKTA_15.SetDefaultColor(GetColor(9));
    JKTA_15.SetLineWeight(3);
    JKTA_15.SetStyle(curve.firm);
    JKTA_15.AssignValueColor(if color==1 then color.magenta else if color==2 then color.cyan else color.green);
    
    JKTA_10.SetDefaultColor(GetColor(9));
    JKTA_10.SetLineWeight(1);
    JKTA_10.SetStyle(curve.firm);
    JKTA_10.AssignValueColor(if color==1 then color.magenta else if color==2 then color.cyan else color.green);
    
    JKTA_5.SetDefaultColor(GetColor(9));
    JKTA_5.SetLineWeight(1);
    JKTA_5.SetStyle(curve.short_dash);
    JKTA_5.AssignValueColor(if color==1 then color.magenta else if color==2 then color.cyan else color.green);
    
    plot line50 = 50;
    plot line0 = 0;
    plot line100 = 100;
    line50.SetDefaultColor(GetColor(7));
    line50.SetLineWeight(1);
    line50.SetStyle(curve.firm);
    line0.SetDefaultColor(GetColor(7));
    line0.SetLineWeight(1);
    line0.SetStyle(curve.short_dash);
    line100.SetDefaultColor(GetColor(7));
    line100.SetLineWeight(1);
    line100.SetStyle(curve.short_dash);
    
    #
    # --- script end ---- 
    #
    
    
    **********************************************************
    
    # Jeffrey Kennedy's Trend Analyzer Tool - JK_TA_Combo
    # Original by Jeffrey Kennedy/Elliott Wave Internatial Inc.
    # as presented on Tue, 22 December 2009 on www.elliottwave.com
    #
    # thinkscript by TrendXplorer
    # website: www.trendxplorer.info
    # e-mail: trendxplorer@gmail.com
    # Revised: May 29, 2012
    
    #hint:Jeffrey Kennedy's Trend Analyzer Tool Combined versionnWhen all three lines in any version are flatlining as one, it signals an impulsive, or motive, structure.nAnytime the three lines separate, it's a strong signal that the market is yielding a countertrend, or corrective, pattern.
    
    #hint setting %R: select 5-period %R, 10-period %R or 15-period %R as settings for the JFTA_Slow, JFTA_Base and JFTA_Base lines.
    
    #
    # --- script begin ---- 
    #
    
    declare lower;
    
    input price = close;
    input setting_R = {"5", "10", default "15"};
    input fastLength = 5;
    input slowLength = 20;
    
    def period;
    switch (setting_R) {
    case "5":
     period = 5;
    case "10":
     period = 10;
    case "15":
     period = 15;
    }
    
    def fast = ExpAverage(close, fastLength) - ExpAverage(close, slowLength);
    def base = ExpAverage(close, fastLength);
    def slow = ExpAverage(close, slowLength);
    
    # Original Williams%R calculation by TD Ameritrade IP Company, Inc. (c) 2007-2012
    def hs = Highest(slow, period);
    def ls = Lowest(slow, period);
    plot JKTA_Slow = if hs == ls then 0 else ((hs - slow) / (hs - ls) * (-100) + 100);
    JKTA_Slow.SetDefaultColor(GetColor(6));
    JKTA_Slow.SetLineWeight(2);
    JKTA_Slow.SetStyle(curve.firm);
    
    def hb = Highest(base, period);
    def lb = Lowest(base, period);
    plot JKTA_Base = if hb == lb then 0 else ((hb - base) / (hb - lb) * (-100) + 100);
    JKTA_Base.SetDefaultColor(GetColor(1));
    JKTA_Base.SetLineWeight(2);
    JKTA_Base.SetStyle(curve.firm);
    
    def hf = Highest(fast, period);
    def lf = Lowest(fast, period);
    plot JKTA_Fast = if hf == lf then 0 else ((hf - fast) / (hf - lf) * (-100) + 100);
    JKTA_Fast.SetDefaultColor(GetColor(0));
    JKTA_Fast.SetLineWeight(2);
    JKTA_Fast.SetStyle(curve.firm);
    
    plot line50 = 50;
    plot line0 = 0;
    plot line100 = 100;
    line50.SetDefaultColor(GetColor(7));
    line50.SetLineWeight(1);
    line50.SetStyle(curve.firm);
    line0.SetDefaultColor(GetColor(5));
    line0.SetLineWeight(1);
    line0.SetStyle(curve.short_dash);
    line100.SetDefaultColor(GetColor(6));
    line100.SetLineWeight(1);
    line100.SetStyle(curve.short_dash);
    
    #
    # --- script end ---- 
    #
    GraHal thanked this post
    es5.jpg es5.jpg Trend-Analyzer.jpg Trend-Analyzer.jpg
    #34128 quote
    Lighthouse
    Participant
    Master

    Done 🙂

     

    //JKFast
    
    fastLength=5
    slowLength=20
    
    valuefast=ExponentialAverage[fastlength](close)-ExponentialAverage[slowlength](close)
    
    hv5 = Highest[5](valuefast)
    lv5 = Lowest[5](valuefast)
    
    if hv5 = lv5 then
    JKFast5=0
    else
    JKFast5=((hv5 - valuefast) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valuefast)
    lv10 = Lowest[10](valuefast)
    
    if hv10 = lv10 then
    JKFast10=0
    else
    JKFast10=((hv10 - valuefast) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valuefast)
    lv15 = Lowest[15](valuefast)
    
    if hv15 = lv15 then
    JKFast15=0
    else
    JKFast15=((hv15 - valuefast) / (hv15 - lv15) * (-100) + 100)
    endif
    
    Return JKFast5 coloured (255,150,255) as "JKFast5", JKFast10 coloured (255,100,255) as "JKFast10", JKFast15 coloured (255,50,255) as "JKFast15"
    

     

     

    //JK TA
    
    fastLength=5
    
    valuebase=ExponentialAverage[fastlength](close)
    
    hv5 = Highest[5](valuebase)
    lv5 = Lowest[5](valuebase)
    
    if hv5 = lv5 then
    JKTA5=0
    else
    JKTA5=((hv5 - valuebase) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valuebase)
    lv10 = Lowest[10](valuebase)
    
    if hv10 = lv10 then
    JKTA10=0
    else
    JKTA10=((hv10 - valuebase) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valuebase)
    lv15 = Lowest[15](valuebase)
    
    if hv15 = lv15 then
    JKTA15=0
    else
    JKTA15=((hv15 - valuebase) / (hv15 - lv15) * (-100) + 100)
    endif
    
    Return JKTA5 coloured (150,150,255) as "JKTA5", JKTA10 coloured (100,100,255) as "JKTA10", JKTA15 coloured (50,50,255) as "JKTA15"
    

     

     

    //JK Slow
    
    slowLength=20
    
    valuebase=ExponentialAverage[slowLength](close)
    
    hv5 = Highest[5](valuebase)
    lv5 = Lowest[5](valuebase)
    
    if hv5 = lv5 then
    JKSlow5=0
    else
    JKSlow5=((hv5 - valuebase) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valuebase)
    lv10 = Lowest[10](valuebase)
    
    if hv10 = lv10 then
    JKSlow10=0
    else
    JKSlow10=((hv10 - valuebase) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valuebase)
    lv15 = Lowest[15](valuebase)
    
    if hv15 = lv15 then
    JKSlow15=0
    else
    JKSlow15=((hv15 - valuebase) / (hv15 - lv15) * (-100) + 100)
    endif
    
    Return JKSlow5 coloured (150,200,0) as "JKSlow5", JKSlow10 coloured (100,200,0) as "JKSlow10", JKSlow15 coloured (50,200,0) as "JKSlow15"
    
    Nicolas and Zigo thanked this post
    Clipboard01.jpg Clipboard01.jpg JK-Fast.itf JK-Slow.itf JK-TA.itf
    #34140 quote
    GraHal
    Participant
    Master

    Hey well done Ciccio! Bet you’re well chuffed with yourself?

    I’m interested in any ‘tools’ re Elliott Waves … I’ll read the blog you mention in 1st post.

    Are you thinking of making an Auto-Trading Strategy with this or are you using for manual trading?

    Thank You for Sharing
    GraHal

    Lighthouse thanked this post
    #34157 quote
    Lighthouse
    Participant
    Master

    And here you are the Combo (in case anyone is interested)

     

    //JKFast
    
    fastLength=5
    slowLength=20
    
    valuefast=ExponentialAverage[fastlength](close)-ExponentialAverage[slowlength](close)
    
    hv5 = Highest[5](valuefast)
    lv5 = Lowest[5](valuefast)
    
    if hv5 = lv5 then
    JKFast5=0
    else
    JKFast5=((hv5 - valuefast) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valuefast)
    lv10 = Lowest[10](valuefast)
    
    if hv10 = lv10 then
    JKFast10=0
    else
    JKFast10=((hv10 - valuefast) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valuefast)
    lv15 = Lowest[15](valuefast)
    
    if hv15 = lv15 then
    JKFast15=0
    else
    JKFast15=((hv15 - valuefast) / (hv15 - lv15) * (-100) + 100)
    endif
    
    //JK TA
    
    valuebase=ExponentialAverage[fastlength](close)
    
    hv5 = Highest[5](valuebase)
    lv5 = Lowest[5](valuebase)
    
    if hv5 = lv5 then
    JKTA5=0
    else
    JKTA5=((hv5 - valuebase) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valuebase)
    lv10 = Lowest[10](valuebase)
    
    if hv10 = lv10 then
    JKTA10=0
    else
    JKTA10=((hv10 - valuebase) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valuebase)
    lv15 = Lowest[15](valuebase)
    
    if hv15 = lv15 then
    JKTA15=0
    else
    JKTA15=((hv15 - valuebase) / (hv15 - lv15) * (-100) + 100)
    endif
    
    //JK Slow
    
    valueslow=ExponentialAverage[slowLength](close)
    
    hv5 = Highest[5](valueslow)
    lv5 = Lowest[5](valueslow)
    
    if hv5 = lv5 then
    JKSlow5=0
    else
    JKSlow5=((hv5 - valueslow) / (hv5 - lv5) * (-100) + 100)
    endif
    
    hv10 = Highest[10](valueslow)
    lv10 = Lowest[10](valueslow)
    
    if hv10 = lv10 then
    JKSlow10=0
    else
    JKSlow10=((hv10 - valueslow) / (hv10 - lv10) * (-100) + 100)
    endif
    
    hv15 = Highest[15](valueslow)
    lv15 = Lowest[15](valueslow)
    
    if hv15 = lv15 then
    JKSlow15=0
    else
    JKSlow15=((hv15 - valueslow) / (hv15 - lv15) * (-100) + 100)
    endif
    
    Return JKFast5 coloured (255,150,255) as "JKFast5", JKFast10 coloured (255,100,255) as "JKFast10", JKFast15 coloured (255,50,255) as "JKFast15", JKSlow5 coloured (150,200,0) as "JKSlow5", JKSlow10 coloured (100,200,0) as "JKSlow10", JKSlow15 coloured (50,200,0) as "JKSlow15", JKTA5 coloured (150,150,255) as "JKTA5", JKTA10 coloured (100,100,255) as "JKTA10", JKTA15 coloured (50,50,255) as "JKTA15"
    

     

     

    PS

    I also corrected some syntax of the JK Slow indicator posted before

    Razz thanked this post
    Clipboard01-1.jpg Clipboard01-1.jpg JK-Trend-Analyzer-Combo.itf JK-Slow-1.itf
    #34531 quote
    Nicolas
    Keymaster
    Master

    Thanks a lot Ciccio! You are saving me 🙂 These ones could be posted into the library! Do you want me to push them there?

    Lighthouse thanked this post
    #34565 quote
    Lighthouse
    Participant
    Master

    OK 😉

    If you think they are useful do as you wish.

    #135629 quote
    vangarde
    Participant
    New

    Hello guys,

    I would like to have this indicator on Tradingview. Can anyone help me please?

    Thanks

    #135633 quote
    Vonasi
    Moderator
    Master

    vangarde – read the forum rules before posting again. Only use the language of the forum that you are posting in. This is an English language forum. Also do not double post. I have deleted your double post in French in this English language topic.

    These forums are dedicated to ProRealCode. If you want a translation to another language then try a forum dedicated to that language. Alternatively click on help and use the paid for programming service that Nicolas offers.

    vangarde thanked this post
    #135636 quote
    Zigo
    Participant
    Master

    Exellent stuff. Thanks!

    #135750 quote
    Zigo
    Participant
    Master

    I studied the indicator and have some good news, even at very short term graphs.

    In the middle the indicator as jou published and direkly and other vision.

    DOW-10-Seconden123JK.png DOW-10-Seconden123JK.png
    #135752 quote
    Nicolas
    Keymaster
    Master

    Thanks, but could you explain how we should interpret this new version? Sorry but that’s not very clear to me at first glance 😆

    #135755 quote
    Zigo
    Participant
    Master

    It must be “and at the bottom of the graph ” an other vision.

    #135757 quote
    Zigo
    Participant
    Master

    @Nicolas

    I added the sin(atan) version.

    Not change the indicator , but added the following:

    // from line 99 till end 118. I added my famous sin(atan) principle  
    // Zigo's vieuw:
    if (JKFast5 +jkslow5 +JKTa5) >20 then
    JK1 = 1
    else
    JK1=-1
    endif
    
    if (JKFast10 +jkslow10 +JKTa10) >20 then
    JK2=1
    else
    JK2=-1
    endif
    
    if (JKFast15 +jkslow15 +JKTa15) >20 then
    JK3=1
    else
    JK3=-1
    endif
    JK = sin(atan(JK1 +JK2 +JK3))
    JKTotal= JK-JK[1]
    Return jkTotal
    USDJPY-5-minutenJK.png USDJPY-5-minutenJK.png
    #135761 quote
    Zigo
    Participant
    Master

    The indicator works on every instrument and on every timeframe.

    PXI-4-urenJK.png PXI-4-urenJK.png
    #135763 quote
    Zigo
    Participant
    Master

    Sorry, the open and close were wrong.

    Hopely they are correct now.

    Nicolas thanked this post
    PXI-4-uren.JKpng_.png PXI-4-uren.JKpng_.png
Viewing 15 posts - 1 through 15 (of 33 total)
  • You must be logged in to reply to this topic.

Jeffrey Kennedy Trend Analyzer


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Lighthouse @ciccio Participant
Summary

This topic contains 32 replies,
has 9 voices, and was last updated by Meta Signals Pro
5 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/30/2017
Status: Active
Attachments: 19 files
Logo Logo
Loading...