Hi, I made a transcript of the description of the link you have provided to code this indicator:
Alan Kelland’s Box – DaBox
You can download it directly from the library. Added the different timeframes capabilities for the highest high and lowest low calculation.
Thank you! Good luck and prosperity
Dear Nicolas! I see beautiful horizontal levels, but there is an error in the calculation of the angulars. So, for example, the annual box, the length of the main diagonal is 52 bars. But the indicator builds this diagonal with a length of 32 bars.
Use daily timeframe in order to calculate correctly the weekly levels and angular lines.
Apparently, the discrepancy does not lie in the selected timeframe.
I think I know why, angulars are plotted from start of the selected period to the most current bar, not a fictional bar in the future.
Nicolas, correct me if I’m wrong. Since we know the height and width of the square, we can calculate the points in the past from where we can draw similar lines – giving us the required diagonals.
Yes, but it doesn’t mean that x bars is a constant for each month in this example (monthly levels?).
As for now, I have a better comprehension on how the diagonals are plotted: they should start at first day of the period and end at the last day of the same period? For example: August 1st -> August 31st , is it correct?
Hello Nicolas, je reviens sur cet indicateur car je pense avoir trouvé un petit “couic” sur le dhigh(1) et dlow(1) indiqué à 1 alors que le bon fonctionnement est à 0 “zéro”! En dessous les lignes 14 et 15 d’origine
if myTimeframe = 0 then
hh = dhigh(1)
ll = dlow(1)
et la correction des lignes 14 et 15 ci après
if myTimeframe = 0 then
hh = dhigh(0)
ll = dlow(0)
si jamais il y a un truc qui m’échappe ou que j’ai mal interprété, je te lirais avec plaisir 😉
cordialement, swapping
swapping – English in the English forum please.
Oups !
Hello Nicolas, I come back on this indicator because I think I found a little “squeak” on the dhigh (1) and dlow (1) indicated 1 while the good operation is 0 “zero”! corrected is line 14 dhigh(0) and line 15 is dlow(0)