New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.

Keltner Channels

What would be the code lines to identify stocks that are around the middle of the Keltner Channels? In other words > Lower Band, < Upper Band, and within say 2% above the middle band? Is there any way to do this in stock charts?

Comments

  • The middle of the Keltner Channel would be the ema the channels are based on. Also, if price is within 2% of the ema it will be inside the channels if the width of the channel is wide enough, so you probably don't have to scan for that - but you can if you want to.

    So, the general form you want is,

    and close < Upper Kelt Chan // you supply the correct syntax and parameters you want - use the drop downs
    and close > Lower Kelt Chan // on the scan workbench page

    and close < ema(x, close) * 1.02 // within 2% above ema
    and close > ema(x, close) * .98 // within 2% below ema

  • I guess what I am really trying to do is find stocks trading in the middle of the Keltner bands or at least around the EMA(26,2.5,26).
  • the middle of the Keltner bands is the ema. If the ema is 26 periods, substitute 26 for the "x" in the last two lines of my last answer.
  • I did that but when I run the scan it spits out a list that has stocks well above the middle of the channel toward the upper end of the keltner band.
  • then you need to specify a smaller per cent variation from the ema, e.g. 1.005, .9905. Experiment until you get what you want - 1.004, 1.003, etc.
  • lmkwinlmkwin ✭✭
    "well above" should be less than 2% according to the scan code. Maybe play with the Percent multiplier to get it to suit your needs? Change the 1.02 to 1.01 or 1.015? The Keltner Channel Top and Bottom are based on the ATR for the period. If the ATR is low, the Top and Bottom will run closer to the EMA.

    Maybe add a requirement that the Top - the Bottom / the Bottom needs to be above 10%(?) to get more space in your bands? maybe something like

    and [Upper Kelt Chan(26,2,10) - Lower Kelt Chan(26,2,10) / Lower Kelt Chan(26,2,10) > 0.1]
Sign In or Register to comment.