High Customizable Keltner

Here you can post and download custom indicators written in JavaScript.

Moderator: admin

High Customizable Keltner

Postby Alexander.Gettinger » Wed May 02, 2018 11:39 am

Keltner indicator looks similar and is calculated similar to the Bollinger Band Indicator.

In common, formula is:

Keltner.High(i) = Smooth(Source) + Variation * Factor
Keltner.Low(i) = Smooth(Source) - Variation * Factor

There are many choices how to smooth the source and what is the variation.

The most common cases are:
Case 1). Smoothing is Moving Average, Source is Close, Variation is average of the differences between high and low:
Keltner.High = Avg(Close) + Avg(High - Low)
Keltner.Low = Avg(Close) - Avg(High - Low)

Case 2). Smoothing is Moving Average, the Source is Median and Variation is Average True Range
Keltner.High = Avg((High + Low + Close)/3) + ATR(Bar)
Keltner.Low = Avg((High + Low + Close)/3) - ATR(Bar)

The implementation here lets you customize the source, smoothing method and variation method.
Source can be:
a) Close Price
b) Median as (High + Low) / 2
c) Median as (High + Low + Close) / 3

Smoothing could be:
a) Simple Moving Average (MVA)
b) Exponential Moving Average (EMA)
c) Linear Weighted Moving Average (LWMA)
d) Smoothed Moving Average (SMMA)
e) Wilder's Moving Average (WMA)

Keltner.PNG


Download:
Keltner_JS.jsl
(6.87 KiB) Downloaded 423 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to JavaScript Indicators and Strategies

Who is online

Users browsing this forum: No registered users and 11 guests