diff --git a/README.md b/README.md index 25758f53..30b042d7 100644 --- a/README.md +++ b/README.md @@ -21,17 +21,17 @@ Screenipy is totally customizable and it can screen stocks with the settings tha * Linux users should make sure that the `screenipy.bin` is having `execute` permission. * **Run** the file. Following window will appear after a brief delay. -![home](https://user-images.githubusercontent.com/6128978/114149274-5c424f80-9938-11eb-9eda-4f300c0248ee.png) +![home](https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/new-features/screenshots/home.png) * **Configure** the parameters as per your requirement using `Option > 8`. -![config](https://user-images.githubusercontent.com/6128978/114150376-9c560200-9939-11eb-9d46-e7bbd32d6cb1.png) +![config](https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/new-features/screenshots/config.png) * Following are the screenshots of screening and output results. -![screening](https://user-images.githubusercontent.com/6128978/114150728-ff479900-9939-11eb-9f76-7b98830b0ba4.png) -![results](https://user-images.githubusercontent.com/6128978/114150744-040c4d00-993a-11eb-8a69-a39e831761e7.png) -![done](https://user-images.githubusercontent.com/6128978/114150766-09699780-993a-11eb-82b1-43ec77cba2fb.png) +![screening](https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/new-features/screenshots/screening.png) +![results](https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/new-features/screenshots/results.png) +![done](https://raw.githubusercontent.com/pranjal-joshi/Screeni-py/new-features/screenshots/done.png) * Once done, you can also save the results in an excel file. @@ -39,16 +39,17 @@ Screenipy is totally customizable and it can screen stocks with the settings tha Feel free to Edit the parameters in the `screenipy.ini` file which will be generated by the application. ``` [config] -period = 365d -daystolookback = 20 +period = 300d +daystolookback = 30 duration = 1d -minprice = 20.0 -maxprice = 50000 +minprice = 30 +maxprice = 10000 volumeratio = 2 consolidationpercentage = 10 shuffle = y +cachestockdata = y onlystagetwostocks = y -useEMA = y +useema = n ``` Try to tweak this parameters as per your trading styles. For example, If you're comfortable with weekly charts, make `duration=5d` and so on. diff --git a/screenshots/config.png b/screenshots/config.png index 84b82953..58aef1c5 100644 Binary files a/screenshots/config.png and b/screenshots/config.png differ diff --git a/screenshots/done.png b/screenshots/done.png index d299af5d..80772f8a 100644 Binary files a/screenshots/done.png and b/screenshots/done.png differ diff --git a/screenshots/home.png b/screenshots/home.png index 07d78138..de50ec9b 100644 Binary files a/screenshots/home.png and b/screenshots/home.png differ diff --git a/screenshots/results.png b/screenshots/results.png index b56fec26..cf54c318 100644 Binary files a/screenshots/results.png and b/screenshots/results.png differ diff --git a/screenshots/screening.png b/screenshots/screening.png index 336e8714..c6a87516 100644 Binary files a/screenshots/screening.png and b/screenshots/screening.png differ diff --git a/src/classes/CandlePatterns.py b/src/classes/CandlePatterns.py index 155cdcbc..2b5dccca 100644 --- a/src/classes/CandlePatterns.py +++ b/src/classes/CandlePatterns.py @@ -11,7 +11,7 @@ class CandlePatterns: - reversalPatternsBullish = ['Morning Star', 'Morning Doji Star', '3 Inside Up', 'Hammer', '3 White Soldiers', 'Bullish Engulfing', 'Dragonfly Doji'] + reversalPatternsBullish = ['Morning Star', 'Morning Doji Star', '3 Inside Up', 'Hammer', '3 White Soldiers', 'Bullish Engulfing', 'Dragonfly Doji', 'Supply Drought', 'Demand Rise'] reversalPatternsBearish = ['Evening Star', 'Evening Doji Star', '3 Inside Down', 'Inverted Hammer', 'Hanging Man', '3 Black Crows', 'Bearish Engulfing', 'Shooting Star', 'Gravestone Doji'] def __init__(self): diff --git a/src/classes/Changelog.py b/src/classes/Changelog.py index 843273e7..29d0e58f 100644 --- a/src/classes/Changelog.py +++ b/src/classes/Changelog.py @@ -7,7 +7,7 @@ from classes.ColorText import colorText -VERSION = "1.27" +VERSION = "1.28" changelog = colorText.BOLD + '[ChangeLog]\n' + colorText.END + colorText.BLUE + ''' [1.00 - Beta] @@ -131,5 +131,8 @@ 1. Display more information about an update when it is available. 2. Minor Fixes (MA Confluence). +[1.28] +1. Volume Spread Analysis added for Bullish Reversals. Option > 6 > 5 + --- END --- ''' + colorText.END diff --git a/src/classes/ParallelProcessing.py b/src/classes/ParallelProcessing.py index 92e5debc..c860ab3f 100644 --- a/src/classes/ParallelProcessing.py +++ b/src/classes/ParallelProcessing.py @@ -102,8 +102,6 @@ def screenStocks(self, executeOption, reversalOption, maLength, daysForLowestVol with self.screenCounter.get_lock(): self.screenCounter.value += 1 if not processedData.empty: - # screeningDictionary['Stock'] = colorText.BOLD + \ - # colorText.BLUE + stock + colorText.END screeningDictionary['Stock'] = colorText.BOLD + \ colorText.BLUE + f'\x1B]8;;https://in.tradingview.com/chart?symbol=NSE%3A{stock}\x1B\\{stock}\x1B]8;;\x1B\\' + colorText.END saveDictionary['Stock'] = stock @@ -146,6 +144,7 @@ def screenStocks(self, executeOption, reversalOption, maLength, daysForLowestVol isInsideBar = screener.validateInsideBar(processedData, screeningDictionary, saveDictionary, chartPattern=respChartPattern, daysToLookback=insideBarToLookback) isMomentum = screener.validateMomentum(processedData, screeningDictionary, saveDictionary) + isVSA = screener.validateVolumeSpreadAnalysis(processedData, screeningDictionary, saveDictionary) if maLength is not None and executeOption == 6: isMaSupport = screener.findReversalMA(fullData, screeningDictionary, saveDictionary, maLength) @@ -180,6 +179,9 @@ def screenStocks(self, executeOption, reversalOption, maLength, daysForLowestVol elif reversalOption == 4 and isMaSupport: self.screenResultsCounter.value += 1 return screeningDictionary, saveDictionary + elif reversalOption == 5 and isVSA and saveDictionary['Pattern'] in CandlePatterns.reversalPatternsBullish: + self.screenResultsCounter.value += 1 + return screeningDictionary, saveDictionary if executeOption == 7 and isLtpValid: if respChartPattern < 3 and isInsideBar: self.screenResultsCounter.value += 1 diff --git a/src/classes/Screener.py b/src/classes/Screener.py index d86885b2..59eca7c5 100644 --- a/src/classes/Screener.py +++ b/src/classes/Screener.py @@ -306,6 +306,35 @@ def findTrend(self, data, screenDict, saveDict, daysToLookback=None,stockName="" saveDict['Trend'] = 'Unknown' return saveDict['Trend'] + # Find if stock is validating volume spread analysis + def validateVolumeSpreadAnalysis(self, data, screenDict, saveDict): + try: + data = data.head(2) + try: + # Check for previous RED candles + # Current candle = 0th, Previous Candle = 1st for following logic + if data.iloc[1]['Open'] >= data.iloc[1]['Close']: + spread1 = abs(data.iloc[1]['Open'] - data.iloc[1]['Close']) + spread0 = abs(data.iloc[0]['Open'] - data.iloc[0]['Close']) + lower_wick_spread0 = max(data.iloc[0]['Open'], data.iloc[0]['Close']) - data.iloc[0]['Low'] + vol1 = data.iloc[1]['Volume'] + vol0 = data.iloc[0]['Volume'] + if spread0 > spread1 and vol0 < vol1 and data.iloc[0]['Volume'] < data.iloc[0]['VolMA'] and data.iloc[0]['Close'] <= data.iloc[1]['Open'] and spread0 < lower_wick_spread0: + screenDict['Pattern'] = colorText.BOLD + colorText.GREEN + 'Supply Drought' + colorText.END + saveDict['Pattern'] = 'Supply Drought' + return True + if spread0 < spread1 and vol0 > vol1 and data.iloc[0]['Volume'] > data.iloc[0]['VolMA'] and data.iloc[0]['Close'] <= data.iloc[1]['Open']: + screenDict['Pattern'] = colorText.BOLD + colorText.GREEN + 'Demand Rise' + colorText.END + saveDict['Pattern'] = 'Demand Rise' + return True + except IndexError: + pass + return False + except: + import traceback + traceback.print_exc() + return False + # Find if stock gaining bullish momentum def validateMomentum(self, data, screenDict, saveDict): try: diff --git a/src/classes/Utility.py b/src/classes/Utility.py index 0541dc33..0c4a3b77 100644 --- a/src/classes/Utility.py +++ b/src/classes/Utility.py @@ -169,9 +169,10 @@ def promptReversalScreening(): 2 > Screen for Sell Signal (Bearish Reversal) 3 > Screen for Momentum Gainers (Rising Bullish Momentum) 4 > Screen for Reversal at Moving Average (Bullish Reversal) + 5 > Screen for Volume Spread Analysis (Bullish VSA Reversal) 0 > Cancel [+] Select option: """ + colorText.END)) - if resp >= 0 and resp <= 4: + if resp >= 0 and resp <= 5: if resp == 4: try: maLength = int(input(colorText.BOLD + colorText.WARN + diff --git a/src/release.md b/src/release.md index 312d651f..e12f294b 100644 --- a/src/release.md +++ b/src/release.md @@ -1,15 +1,15 @@ ![MADE-IN-INDIA](https://img.shields.io/badge/MADE%20WITH%20%E2%9D%A4%20IN-INDIA-orange?style=for-the-badge) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/pranjal-joshi/Screeni-py?style=for-the-badge) ![GitHub all releases](https://img.shields.io/github/downloads/pranjal-joshi/Screeni-py/total?color=Green&label=Downloads&style=for-the-badge) ![MADE_WITH](https://img.shields.io/badge/BUILT%20USING-PYTHON-yellow?style=for-the-badge&logo=python&logoColor=yellow) ## What's New? -1. New **Chart Patter** Added! **MA Confluence** of 2 MA Signals for high probability trades - Try `Option > 7 > 4` +1. **Volume Spread Analysis** Added for catching Bullish Reversals - Try `Option > 6 > 5` +1. New **Chart Pattern** Added! **MA Confluence** of 2 MA Signals for high probability trades - Try `Option > 7 > 4` 2. New **Chart Pattern** Added! **IPO Base Breakout** - Try `Option > 7 > 3` 3. Now, Open TradingView chart directly by clicking on the stock symbol! :tada: (Windows users should download and run the Application through the **Windows Terminal** from the Microsoft Store.) 4. Now **Create Your Own Watchlist** in Excel and screen for only those stocks! Try `Option > W` -5. Bug-Fixes and Performance Upgrades! ## Downloads -* For :desktop_computer: **Windows** users, download **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.exe)** -* For :penguin: **Linux** users, download **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.bin)** -* For :apple: **MacOS** users, download **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.27/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) +* For :desktop_computer: **Windows** users, download **[screenipy.exe](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.28/screenipy.exe)** +* For :penguin: **Linux** users, download **[screenipy.bin](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.28/screenipy.bin)** +* For :apple: **MacOS** users, download **[screenipy.run](https://github.com/pranjal-joshi/Screeni-py/releases/download/1.28/screenipy.run)** ([Read Installation Guide](https://github.com/pranjal-joshi/Screeni-py/blob/main/INSTALLATION.md#for-macos)) ## How to use?