diff --git a/pkscreener/classes/Screener.py b/pkscreener/classes/Screener.py index 20c7b8bdfcb..271883b859f 100644 --- a/pkscreener/classes/Screener.py +++ b/pkscreener/classes/Screener.py @@ -1355,15 +1355,12 @@ def validatePriceRisingByAtLeast2Percent(self, data, screenDict, saveDict): if percent1 >= 2 and percent2 >= 2 and percent3 >= 2: pct_change_text = ( - (" (%.1f%%," % percent1) - + (" %.1f%%," % percent2) + ("%.1f%%" % percent1) + + (" (%.1f%%," % percent2) + (" %.1f%%)" % percent3) ) - pct_change = colorText.GREEN + pct_change_text + colorText.END - screenDict["LTP"] = ( - colorText.GREEN + ("%.2f" % round(day0, 2)) + pct_change + colorText.END - ) - saveDict["LTP"] = round(day0, 2) # + pct_change_text + saveDict["%Chng"] = pct_change_text + screenDict["%Chng"] = colorText.GREEN + pct_change_text + colorText.END return True and self.getCandleType(data.head(1)) return False diff --git a/pkscreener/classes/Utility.py b/pkscreener/classes/Utility.py index 335e982367c..3271fb478b9 100644 --- a/pkscreener/classes/Utility.py +++ b/pkscreener/classes/Utility.py @@ -285,7 +285,7 @@ def tableToImage(table, styledTable, filename, label, backtestSummary=None, back bt_text_width_artfont, _ = font.getsize_multiline(backtestSummary) startColValue = 100 - im_width = int(0.72*bt_text_width) if (bt_text_width > text_width) else (int(1.1*text_width) + int(startColValue*4)) + im_width = int(0.72*bt_text_width) if (bt_text_width > text_width) else (text_width + int(startColValue*2)) wrapper = textwrap.TextWrapper(width=2*int(len(table.split('\n')[0]) if len(table) >0 else len(backtestSummary.split('\n')[0]))) word_list = wrapper.wrap(text=legendText) diff --git a/pkscreener/globals.py b/pkscreener/globals.py index 26a9c534c8f..0c8a5b0789e 100644 --- a/pkscreener/globals.py +++ b/pkscreener/globals.py @@ -1345,8 +1345,8 @@ def reformatTable(summaryText, headerDict, colored_text, sorting=True): colored_text = colored_text.replace('', "") colored_text = colored_text.replace('', "") colored_text = colored_text.replace('', "") - colored_text = colored_text.replace(f"{colorText.GREEN}","") colored_text = colored_text.replace(colorText.BOLD,"") + colored_text = colored_text.replace(f"{colorText.GREEN}","") colored_text = colored_text.replace(f"{colorText.FAIL}","") colored_text = colored_text.replace(f"{colorText.WARN}","") colored_text = colored_text.replace(colorText.END,"") diff --git a/readthedocs.yaml b/readthedocs.yaml index 2d0a29f8dba..ce3749ac766 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.9" + python: "3.11" # Build documentation in the docs/ directory with Sphinx sphinx: