Post by johncw on Aug 1, 2018 19:25:14 GMT
Nice job fxshrat, the VAP really adds useful info to the P&F. Are you able to share some code to help the AFL challenged?
I have made two different modes for VAP calculation (using Volume Distribution function):
(1.) First one uses the Volume of each OHLC bar of P&F bar direction and H/L of OHLC bar within P&F bar. Start bar is first visible bar and end bar is last visible bar.
So in the example picture below and the example P&F bar from 2016-04-27 to 2016-05-06 it is the single volume and H/L of 9 OHLC bars to be used. Same goes for any other P&F direction within chart area.
(2.) Second mode uses the overall Volume of each P&F bar and uses H/L of P&F bar. Since those three ones and some other vars are stored in a matrix... as startbar and endbar argument it is used the first and last P&F column of visible chart area. Also since distribution function expects array arguments for the three variables I have used matrix getblock function and with array mode set to true.
Some more explanations of lower pane of example picture.
The colors of OHLC price: red/yellow one is P&F down bar reversal signal... green/yellow one is P&F up bar reversal signal... yellow ones are continuation signals.
The red histogram is the OHLC bar volume of bearish P&F bar direction
The green histogram is the OHLC bar volume of bullish P&F bar direction
fxshat,
Very nice. Thanks for posting the explanation. I am curious if you found intraday PnF useful?
John