Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Futurestrader posted TOS code below in the create indicator for free thread, looking for his TOS code converted to NT. It is a Triple Keltner. Does anyone know if it was done or how to do it.
I have once taken the Keltner Universal Indicator and created volatility channels by adding it three times. This indicator is more versatile than a simple Keltner.
-> you can use 27 different moving averages for the midband
-> the offset can be calculated from either the simple range or the average true range
-> midband and channel lines can be further smoothed
However, the indicator uses a single offset multiplier, which means that the channel lines are equidistant. If you wish I can modify it to allow for three different multipliers, which can then be set to your default values 1.75, 2.5 and 4.0.
Fats, I have no idea what any of that means unfortunately,lol, but sounds great. Will it be easy to plot and use for someone not familiar with the indicator or coding. Tks again .
Can you post a chart from TOS? I have now added the variable offsets. The code from TOS specifies an EMA(45) as the midband. It further uses an ATR(45). The problem here is that I do not know, whether the definition of the ATR from TOS follows the original formula by Welles Wilder or not. If I remember, TOS has both formulas. If this is the regular EMA(45) of the true range, it means that it is an ATR(23) in NinjaScript.
Chart attached. It is now possible to select different offset multipliers. Will post in the downloads, as soon as I have tested it.
You are right. It is not the Wilder ATR. However, I am a bit confused. If I look at the TOS chart, the EMA(45) seems to be correct, but the Keltner Channels come out too narrow.
I have checked my version against the classic Keltner Channel (with SMA / simple range setting) and it perfectly matches the original Keltner Channel. Can you tell me, why the TOS bands are narrower and have a different shape? Or is there anything that I have overlooked?
I just found out the reason. The average true range from TOS is a SMA(True Range), not an EMA. If I set the smoothing for the true range of my indicator to "SMA", then the two charts show a perfect match....