The code takes the pivot line and adds the average daily ranges of the previous days to create support and resistance bands. Lines are plotted with ATR*1 and ATR*2.
How to use and read:
CODE:
BP = (Dhigh(1)+Dlow(1)+Dclose(1))/3
n = 20
Move = AverageTrueRange[n](BP)
far = 2
A = BP-Move
A2 = BP-(Move*far)
B = BP+Move
B2 = BP+(Move*far)
RETURN A As "N-", A2 As "2N-", B As "N+", B2 As "2N+", BP As "BalancePoint"
You must be logged in to post a comment.
I guess you are right, like always. If you change n to 24 you have at least the hours of a day, even if it is moving and the BP not. The reason it regularly fits to the current market is it's adaptability. If you plot Pivot lines, to which the market usually reacts intraday, they are always somewhere inbetween ATR and ATR*2 and they are regularly invalidated. ATR*2 is only in strong trends invalidated. Just yesterday Gold went to ATR*2 retraced there and waited for a new day and lower resistance levels to take out my stop.
Something I did not mention of what you can read, as I am still not sure about. If market starts above BP, you have to consider top ATR*2 and bottom ATR as major resistance and support. If it starts below BP, you can consider ATR*2 bottom and ATR top as major support and resistance. Can someone verify or invalidate this theory?
Nice Job
DerPat,
you can also change line1 to read as follow to adapt this script to hourly timeframes (and lower)
or just use