Skip to content
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

Feature Request: renko with specific starting price value #149

Open
zoli2750 opened this issue Jun 3, 2020 · 5 comments
Open

Feature Request: renko with specific starting price value #149

zoli2750 opened this issue Jun 3, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@zoli2750
Copy link

zoli2750 commented Jun 3, 2020

In the current version the renko bricks are calculated from the beginning of the dataframe.
Calling the plot later with updated dataframe the bricks' calculation results in different chart.

It would be great to have a set starting/turning value point in pips, multipules of minimal tick movements, fraction of 1point or set at/by the bricksize value.

@zoli2750 zoli2750 added the enhancement New feature or request label Jun 3, 2020
@coffincw
Copy link
Collaborator

coffincw commented Jun 3, 2020

Would you be able to send an example of this requested feature?

@zoli2750
Copy link
Author

zoli2750 commented Jun 3, 2020

Hi, sure:

the charts are drawn as the titles say, the second ca 30sec later, the dateframe is 2mins ohlc data.
For both charts a new data is reqested with timeframe: 15000s.

With black circled, the bricks end on different pricelevels,
with blue the number of bricks differs.

They are both a long time ago in respect of calculation method, shouldn't differ as the calculation only effects the most recent 1 or maybe two bricks.

When the first brick starts not on a random pricelevel, this behaviour is less of an issue,
will be there still, when the base data has no sufficiently fine granulation.
Ideally the set starting level is optional to let other users decide if it is beneficial or not.
The set starting position theoretically could be bounded to pricelevel or time (start of session or calendar day or RTH)
For intraday charting for the time bound starting position would be enough to have an index or timestamp on each brick which would allow also the max bars display.

149_1

149_2

@DanielGoldfarb
Copy link
Collaborator

@zoli2750 ,
Thank you. Would you please, if possible, also provide both the data and the code that you used to generate these plots? --Daniel

@zoli2750
Copy link
Author

zoli2750 commented Jun 6, 2020

I understand that with renko the support and resistance levels are more approximate then with candles, and renko works better with higher bricksizes.
Such a difference in plots with smaller bricksize not that really matters.

The set starting point or max displayed barnumber could be achived with the return_calculated_values, because there is a "barnumber" like index, but there is something there.

Let's resume it until the new release, as the return_calculated_values returns seemingly strange values, might be connected with the displayed y values.

data used:
149_4

return_calculated_values returning much more values, than what the plot displays, which is hard to translate. It might be that the returned values are the trend starting and reversal points, but they are not signed as such. The "minx,maxx,miny,maxy" values could give a clue but they are the same.
With the new release they could change as well.

149_3

and the plot:
149_5

@zoli2750
Copy link
Author

I have read through the resource code, I do not understand what happens... :)
The 'return_calculated_values' returns considerably more data points than what is on the plotted figure.
When I insert the 'print(len(brick_values))' in the plotting.py line 317 , it returns the number of bricks plotted, the print(len(closes)) inserted to the line 312 retunrs the number of the plotted 'candle' type bars.
With this values it might be possible - in the future - to introduce a general 'barnumber' index/parameter, which then could be used for maximizing the displayed bars, horizontal scrolling - maybe with matplotlib's slider, or for addplot to non timebased charts.
But how? with my less than limited pythonbase I don't know. :)
So this request can be closed.
I really appriciate the effort you put in this package and in the renko extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants