On an Advance Chart, I would like to be able to add two lines similar to Bollinger Bands. These two lines would be based on Today's High and Today's Low, and one other variable. That other variable, called Daily Average Price Delta (DAPD), would be based upon a summation for each of the highs (hod) for the 21 days prior to today minus the summation for each of the lows (lod) for the last 21 days prior to today. The result of this calculation would then be divided by 21. The following formula represents this:
DAPD = (Sum (21 hods) - Sum (21 lods))/21
To produce these two lines that would work for any time interval, the DAPD would be added to Today's Low for one, and the DAPD would be subtracted from Today's High. The formulas would be as follows:
Upper Line = today's low + DAPD
Lower Line = today's high - DAPD
For example, the DAPD for IBM, based on the prior 21 days (not including today) should be 2.25, and would cause the Upper Line value for today, 11/19/02, at 10:46 a.m. to be 77.84+2.25=80.09 and the Lower Line value would be 78.80-2.25=76.55. How would I go about calculating the DAPD? And, then how would I use a formula to place these two lines on a chart?
DAPD = (Sum (21 hods) - Sum (21 lods))/21
To produce these two lines that would work for any time interval, the DAPD would be added to Today's Low for one, and the DAPD would be subtracted from Today's High. The formulas would be as follows:
Upper Line = today's low + DAPD
Lower Line = today's high - DAPD
For example, the DAPD for IBM, based on the prior 21 days (not including today) should be 2.25, and would cause the Upper Line value for today, 11/19/02, at 10:46 a.m. to be 77.84+2.25=80.09 and the Lower Line value would be 78.80-2.25=76.55. How would I go about calculating the DAPD? And, then how would I use a formula to place these two lines on a chart?
Comment