add text above all candlesticks
See original GitHub issueI have 1 month data to plot. I already drew the candlestick chart. Now I wanna add text above all candlesticks. Here ia a question, the data length is about 40000, if I add text above all bars, that would be so slow and stucked in the UI rendering. Could I use ax.plot instead of fplt.add_text? How to realise it?
figure 1:
code:
class CandleText():
def __init__(self, data, col_name, color):
self.data = data
self.col_name = col_name
self.color = color
self.high = self.data['high']
def add_candle_text_all(self):
date_ls = self.data
print('add_candle_text_all index')
date_index = self.data.index
# print(date_index[-1])
for i in tqdm(range(len(self.data))):
fplt.add_text((date_index[i],self.high[i]), f'{self.high[i]}', self.color)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to add a string comment above every single candle using ...
You should be able to do this using Axes.text(). After calling mpf.plot() then call ax1.text(). for each text that you want (in your...
Read more >Add a number or a symbol above/below a candle chart with ...
Basically every number under/above a candle will be a call to make_addplot(), and it represents a reference to a signal. But I need...
Read more >Candlestick Pattern Editor - thinkorswim Learning Center
The Candlestick Pattern Editor is a thinkorswim interface that allows you to create your own candlestick patterns in addition to the extensive list...
Read more >Recognizing over 50 Candlestick Patterns with Python - Medium
Candlestick charts can be plotted to extract patterns from OHLC data for any tradable instrument. A candlestick pattern is a movement in prices ......
Read more >Candlestick Patterns For Beginners (The Ultimate Guide)
Two common mistakes almost all new traders make when trading candlestick patterns—and how to avoid it 4. A powerful candlestick trading ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@highfestiva Love you so much, you saved me. Here is another question, how to remove them all at once?
I found this funciton clear_items(drop_keys) in ScatterLabelItem class. I am confused about the “drop_keys”, what is drop_keys? How can I get the drop_keys?
It seems does not work. Fine, I give up, I’ll try it later. Thanks any way