As per a user request, I have added a new band type called MPD (maximum price deviation) bands which are calculated by computing (H-L)/2 for the current bar, and then adding to the basis. No averaging is done in this case.
Keltner is similar in nature as it only uses the curent bar high & low as in H-L (but not divided by 2 as MPD), however it is averaged in the same way as the basis, dynamically.
Stoller uses the True Range instead of Keltner's unmodified range and then averages it out dynamically.
Note that many indicators call Stoller, Keltner confusing the band type. Stoller is much less known than Keltner these days, however the band type is Stoller (ATR) and not Keltner as given by many indicators. In DynaBands it is correctly calculated as per the originator, with the exception of using a dynamic time period instead of a static one.
After making a mistaken interpretation of the way MPD bands to work, I have revised the whole computation as per the new script (V1.5.5) attached.
The way the MPD bands work now are as follows:-
1. The computation is based on the day's hi/lo not the individual bar then divided by 2 and added/subtracted from the basis and multiplied by some factor, try .618 for example being a Fib number.
2. The default is to use the same dynamic time period as the basis.
3. The option is to set the MPD bands on a different time period from the basis as long as it is inside the basis time period, for example (all times are US Eastern Standard Time):-
Basis Time Period 7:00 - 16:00 (usual time for US based index futures traders say)
MPD Bands Rime Period 9:30 - 10:30 (1st hour of US cash markets)
So in this case no bands will be displayed until 9:30, only the basis and then for the time period 9:30-10:30 the MPD bands will be computed and increase accordingly until 10:30, after 10:30 the Hi/Lo would have been fixed and the range will continue to be added/subtracted from the basis at the same amount as computed between 9:30-10:30 until the basis stops being displayed at 16:00.
Any new suggestions/revisions/bug reports are all welcomed and I will do my best to update the script when time permits. I am an active day trader so I cannot spend too much time with script writing. My current goals with the script are:-
1. Add a static period capability i.e. to display all the bands in the traditional manner with fixed periods rather than dynamic periods.
2. Split the day up into at least 3 sections for the dynamic display to show different bands for the morning, doldrum and afternoon sessions.
Comment