A shared indicator AddPriceTargetToRectangles and a drawing tool RectangleWithPriceTarget by NinjaTrader_PatrickH implement an approach laid out in the June 2007 Stocks and Commodities article titled "How Effective Are Rectangles?" by Markos Katsanos.
The above scripts define a factor used to calculate the predicted price as:
Math.Pow(2.3 * rectHeight, .8); (Wrong)
This formula calculates a wrong value for the factor.
The correct formula as defined in the referenced article should be coded as:
2.3 * Math.Pow(rectHeight, .8); (Correct)
Please notice these expressions calculate different values as the article defines the factor as:
b = 2.3 *(Height)^0.8 that is different from
b = (2.3 * Height)^0.8 used in the codes referenced.
Ref:
Comment