-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNF Box Dates & Renko reversal size #623
Comments
Please take a look at the Output from cell Is that not what you are looking for?? |
Hi Daniel, In [9] gives the Dates for each column (start of the trend), but I am looking for the dates within each column for the X/O boxes. Currently there is the pnf_values and my requested dates would give the time of reaching these pnf_values. From performance point of view it would also consume more calcuation time to run pnf and renko. I guess a solution would be, where there is the trigger to fill the pnf_values array, in the same time the requested pnf_box_date array can be filled with the date of the tick. The overall idea is to have the exact dates of signals that can be then used to transfer to a candlestick chart. Nevertheless, an reversal parameter in the renko would also be great, like it was added to the pnf. |
OK. I did some playing around with the dates, and I've added a new key to the Try this: The new key is called Regarding dates for renko, they are already there, under the key As a general rule, to see what is in the calculated values dict, you can use code similar to this: cv= {}
mpf.plot( df, type='renko', return_calculated_values=cv, volume=True)
print('\ncv.keys()=',cv.keys(),'\n')
import pprint
pp = pprint.PrettyPrinter()
pp.pprint(cv) The above will show you everthing in the return_calculated_values dict, so there is no need to remember what key each item is listed under. |
Many thanks for this wonderful resource! |
@SSTrader100 |
Thanks for the clarification. I am plotting 5 minute bars as Renko and I refresh the chart every five minutes. The starting date and time do not change. So, after refresh, often the previous Renko bars change since the latest ATR has changed. After your clarification, I have used pandas_ta to calculate the ATR for the bar just before my starting price bar. In order to avoid unnecessary calculations, I am creating a small DF t get this single ATR value. this ATR does not change during refresh and even when I plot the data from the same starting price bar anytime. This is the code I used: Calculate the ATR based on the df_for_atr using pandas_ta
|
@SSTrader100 |
First of all my big appreciation to Daniel and all other contributors for this great resource!
I have a request regarding the 'pnf' resp. 'renko' chart:
Is it possible to include to the return_calculated_values an additional array, that contains the dates for each box (e.g. pnf_box_date), that is matching the pnf_values? I guess it can be created easily in the same step when the pnf_values is processed.
I tried to get the dates from the renko return_calculated_values, but since there is no reversal size considered and therefore not equivalent to the 'pnf' chart, it was not possible. This would lead to my 2nd proposal to add reversal brick according to the 'pnf' logic.
The text was updated successfully, but these errors were encountered: