pkscreener


Namepkscreener JSON
Version 0.45.20241017.632 PyPI version JSON
download
home_pagehttps://github.com/pkjmesra/pkscreener
SummaryA Python-based stock screener for NSE, India with alerts to Telegram Channel (pkscreener)
upload_time2024-10-17 13:05:00
maintainerNone
docs_urlNone
authorpkjmesra
requires_pythonNone
licenseOSI Approved (MIT)
keywords nse technical indicators scanning stock scanners
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ![Title](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/logos/Logo8_1.png)

# PKScreener (# 1 Stock screener/scanner for NSE India)
| [![MADE-IN-INDIA][MADE-IN-INDIA-badge]][MADE-IN-INDIA] | [![GitHub release (latest by date)][GitHub release (latest by date)-badge]][GitHub release (latest by date)] | [![Downloads][Downloads-badge]][Downloads] | ![latest download][Latest-Downloads-badge]  | [![Docker Pulls][Docker Pulls-badge]][Docker Status] |
| :-------------: | :-----------------: | :-----------------: | :-----------------: | :-----------------: |
| Platforms | [![Windows][Windows-badge]][Windows] | [![Linux][Linux-badge]][Linux] | [![Mac OS][Mac OS-badge]][Mac OS] | [![Docker Status][Docker Status-badge]][Docker Status] |
| Package / Docs | [![Documentation][Documentation-badge]][Documentation] | [![PyPI][pypi-badge]][pypi] | [![is wheel][wheel-badge]][pypi] | ![github license][github-license] |
| Tests | [![CodeFactor][Codefactor-badge]][Codefactor] | [![Coverage Status][Coverage-Status-badge]][Coverage-Status] | [![codecov][codecov-badge]][codecov] | [![After Market][After Market-badge]][After Market] |

## What is PKScreener?
| Telegram Alerts | Nifty AI Prediction | Scheduling Cron Jobs | On-Demand Telegram Bot | Backtesting / Growth of 10k|
| :-------------: | :-----------------: | :------------------: | :--------------------: | :-----------: |
| Nifty screening | Volume scanners | Breakout detection | Consolidating stocks | Reversal Signals |
| Chart Patterns | CCI scanners | 2% scanners | Short-term bulls | NR4 / NR7 | Daily Releases |
| Fair Value | Mutual funds, FII data | TTM Squeeze | Golden Crossover | Death Crossover|
| RSI screening | MACD scanners | IPO Stocks | Momentum Gainers | Watchlist screening |
| Stock Performance | 52Wk-H/L Breakouts | 10 days low breakouts | Aroon Crossover | Next Day Bullish Stocks|
| Today's Breakouts | Breaking out now | Popular stocks by Mutual Funds / FIIs | Higher Highs | Lower Lows|
| F&O Stocks screening | Live 5-EMA Index Scan | Logging | Telegram Channel | Early Breakouts |
| ATR Cross | ATR Trailing Stops | Intraday Bid/Ask Build-up | Quick Backtest | Morning vs Day-close profit analysis |
| Multiple period/duration support | Daily OHLCV | Intraday OHLCV | Auomated Software Updates| NASDAQ Index Support |
| Nifty 50 | Nifty Next 50 | Nifty 100 | Nifty 200| Nifty 500 |
| Nifty Smallcap 50 | Nifty Smallcap 250 | Nifty Midcap 50 | Nifty Midcap 100| Nifty Midcap 150 |
| Nifty All 2000 | Nifty Newly Listed (IPOs in last 2 Year) | Nifty F&O Stocks | View Stock Performance| High Momentum(RSI,MFI,CCI) |
| Intraday Monitor | Scanner pinning | Stock list Pinning | VCP (Volatility Contraction Pattern)| VCP  (Mark Minervini) |
| Moving Average Signals | Candle-stick Patterns | Trendline Support Stocks | Bullish/Bearish Inside Bar | Volume Spread Analysis |
| Narrow Range (NRx) Reversal | Lorentzian Classifier | PSAR and RSI reversal | Rising RSI | RSI MA Reversal |
| Upcoming CA stocks | High Dividend Stocks | Fair Value Buy Opportunities | Shareholding by number of Mutual Funds/FIIs | Bullish for next day |

### A Python-based stock screener for NSE, India.

**pkscreener** is an advanced stock screener to find potential breakout stocks from NSE and tell it's possible breakout values. It also helps to find the stocks which are consolidating and may breakout, or the particular chart patterns that you're looking specifically to make your decisions.
pkscreener is totally customizable and it can screen stocks with the settings that you have provided.

You can get daily scan results/alerts at scheduled times by subscribing to the following Telegram channel:
|    Purpose     |                                                                                                                   Description/link                                                                                                                    | QR Code                                                                                                                                          |
| :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Alerts Channel | https://t.me/PKScreener > You wil receive all the major alerts on this telegram channel. These alerts are sent for all major strategy scans daily around 9:30am-10:15am and then around 4pm. You will also receive the next day's market predictions. | <img src="https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/Telegram_Channel_Prod.jpg" alt="Telegram Channel" width="500"/> |
| Discussion Channel | https://t.me/PKScreeners > You can discuss with other traders and community members. | <img src="https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/PKScreeners_Group.jpg" alt="Telegram Discussion Channel" width="500"/> |

![telegram](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/telegram.png)

## Receiving Scheduled Scan results
If you would like to receive the scan results, please join the telegram channel and group above. 
You may receive the following scan results:
1. [![1. Next day Nifty/Market AI prediction](https://github.com/pkjmesra/PKScreener/actions/workflows/w4-workflow-prod-scans_1.yml/badge.svg)](https://github.com/pkjmesra/PKScreener/actions/workflows/w4-workflow-prod-scans_1.yml) by 4pm IST, Monday - Friday
2. For all Nifty stocks at/by 9:45-10:15am and by 4pm IST, Monday - Friday

   * Certain selected but configurable alerts for specific scan types

## Receiving On-Demand Scan results
You can now run the `pkscreenerbot` on your local machine or if it's running on the GitHub server under a GitHub Actions workflow, you can use the `pkscreener Bot`(@nse_pkscreener_bot on Telegram) to get on-demand scan results.

![bot](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/bot.gif)

## Scanners

Screening options to choose from:

```
     X > Scanners
     M > Monitor Intraday
     S > Strategies
     B > Backtests
     G > Growth of 10k
     C > Analyse morning vs close outcomes

     P > Piped Scanners

     T > Toggle between long-term (Default) [Current (1y, 1d)] and Intraday user configuration


     D > Download Daily OHLC Data for the Past Year
     I > Download Intraday OHLC Data for the Last Trading Day

     E > Edit user configuration
     Y > View your user configuration

     U > Check for software update

     L > Collect Logs for Debugging
     H > Help / About Developer
```

Multiple Indices to choose from:

```
     W > Screen stocks from my own Watchlist
     N > Nifty Prediction using Artifical Intelligence (Use for Gap-Up/Gap-Down/BTST/STBT)
     E > Live Index Scan : 5 EMA for Intraday

     S > Sectoral Indices

     0 > Screen stocks by the stock names
     1 > Nifty 50          	2 > Nifty Next 50     	3 > Nifty 100         
     4 > Nifty 200         	5 > Nifty 500         	6 > Nifty Smallcap 50 
     7 > Nifty Smallcap 100	8 > Nifty Smallcap 250	9 > Nifty Midcap 50   
    10 > Nifty Midcap 100	11 > Nifty Midcap 150 	12 > Nifty (All Stocks)
    13 > Newly Listed (IPOs in last 2 Year)           	14 > F&O Stocks Only

     15 > NASDAQ

```

Followin scanners are already implemented. 
```
     0 > Full Screening (Shows Technical Parameters without any criterion)
     1 > Probable Breakouts/Breakdowns   	2 > Today's Breakouts/Breakdowns
     3 > Consolidating stocks            	4 > Lowest Volume in last N-days (Early Breakout Detection)
     5 > RSI screening                   	6 > Reversal Signals
     7 > Stocks making Chart Patterns    	8 > CCI outside of the given range
     9 > Volume gainers                  	10 > Closing at least 2% up since last 3 days
    11 > Short term bullish (Ichimoku)  	12 > N-Minute Price & Volume breakout(Intraday)
    13 > Bullish RSI & MACD             	14 > NR4 Daily Today
    15 > 52 week low breakout(today)(Sell)	16 > 10 days low breakout(Sell)
    17 > 52 week high breakout(today)     	18 > Bullish Aroon(14) Crossover
    19 > MACD Histogram x below 0 (Sell) 	20 > Bullish for next day
    21 > MF/FIIs Popular Stocks         	22 > View Stock Performance         
    23 > Breaking out now               	24 > Higher Highs,Lows & Close (SuperTrend)
    25 > Lower Highs,Lows (Watch for Rev.)	26 > Stocks with stock-split/bonus/dividends
    27 > ATR Cross                      	28 > Bullish Higher Opens           
    29 > Intraday Bid/Ask Build-up      	30 > ATR Trailing Stops(Swing Paper Trading)
    31 > High Momentum(RSI,MFI,CCI)     	32 > Intraday Breakout/Breakdown setup     
    33 > Potential Profitable setups

     42 > Show Last Screened Results   
           	
```
## Running Piped Scanners

https://github.com/pkjmesra/PKScreener/assets/1358101/9e579371-1035-400a-9f65-139d8407f6c7

## Running Intraday analysis of Piped Scanners

https://github.com/user-attachments/assets/5f6e2774-a8e5-4a99-9f7c-aa5850f9707d


Multiple pre-defined piped scanners

```
     1 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross     	2 > Volume Scanners | High Momentum | ATR Cross
     3 > Volume Scanners | High Momentum                                    	4 > Volume Scanners | ATR Cross
     5 > Volume Scanners | High Bid/Ask Build Up                            	6 > Volume Scanners | ATR Cross | ATR Trailing Stops
     7 > Volume Scanners | ATR Trailing Stops                               	8 > High Momentum | ATR Cross
     9 > High Momentum | ATR Trailing Stop                                  	10 > ATR Cross | ATR Trailing Stop
    11 > TTM Sqeeze Buy | Intraday RSI b/w 0 to 54                          	12 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross | Intraday RSI b/w 0 to 54
    13 > Volume Scanners | ATR Cross | Intraday RSI b/w 0 to 54             	14 > VCP (Mark Minervini) | Chart Patterns | MA Support
    15 > VCP | Chart Patterns | MA Support                                  	16 > Already Breaking out | VCP (Minervini) | Chart Patterns | MA Support
    17 > ATR Trailing Stops | VCP (Minervini)                               	18 > VCP | ATR Trailing Stops
    19 > Nifty 50,Nifty Bank | VCP | ATR Trailing Stops                     	20 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross | VCP | ATR Trailing Stops
    21 > BullCross-MA | Fair Value Buy Opportunities                    

```

## How to use on your own local Windows/Linux/Macbook laptop?

# Using docker, running within docker container
* Download and install docker desktop: https://docs.docker.com/get-docker/
* After installation, launch/run docker desktop and if it asks, login using your docker credentials.
* Launch any command line (for example, cmd on windows or terminal on Mac) and type 
```
docker pull pkjmesra/pkscreener:latest
```
Then type 
```
docker run -it pkjmesra/pkscreener:latest
```
The option `-i` will open the `pkscreener` in interactive mode within docker. `-t` will allocate a pseudo terminal for you so you can begin to use `pkscreener`

# Special notes on vulnerabilities shown in the docker image/container
Please keep in mind that only because the container/image shows a vulnerability, it does not mean that it exists in this particular image.
1. If you see a critical vulnerability being shown for git, it's ONLY IF we use git with v2.13 or below AND we use git submodule. In case of PKScreener, both are false. We use git >= 2.45 and we DO NOT use git submodules. See https://nvd.nist.gov/vuln/detail/CVE-2024-32002
2. If you see high severity vulnerability for pip, it's ONLY IF we use a private indexed repository. In our case, we only use PyPi - a public python library repository. See https://nvd.nist.gov/vuln/detail/CVE-2018-20225.
3. If you see high severity vulnerability for usage of library Pillow, it's ONLY IF we try to generate an image containing text that can uncontrollably lengthy. In PKScreener, the image is NEVER generated locally on your laptop or docker container. It is generated only when running in telegram-bot for morning/afternoon analysis alerts. Additionally, there are checks to ensure we never go beyond the maximum size of the number of columns in the analysis tables. To conclude, the image generation module never gets activated on docker/locally on your laptop. See https://nvd.nist.gov/vuln/detail/CVE-2023-44271

The story is similar for other low severity vulnerabilities that docker might show. If you're genuinely concerned, you can search with the respective CVE # in the NIST database to understand more or create an issue https://github.com/pkjmesra/PKScreener/issues . We keep reviewing all vulnerabilties regularly and fix those immediately if at all they are likely to impact us or our users.

# Installing the latest version from PyPi.
* Go ahead and install using `pip install pkscreener`. The releases page also has the latest wheels for multiple platforms.
* This should install all of the major dependencies, except maybe, TA-Lib.
* This app can still run without TA-Lib, but if you need to install TA-Lib for technical indicators (which otherwise is used from `pandas_ta` in the absence of TA-Lib), you can do this: Head to `.github/dependencies/` under this repo. Download the respective TA-Lib file/whl file and install either from the .whl file or from source. Check out any of the workflow files for steps to install TA-Lib.

For example:

For `Windows`: See https://github.com/pkjmesra/PKScreener/blob/c1e94ba3137915cb781161fa2d5fb69129940fd3/.github/workflows/w1-workflow-build-matrix.yml#L91-L101 

For `Mac`: Run `brew install ta-lib` assuming you have homebrew installed.

For `Ubuntu/Linux`: See https://github.com/pkjmesra/PKScreener/blob/main/.github/workflows/w1-workflow-build-matrix.yml#L121-L132

* Now launch your favorite command line CLI and issue `pkscreener`. This will launch the pkscreener executable.

# Building from source repo
* Install python 3.11 for your OS/CPU. Download the installer from https://www.python.org/downloads/release/python-3913/#Files
* Just clone the repo with `git clone https://github.com/pkjmesra/PKScreener.git`
* `cd PKScreener`
* `pip install -r requirements.txt` .
* (Optional) If you would like to have technical indicators evaluated using TA-Lib, go ahead and install TA-Lib as well. `pip3 install ta-lib`. Please review additional steps to buil TA-Lib in the workflow files meant for your OS under .github > workflows and follow the line numbers from the previous section.
* `cd pkscreener`
* Finally, from within the `pkscreener` directory, run `python pkscreenercli.py`. Or just type/run `pkscreener`. You are all set.

# Running the executables
* Download the suitable file according to your OS.
* Linux & Mac users should make sure that the `pkscreenercli.bin or pkscreenercli.run` is having `execute` permission. (`chmod +x pkscreenercli.run`)

* **Run** the file. Following window will appear.


* **Configure** the parameters as per your requirement using `Option > E`.

![config](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/config.png)

* **Scanner Menus** the scanner menus for each level/sub-level
  ![menulevel1](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu.png)
  ![menulevel2](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu_level2.png)
  ![menulevel3](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu_level3.png)


* Following are the screenshots of screening and output results.

![screening](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/screening.png)

Results :

![results](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/results.png)

It also shows you how the chosen scan option has fared in the past. 1-Pd, 2-Pd means 1 day, 2 days from the date of scan in the past when those stocks came into the results of the chosen scan option.

![results](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/result_analysis.png)
* Once done, you can also save the results in an excel file.

## Growth of 10k

You can see the performance of your stocks and/or at portfolio level using "Growth of 10k".

![G10k](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/G10k.png)

It also summarises the Growth of 10k at portfolio level for the last quarter so that you know which filters worked best in the past:

![G10k_Sum](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/G10k_Sum.png)

## Backtests
You can now use the *Backtests* menu to backtest any of the selected strategies. See https://pkjmesra.github.io/PKScreener/BacktestReports.html

![backtest](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/backtest.png)

* Once done, you can also view the output html file saved at the same location from where you launched the app.

## Scanning as a scheduled job once or at regular intervals
* Running it once with pre-defined inputs
  You can also run it as a one time job in any scheduler with pre-defined options. For example `./pkscreenercli.py -a Y -o X:12:10 -e` (or `pkscreenercli.exe -a Y -o X:12:10 -e` if you're executing with the exe) will run the scanner for all Nifty stocks and find all stocks matching CCI filter, save the results in xlsx file and exit. `./pkscreenercli.py -a Y -o X:12:9:2.5 -e` will run the scanner (menu option `X`) for all Nifty stocks (menu option `12`) to find volume gainers (menu option `9`) with at least the volume multiplier of 2.5 (input variable `2.5`), save the results in xlsx file and exit (menu option `-e`). Passing in the `-p` option for example `pkscreenercli.py -a Y -p -o X:12:6:1 -e` will also silence all command line prints/outputs and just run silently for the given options, save results and exit. Try and see all options with `./pkscreenercli.py -h`.

* Running it at regular intervals
  If you want to runn it at regular intervals, you can just pass the interval in `-c` command line option. For example, `./pkscreenercli.py -a Y -o X:12:6:1 -c 180` will run it every `180` seconds with console outputs also being printed. If you'd just like it to run as a cron job without console outputs, you may also pass the `-p` parameter. For example, `./pkscreenercli.py -a Y -p -o X:12:6:1 -c 180`

## Understanding the Result Table:

The Result table contains a lot of different parameters which can be pretty overwhelming to the new users, so here's the description and significance of each parameter.

| Sr  |       Parameter       | Description                                                                                                                                                                                                                  | Example                                                                                  |
| :-: | :-------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|  1  |       **Stock**       | This is a NSE scrip symbol. If your OS/Terminal supports unicode, You can directly open **[TradingView](https://in.tradingview.com/)** charts by pressing `Ctrl+Click` on the stock name.                                    | [TATAMOTORS](https://in.tradingview.com/chart?symbol=NSE%3ATATAMOTORS)                   |
|  2  |   **Consolidating**   | It gives the price range in which stock is trading since last `N` days. `N` is configurable and can be modified by executing `Edit User Configuration` option.                                                               | If stock is trading between price 100-120 in last 30 days, Output will be `Range:20.0 %` |
|  3  | **Breakout (N Days)** | This is pure magic! The `BO` is Breakout level in last N days while `R` is the next resistance level if available. Investor should consider both BO & R level to decide entry/exits in their trades.                         | `B:302, R:313`(Breakout level is 100 & Next resistance is 102)                           |
|  4  |        **LTP**        | LTP is the Last Traded Price of an asset traded on NSE.                                                                                                                                                                      | `298.7` (Stock is trading at this price)                                                 |
|  5  |      **Volume**       | Volume shows the relative volume of the recent candle with respect to 20 period MA of Volume. It could be `Unknown` for newly listed stocks.                                                                                 | if 20MA(Volume) is 1M and todays Volume is 2.8M, then `Volume = 2.8x`                    |
|  6  |     **MA-Signal**     | It describes the price trend of an asset by analysing various 50-200 MA/EMA crossover strategies.                                                                                                                            | `200MA-Support`,`BullCross-50MA` etc                                                     |
|  7  |        **RSI**        | For the momentum traders, it describes 14-period RSI for quick decision making about their trading plans                                                                                                                     | `0 to 100`                                                                               |
|  8  |       **Trend**       | By using advance algorithms, the average trendlines are computed for `N` days and their strenght is displayed depending on steepness of trendlines. (This does NOT show any trendline on chart, it is calculated internally) | `Strong Up`, `Weak Down` etc.                                                            |
|  9  |      **Pattern**      | If the chart or the candle itself forming any important pattern in the recent timeframe or as per the selected screening option, various important patterns will be indicated here.                                          | `Momentum Gainer`, `Inside Bar (N)`,`Bullish Engulfing` etc.                             |

## Hack it your way:
Feel free to Edit the parameters in the `pkscreener.ini` file which will be generated by the application.
```
[config]
period = 1y
daystolookback = 22
duration = 1d
minprice = 20.0
maxprice = 50000.0
volumeratio = 2.5
consolidationpercentage = 10.0
shuffle = y
cachestockdata = y
onlystagetwostocks = y
useema = n
showunknowntrends = y
logsenabled = n
generaltimeout = 2.0
longtimeout = 4.0
maxnetworkretrycount = 10
backtestperiod = 60
minimumvolume = 10000
```
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. For intraday, you can set `period=1d and duration=5m` if you would like to calculate with 5minute candles. Set the duration to `15m` or whatever value you desire, but keep the period to `1d`. This tool, however, works best for short/mid term instead of intraday, but some scans like momentum/volume/NR4 etc can be used for screening stocks for intraday as well. You can use the toggle menu option `T` to toggle between long term and intraday config before you begin the scanners.

## Creating your own Telegram channel to receive your own alerts:
You can create your own telegram channel to receive alerts wherenevr you run it locally on your laptop either from a command line interface console or run it as a scheduler. Simply, go ahead and
1. Create a bot for yourself, then a channel and get their IDs. Follow the steps in https://medium.com/codex/using-python-to-send-telegram-messages-in-3-simple-steps-419a8b5e5e2 and https://www.siteguarding.com/en/how-to-get-telegram-bot-api-token
2. After you have created the bot using `botFather` and have received/verified your bot id/token and channel ID using `get id bot`, simply go to `pkscreener` folder in the source code directory and create a `.env.dev` file with the following (If you are instead using the .exe or .bin or .run file from release, just create this file in the same folder where the executable (.exe or .bin or .run) is placed.)
```
CHAT_ID=Your_Channel_Id_Here_Without_A_Hyphen_or_Minus_Sign
TOKEN=Your_Bot_Token_Here
chat_idADMIN=Your_Own_ID_Here
```
3. From now on, you will begin to receive your own alerts on your telegram channel.
   ![alerts](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/alerts.png)

## Troubleshooting and Logs:
If you are having issues running the program, you can just launch a command line interface (On windows> Start > Run > cmd) and then launch PKScreener with a command line option of `-l`. For example, `python pkscreenercli.py -l`. This will show you the path where the program will save all the log outputs from this run. Copy that path and go ahead and run the application. Altenatively, you can just go ahead and modify the `logsEnabled` value to `y`, save & close it and then run `python pkscreenercli.py`.

After you have finished the run, go to that copied path, zip the contents of the file `pkscreener-logs.txt` and create an issue at https://github.com/pkjmesra/PKScreener/issues. Please do not forget to attach the log files in the issue.

## Contributing:
* Please feel free to Suggest improvements bugs by creating an issue.
* Please follow the [Guidelines for Contributing](https://github.com/pkjmesra/PKScreener/blob/main/CONTRIBUTING.md) while making a Pull Request.

## Disclaimer:
* DO NOT use the results provided by the software 'solely' to make your trading decisions.
* Always backtest and analyze the stocks manually before you trade.
* The Author(s), the software and any related/unrelated entity will not be held liable for your own investing decisions or losses. The authors or this softfware does not make any claim about the correctness of the results.
* This screener began as a [fork] but has since added a lot of additional scanners, backtesting, Telegram bots, Alerts and a number of modifications and improvements.

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=pkjmesra/pkscreener&type=Date)](https://star-history.com/#pkjmesra/pkscreener&Date)

[MADE-IN-INDIA-badge]: https://img.shields.io/badge/MADE%20WITH%20%E2%9D%A4%20IN-INDIA-orange
[MADE-IN-INDIA]: https://en.wikipedia.org/wiki/India
[Windows-badge]: https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white
[Windows]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.exe
[Linux-badge]: https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black
[Linux]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.bin
[Mac OS-badge]: https://img.shields.io/badge/mac%20os-D3D3D3?logo=apple&logoColor=000000
[Mac OS]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.run
[GitHub release (latest by date)-badge]: https://img.shields.io/github/v/release/pkjmesra/PKScreener
[GitHub release (latest by date)]: https://github.com/pkjmesra/PKScreener/releases/latest
[pypi-badge]: https://img.shields.io/pypi/v/pkscreener.svg?style=flat-square
[pypi]: https://pypi.python.org/pypi/pkscreener
[wheel-badge]: https://img.shields.io/pypi/wheel/pkscreener.svg?style=flat-square
[GitHub all releases]: https://img.shields.io/github/downloads/pkjmesra/PKScreener/total?color=Green&label=Downloads&style=for-the-badge
[License-badge]: https://img.shields.io/github/license/pkjmesra/PKScreener?style=for-the-badge
[License]: https://github.com/pkjmesra/PKScreener/blob/main/LICENSE
[Codefactor-badge]: https://www.codefactor.io/repository/github/pkjmesra/PKScreener/badge
[Codefactor]: https://www.codefactor.io/repository/github/pkjmesra/PKScreener
[PR-Guidelines-badge]: https://img.shields.io/badge/PULL%20REQUEST-GUIDELINES-red?style=for-the-badge
[PR-Guidelines]: https://github.com/pkjmesra/PKScreener/blob/new-features/CONTRIBUTING.md
[github-license]: https://img.shields.io/github/license/pkjmesra/pkscreener
[Downloads-badge]: https://static.pepy.tech/personalized-badge/pkscreener?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=PyPi%20Downloads
[Downloads]: https://pepy.tech/project/pkscreener
[Latest-Downloads-badge]: https://img.shields.io/github/downloads-pre/pkjmesra/pkscreener/latest/total?logo=github
[Coverage-Status-badge]: https://coveralls.io/repos/github/pkjmesra/PKScreener/badge.svg?branch=main
[Coverage-Status]: https://coveralls.io/github/pkjmesra/PKScreener?branch=main
[codecov-badge]: https://codecov.io/gh/pkjmesra/PKScreener/branch/main/graph/badge.svg
[codecov]: https://codecov.io/gh/pkjmesra/PKScreener
[Documentation-badge]: https://readthedocs.org/projects/pkscreener/badge/?version=latest
[Documentation]: https://pkscreener.readthedocs.io/en/latest/?badge=latest
[Docker Status-badge]: https://img.shields.io/docker/automated/pkjmesra/pkscreener.svg
[Docker Status]: https://hub.docker.com/repository/docker/pkjmesra/pkscreener
[Docker Pulls-badge]: https://img.shields.io/docker/pulls/pkjmesra/pkscreener.svg
[Prod Scan Tests-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w5-workflow-prod-scans_Tests.yml/badge.svg
[Prod Scan Tests]: https://github.com/pkjmesra/PKScreener/actions/workflows/w5-workflow-prod-scans_Tests.yml
[After Market-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w9-workflow-download-data.yml/badge.svg
[After Market]: https://github.com/pkjmesra/PKScreener/actions/workflows/w9-workflow-download-data.yml
[New Features-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w10-workflow-features-test.yml/badge.svg
[New Features]: https://github.com/pkjmesra/PKScreener/actions/workflows/w10-workflow-features-test.yml
[New Release-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w1-workflow-build-matrix.yml/badge.svg
[New Release]: https://github.com/pkjmesra/PKScreener/actions/workflows/w1-workflow-build-matrix.yml
[Docker-Build-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w15-docker-image.yml/badge.svg
[Docker-Build]: https://github.com/pkjmesra/PKScreener/actions/workflows/w15-docker-image.yml

<!-- [![Docker Build][Docker-Build-badge]][Docker-Build] [![PKScreener Test - New Features][New Features-badge]][New Features] [![w9. After-Market Data Gen][After Market-badge]][After Market] [![1. PKScreener Build - New Release][New Release-badge]][New Release] [![Documentation][Documentation-badge]][Documentation]

[![GitHub all releases][GitHub all releases]](#) [![GitHub][License-badge]][License] [![BADGE][PR-Guidelines-badge]][PR-Guidelines]
 [![w5. Production Scan Tests On Dev][Prod Scan Tests-badge]][Prod Scan Tests] 
-->

<!--      |                                                                                                                    Discussions []                                                                                                                     | https://t.me/PKScreeners > For any discussion related to PKScreener, you may like to join this related Telegram group                            | <img src="https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/PKScreeners_Group.jpg" alt="Telegram Group" width="100"/> | --> 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pkjmesra/pkscreener",
    "name": "pkscreener",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "NSE, Technical Indicators, Scanning, Stock Scanners",
    "author": "pkjmesra",
    "author_email": "pkjmesra@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/96/a1/47387ddc902517b4452127c676a161a3f49a5bffc19649591da2f606b544/pkscreener-0.45.20241017.632.tar.gz",
    "platform": null,
    "description": "![Title](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/logos/Logo8_1.png)\n\n# PKScreener (# 1 Stock screener/scanner for NSE India)\n| [![MADE-IN-INDIA][MADE-IN-INDIA-badge]][MADE-IN-INDIA] | [![GitHub release (latest by date)][GitHub release (latest by date)-badge]][GitHub release (latest by date)] | [![Downloads][Downloads-badge]][Downloads] | ![latest download][Latest-Downloads-badge]  | [![Docker Pulls][Docker Pulls-badge]][Docker Status] |\n| :-------------: | :-----------------: | :-----------------: | :-----------------: | :-----------------: |\n| Platforms | [![Windows][Windows-badge]][Windows] | [![Linux][Linux-badge]][Linux] | [![Mac OS][Mac OS-badge]][Mac OS] | [![Docker Status][Docker Status-badge]][Docker Status] |\n| Package / Docs | [![Documentation][Documentation-badge]][Documentation] | [![PyPI][pypi-badge]][pypi] | [![is wheel][wheel-badge]][pypi] | ![github license][github-license] |\n| Tests | [![CodeFactor][Codefactor-badge]][Codefactor] | [![Coverage Status][Coverage-Status-badge]][Coverage-Status] | [![codecov][codecov-badge]][codecov] | [![After Market][After Market-badge]][After Market] |\n\n## What is PKScreener?\n| Telegram Alerts | Nifty AI Prediction | Scheduling Cron Jobs | On-Demand Telegram Bot | Backtesting / Growth of 10k|\n| :-------------: | :-----------------: | :------------------: | :--------------------: | :-----------: |\n| Nifty screening | Volume scanners | Breakout detection | Consolidating stocks | Reversal Signals |\n| Chart Patterns | CCI scanners | 2% scanners | Short-term bulls | NR4 / NR7 | Daily Releases |\n| Fair Value | Mutual funds, FII data | TTM Squeeze | Golden Crossover | Death Crossover|\n| RSI screening | MACD scanners | IPO Stocks | Momentum Gainers | Watchlist screening |\n| Stock Performance | 52Wk-H/L Breakouts | 10 days low breakouts | Aroon Crossover | Next Day Bullish Stocks|\n| Today's Breakouts | Breaking out now | Popular stocks by Mutual Funds / FIIs | Higher Highs | Lower Lows|\n| F&O Stocks screening | Live 5-EMA Index Scan | Logging | Telegram Channel | Early Breakouts |\n| ATR Cross | ATR Trailing Stops | Intraday Bid/Ask Build-up | Quick Backtest | Morning vs Day-close profit analysis |\n| Multiple period/duration support | Daily OHLCV | Intraday OHLCV | Auomated Software Updates| NASDAQ Index Support |\n| Nifty 50 | Nifty Next 50 | Nifty 100 | Nifty 200| Nifty 500 |\n| Nifty Smallcap 50 | Nifty Smallcap 250 | Nifty Midcap 50 | Nifty Midcap 100| Nifty Midcap 150 |\n| Nifty All 2000 | Nifty Newly Listed (IPOs in last 2 Year) | Nifty F&O Stocks | View Stock Performance| High Momentum(RSI,MFI,CCI) |\n| Intraday Monitor | Scanner pinning | Stock list Pinning | VCP (Volatility Contraction Pattern)| VCP  (Mark Minervini) |\n| Moving Average Signals | Candle-stick Patterns | Trendline Support Stocks | Bullish/Bearish Inside Bar | Volume Spread Analysis |\n| Narrow Range (NRx) Reversal | Lorentzian Classifier | PSAR and RSI reversal | Rising RSI | RSI MA Reversal |\n| Upcoming CA stocks | High Dividend Stocks | Fair Value Buy Opportunities | Shareholding by number of Mutual Funds/FIIs | Bullish for next day |\n\n### A Python-based stock screener for NSE, India.\n\n**pkscreener** is an advanced stock screener to find potential breakout stocks from NSE and tell it's possible breakout values. It also helps to find the stocks which are consolidating and may breakout, or the particular chart patterns that you're looking specifically to make your decisions.\npkscreener is totally customizable and it can screen stocks with the settings that you have provided.\n\nYou can get daily scan results/alerts at scheduled times by subscribing to the following Telegram channel:\n|    Purpose     |                                                                                                                   Description/link                                                                                                                    | QR Code                                                                                                                                          |\n| :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n| Alerts Channel | https://t.me/PKScreener > You wil receive all the major alerts on this telegram channel. These alerts are sent for all major strategy scans daily around 9:30am-10:15am and then around 4pm. You will also receive the next day's market predictions. | <img src=\"https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/Telegram_Channel_Prod.jpg\" alt=\"Telegram Channel\" width=\"500\"/> |\n| Discussion Channel | https://t.me/PKScreeners > You can discuss with other traders and community members. | <img src=\"https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/PKScreeners_Group.jpg\" alt=\"Telegram Discussion Channel\" width=\"500\"/> |\n\n![telegram](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/telegram.png)\n\n## Receiving Scheduled Scan results\nIf you would like to receive the scan results, please join the telegram channel and group above. \nYou may receive the following scan results:\n1. [![1. Next day Nifty/Market AI prediction](https://github.com/pkjmesra/PKScreener/actions/workflows/w4-workflow-prod-scans_1.yml/badge.svg)](https://github.com/pkjmesra/PKScreener/actions/workflows/w4-workflow-prod-scans_1.yml) by 4pm IST, Monday - Friday\n2. For all Nifty stocks at/by 9:45-10:15am and by 4pm IST, Monday - Friday\n\n   * Certain selected but configurable alerts for specific scan types\n\n## Receiving On-Demand Scan results\nYou can now run the `pkscreenerbot` on your local machine or if it's running on the GitHub server under a GitHub Actions workflow, you can use the `pkscreener Bot`(@nse_pkscreener_bot on Telegram) to get on-demand scan results.\n\n![bot](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/bot.gif)\n\n## Scanners\n\nScreening options to choose from:\n\n```\n     X > Scanners\n     M > Monitor Intraday\n     S > Strategies\n     B > Backtests\n     G > Growth of 10k\n     C > Analyse morning vs close outcomes\n\n     P > Piped Scanners\n\n     T > Toggle between long-term (Default) [Current (1y, 1d)] and Intraday user configuration\n\n\n     D > Download Daily OHLC Data for the Past Year\n     I > Download Intraday OHLC Data for the Last Trading Day\n\n     E > Edit user configuration\n     Y > View your user configuration\n\n     U > Check for software update\n\n     L > Collect Logs for Debugging\n     H > Help / About Developer\n```\n\nMultiple Indices to choose from:\n\n```\n     W > Screen stocks from my own Watchlist\n     N > Nifty Prediction using Artifical Intelligence (Use for Gap-Up/Gap-Down/BTST/STBT)\n     E > Live Index Scan : 5 EMA for Intraday\n\n     S > Sectoral Indices\n\n     0 > Screen stocks by the stock names\n     1 > Nifty 50          \t2 > Nifty Next 50     \t3 > Nifty 100         \n     4 > Nifty 200         \t5 > Nifty 500         \t6 > Nifty Smallcap 50 \n     7 > Nifty Smallcap 100\t8 > Nifty Smallcap 250\t9 > Nifty Midcap 50   \n    10 > Nifty Midcap 100\t11 > Nifty Midcap 150 \t12 > Nifty (All Stocks)\n    13 > Newly Listed (IPOs in last 2 Year)           \t14 > F&O Stocks Only\n\n     15 > NASDAQ\n\n```\n\nFollowin scanners are already implemented. \n```\n     0 > Full Screening (Shows Technical Parameters without any criterion)\n     1 > Probable Breakouts/Breakdowns   \t2 > Today's Breakouts/Breakdowns\n     3 > Consolidating stocks            \t4 > Lowest Volume in last N-days (Early Breakout Detection)\n     5 > RSI screening                   \t6 > Reversal Signals\n     7 > Stocks making Chart Patterns    \t8 > CCI outside of the given range\n     9 > Volume gainers                  \t10 > Closing at least 2% up since last 3 days\n    11 > Short term bullish (Ichimoku)  \t12 > N-Minute Price & Volume breakout(Intraday)\n    13 > Bullish RSI & MACD             \t14 > NR4 Daily Today\n    15 > 52 week low breakout(today)(Sell)\t16 > 10 days low breakout(Sell)\n    17 > 52 week high breakout(today)     \t18 > Bullish Aroon(14) Crossover\n    19 > MACD Histogram x below 0 (Sell) \t20 > Bullish for next day\n    21 > MF/FIIs Popular Stocks         \t22 > View Stock Performance         \n    23 > Breaking out now               \t24 > Higher Highs,Lows & Close (SuperTrend)\n    25 > Lower Highs,Lows (Watch for Rev.)\t26 > Stocks with stock-split/bonus/dividends\n    27 > ATR Cross                      \t28 > Bullish Higher Opens           \n    29 > Intraday Bid/Ask Build-up      \t30 > ATR Trailing Stops(Swing Paper Trading)\n    31 > High Momentum(RSI,MFI,CCI)     \t32 > Intraday Breakout/Breakdown setup     \n    33 > Potential Profitable setups\n\n     42 > Show Last Screened Results   \n           \t\n```\n## Running Piped Scanners\n\nhttps://github.com/pkjmesra/PKScreener/assets/1358101/9e579371-1035-400a-9f65-139d8407f6c7\n\n## Running Intraday analysis of Piped Scanners\n\nhttps://github.com/user-attachments/assets/5f6e2774-a8e5-4a99-9f7c-aa5850f9707d\n\n\nMultiple pre-defined piped scanners\n\n```\n     1 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross     \t2 > Volume Scanners | High Momentum | ATR Cross\n     3 > Volume Scanners | High Momentum                                    \t4 > Volume Scanners | ATR Cross\n     5 > Volume Scanners | High Bid/Ask Build Up                            \t6 > Volume Scanners | ATR Cross | ATR Trailing Stops\n     7 > Volume Scanners | ATR Trailing Stops                               \t8 > High Momentum | ATR Cross\n     9 > High Momentum | ATR Trailing Stop                                  \t10 > ATR Cross | ATR Trailing Stop\n    11 > TTM Sqeeze Buy | Intraday RSI b/w 0 to 54                          \t12 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross | Intraday RSI b/w 0 to 54\n    13 > Volume Scanners | ATR Cross | Intraday RSI b/w 0 to 54             \t14 > VCP (Mark Minervini) | Chart Patterns | MA Support\n    15 > VCP | Chart Patterns | MA Support                                  \t16 > Already Breaking out | VCP (Minervini) | Chart Patterns | MA Support\n    17 > ATR Trailing Stops | VCP (Minervini)                               \t18 > VCP | ATR Trailing Stops\n    19 > Nifty 50,Nifty Bank | VCP | ATR Trailing Stops                     \t20 > Volume Scanners | High Momentum | Breaking Out Now | ATR Cross | VCP | ATR Trailing Stops\n    21 > BullCross-MA | Fair Value Buy Opportunities                    \n\n```\n\n## How to use on your own local Windows/Linux/Macbook laptop?\n\n# Using docker, running within docker container\n* Download and install docker desktop: https://docs.docker.com/get-docker/\n* After installation, launch/run docker desktop and if it asks, login using your docker credentials.\n* Launch any command line (for example, cmd on windows or terminal on Mac) and type \n```\ndocker pull pkjmesra/pkscreener:latest\n```\nThen type \n```\ndocker run -it pkjmesra/pkscreener:latest\n```\nThe option `-i` will open the `pkscreener` in interactive mode within docker. `-t` will allocate a pseudo terminal for you so you can begin to use `pkscreener`\n\n# Special notes on vulnerabilities shown in the docker image/container\nPlease keep in mind that only because the container/image shows a vulnerability, it does not mean that it exists in this particular image.\n1. If you see a critical vulnerability being shown for git, it's ONLY IF we use git with v2.13 or below AND we use git submodule. In case of PKScreener, both are false. We use git >= 2.45 and we DO NOT use git submodules. See https://nvd.nist.gov/vuln/detail/CVE-2024-32002\n2. If you see high severity vulnerability for pip, it's ONLY IF we use a private indexed repository. In our case, we only use PyPi - a public python library repository. See https://nvd.nist.gov/vuln/detail/CVE-2018-20225.\n3. If you see high severity vulnerability for usage of library Pillow, it's ONLY IF we try to generate an image containing text that can uncontrollably lengthy. In PKScreener, the image is NEVER generated locally on your laptop or docker container. It is generated only when running in telegram-bot for morning/afternoon analysis alerts. Additionally, there are checks to ensure we never go beyond the maximum size of the number of columns in the analysis tables. To conclude, the image generation module never gets activated on docker/locally on your laptop. See https://nvd.nist.gov/vuln/detail/CVE-2023-44271\n\nThe story is similar for other low severity vulnerabilities that docker might show. If you're genuinely concerned, you can search with the respective CVE # in the NIST database to understand more or create an issue https://github.com/pkjmesra/PKScreener/issues . We keep reviewing all vulnerabilties regularly and fix those immediately if at all they are likely to impact us or our users.\n\n# Installing the latest version from PyPi.\n* Go ahead and install using `pip install pkscreener`. The releases page also has the latest wheels for multiple platforms.\n* This should install all of the major dependencies, except maybe, TA-Lib.\n* This app can still run without TA-Lib, but if you need to install TA-Lib for technical indicators (which otherwise is used from `pandas_ta` in the absence of TA-Lib), you can do this: Head to `.github/dependencies/` under this repo. Download the respective TA-Lib file/whl file and install either from the .whl file or from source. Check out any of the workflow files for steps to install TA-Lib.\n\nFor example:\n\nFor `Windows`: See https://github.com/pkjmesra/PKScreener/blob/c1e94ba3137915cb781161fa2d5fb69129940fd3/.github/workflows/w1-workflow-build-matrix.yml#L91-L101 \n\nFor `Mac`: Run `brew install ta-lib` assuming you have homebrew installed.\n\nFor `Ubuntu/Linux`: See https://github.com/pkjmesra/PKScreener/blob/main/.github/workflows/w1-workflow-build-matrix.yml#L121-L132\n\n* Now launch your favorite command line CLI and issue `pkscreener`. This will launch the pkscreener executable.\n\n# Building from source repo\n* Install python 3.11 for your OS/CPU. Download the installer from https://www.python.org/downloads/release/python-3913/#Files\n* Just clone the repo with `git clone https://github.com/pkjmesra/PKScreener.git`\n* `cd PKScreener`\n* `pip install -r requirements.txt` .\n* (Optional) If you would like to have technical indicators evaluated using TA-Lib, go ahead and install TA-Lib as well. `pip3 install ta-lib`. Please review additional steps to buil TA-Lib in the workflow files meant for your OS under .github > workflows and follow the line numbers from the previous section.\n* `cd pkscreener`\n* Finally, from within the `pkscreener` directory, run `python pkscreenercli.py`. Or just type/run `pkscreener`. You are all set.\n\n# Running the executables\n* Download the suitable file according to your OS.\n* Linux & Mac users should make sure that the `pkscreenercli.bin or pkscreenercli.run` is having `execute` permission. (`chmod +x pkscreenercli.run`)\n\n* **Run** the file. Following window will appear.\n\n\n* **Configure** the parameters as per your requirement using `Option > E`.\n\n![config](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/config.png)\n\n* **Scanner Menus** the scanner menus for each level/sub-level\n  ![menulevel1](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu.png)\n  ![menulevel2](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu_level2.png)\n  ![menulevel3](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/menu_level3.png)\n\n\n* Following are the screenshots of screening and output results.\n\n![screening](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/screening.png)\n\nResults :\n\n![results](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/results.png)\n\nIt also shows you how the chosen scan option has fared in the past. 1-Pd, 2-Pd means 1 day, 2 days from the date of scan in the past when those stocks came into the results of the chosen scan option.\n\n![results](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/result_analysis.png)\n* Once done, you can also save the results in an excel file.\n\n## Growth of 10k\n\nYou can see the performance of your stocks and/or at portfolio level using \"Growth of 10k\".\n\n![G10k](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/G10k.png)\n\nIt also summarises the Growth of 10k at portfolio level for the last quarter so that you know which filters worked best in the past:\n\n![G10k_Sum](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/G10k_Sum.png)\n\n## Backtests\nYou can now use the *Backtests* menu to backtest any of the selected strategies. See https://pkjmesra.github.io/PKScreener/BacktestReports.html\n\n![backtest](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/backtest.png)\n\n* Once done, you can also view the output html file saved at the same location from where you launched the app.\n\n## Scanning as a scheduled job once or at regular intervals\n* Running it once with pre-defined inputs\n  You can also run it as a one time job in any scheduler with pre-defined options. For example `./pkscreenercli.py -a Y -o X:12:10 -e` (or `pkscreenercli.exe -a Y -o X:12:10 -e` if you're executing with the exe) will run the scanner for all Nifty stocks and find all stocks matching CCI filter, save the results in xlsx file and exit. `./pkscreenercli.py -a Y -o X:12:9:2.5 -e` will run the scanner (menu option `X`) for all Nifty stocks (menu option `12`) to find volume gainers (menu option `9`) with at least the volume multiplier of 2.5 (input variable `2.5`), save the results in xlsx file and exit (menu option `-e`). Passing in the `-p` option for example `pkscreenercli.py -a Y -p -o X:12:6:1 -e` will also silence all command line prints/outputs and just run silently for the given options, save results and exit. Try and see all options with `./pkscreenercli.py -h`.\n\n* Running it at regular intervals\n  If you want to runn it at regular intervals, you can just pass the interval in `-c` command line option. For example, `./pkscreenercli.py -a Y -o X:12:6:1 -c 180` will run it every `180` seconds with console outputs also being printed. If you'd just like it to run as a cron job without console outputs, you may also pass the `-p` parameter. For example, `./pkscreenercli.py -a Y -p -o X:12:6:1 -c 180`\n\n## Understanding the Result Table:\n\nThe Result table contains a lot of different parameters which can be pretty overwhelming to the new users, so here's the description and significance of each parameter.\n\n| Sr  |       Parameter       | Description                                                                                                                                                                                                                  | Example                                                                                  |\n| :-: | :-------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |\n|  1  |       **Stock**       | This is a NSE scrip symbol. If your OS/Terminal supports unicode, You can directly open **[TradingView](https://in.tradingview.com/)** charts by pressing `Ctrl+Click` on the stock name.                                    | [TATAMOTORS](https://in.tradingview.com/chart?symbol=NSE%3ATATAMOTORS)                   |\n|  2  |   **Consolidating**   | It gives the price range in which stock is trading since last `N` days. `N` is configurable and can be modified by executing `Edit User Configuration` option.                                                               | If stock is trading between price 100-120 in last 30 days, Output will be `Range:20.0 %` |\n|  3  | **Breakout (N Days)** | This is pure magic! The `BO` is Breakout level in last N days while `R` is the next resistance level if available. Investor should consider both BO & R level to decide entry/exits in their trades.                         | `B:302, R:313`(Breakout level is 100 & Next resistance is 102)                           |\n|  4  |        **LTP**        | LTP is the Last Traded Price of an asset traded on NSE.                                                                                                                                                                      | `298.7` (Stock is trading at this price)                                                 |\n|  5  |      **Volume**       | Volume shows the relative volume of the recent candle with respect to 20 period MA of Volume. It could be `Unknown` for newly listed stocks.                                                                                 | if 20MA(Volume) is 1M and todays Volume is 2.8M, then `Volume = 2.8x`                    |\n|  6  |     **MA-Signal**     | It describes the price trend of an asset by analysing various 50-200 MA/EMA crossover strategies.                                                                                                                            | `200MA-Support`,`BullCross-50MA` etc                                                     |\n|  7  |        **RSI**        | For the momentum traders, it describes 14-period RSI for quick decision making about their trading plans                                                                                                                     | `0 to 100`                                                                               |\n|  8  |       **Trend**       | By using advance algorithms, the average trendlines are computed for `N` days and their strenght is displayed depending on steepness of trendlines. (This does NOT show any trendline on chart, it is calculated internally) | `Strong Up`, `Weak Down` etc.                                                            |\n|  9  |      **Pattern**      | If the chart or the candle itself forming any important pattern in the recent timeframe or as per the selected screening option, various important patterns will be indicated here.                                          | `Momentum Gainer`, `Inside Bar (N)`,`Bullish Engulfing` etc.                             |\n\n## Hack it your way:\nFeel free to Edit the parameters in the `pkscreener.ini` file which will be generated by the application.\n```\n[config]\nperiod = 1y\ndaystolookback = 22\nduration = 1d\nminprice = 20.0\nmaxprice = 50000.0\nvolumeratio = 2.5\nconsolidationpercentage = 10.0\nshuffle = y\ncachestockdata = y\nonlystagetwostocks = y\nuseema = n\nshowunknowntrends = y\nlogsenabled = n\ngeneraltimeout = 2.0\nlongtimeout = 4.0\nmaxnetworkretrycount = 10\nbacktestperiod = 60\nminimumvolume = 10000\n```\nTry to tweak this parameters as per your trading styles. For example, If you're comfortable with weekly charts, make `duration=5d` and so on. For intraday, you can set `period=1d and duration=5m` if you would like to calculate with 5minute candles. Set the duration to `15m` or whatever value you desire, but keep the period to `1d`. This tool, however, works best for short/mid term instead of intraday, but some scans like momentum/volume/NR4 etc can be used for screening stocks for intraday as well. You can use the toggle menu option `T` to toggle between long term and intraday config before you begin the scanners.\n\n## Creating your own Telegram channel to receive your own alerts:\nYou can create your own telegram channel to receive alerts wherenevr you run it locally on your laptop either from a command line interface console or run it as a scheduler. Simply, go ahead and\n1. Create a bot for yourself, then a channel and get their IDs. Follow the steps in https://medium.com/codex/using-python-to-send-telegram-messages-in-3-simple-steps-419a8b5e5e2 and https://www.siteguarding.com/en/how-to-get-telegram-bot-api-token\n2. After you have created the bot using `botFather` and have received/verified your bot id/token and channel ID using `get id bot`, simply go to `pkscreener` folder in the source code directory and create a `.env.dev` file with the following (If you are instead using the .exe or .bin or .run file from release, just create this file in the same folder where the executable (.exe or .bin or .run) is placed.)\n```\nCHAT_ID=Your_Channel_Id_Here_Without_A_Hyphen_or_Minus_Sign\nTOKEN=Your_Bot_Token_Here\nchat_idADMIN=Your_Own_ID_Here\n```\n3. From now on, you will begin to receive your own alerts on your telegram channel.\n   ![alerts](https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/alerts.png)\n\n## Troubleshooting and Logs:\nIf you are having issues running the program, you can just launch a command line interface (On windows> Start > Run > cmd) and then launch PKScreener with a command line option of `-l`. For example, `python pkscreenercli.py -l`. This will show you the path where the program will save all the log outputs from this run. Copy that path and go ahead and run the application. Altenatively, you can just go ahead and modify the `logsEnabled` value to `y`, save & close it and then run `python pkscreenercli.py`.\n\nAfter you have finished the run, go to that copied path, zip the contents of the file `pkscreener-logs.txt` and create an issue at https://github.com/pkjmesra/PKScreener/issues. Please do not forget to attach the log files in the issue.\n\n## Contributing:\n* Please feel free to Suggest improvements bugs by creating an issue.\n* Please follow the [Guidelines for Contributing](https://github.com/pkjmesra/PKScreener/blob/main/CONTRIBUTING.md) while making a Pull Request.\n\n## Disclaimer:\n* DO NOT use the results provided by the software 'solely' to make your trading decisions.\n* Always backtest and analyze the stocks manually before you trade.\n* The Author(s), the software and any related/unrelated entity will not be held liable for your own investing decisions or losses. The authors or this softfware does not make any claim about the correctness of the results.\n* This screener began as a [fork] but has since added a lot of additional scanners, backtesting, Telegram bots, Alerts and a number of modifications and improvements.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=pkjmesra/pkscreener&type=Date)](https://star-history.com/#pkjmesra/pkscreener&Date)\n\n[MADE-IN-INDIA-badge]: https://img.shields.io/badge/MADE%20WITH%20%E2%9D%A4%20IN-INDIA-orange\n[MADE-IN-INDIA]: https://en.wikipedia.org/wiki/India\n[Windows-badge]: https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white\n[Windows]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.exe\n[Linux-badge]: https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black\n[Linux]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.bin\n[Mac OS-badge]: https://img.shields.io/badge/mac%20os-D3D3D3?logo=apple&logoColor=000000\n[Mac OS]: https://github.com/pkjmesra/PKScreener/releases/download/0.45.20241012.631/pkscreenercli.run\n[GitHub release (latest by date)-badge]: https://img.shields.io/github/v/release/pkjmesra/PKScreener\n[GitHub release (latest by date)]: https://github.com/pkjmesra/PKScreener/releases/latest\n[pypi-badge]: https://img.shields.io/pypi/v/pkscreener.svg?style=flat-square\n[pypi]: https://pypi.python.org/pypi/pkscreener\n[wheel-badge]: https://img.shields.io/pypi/wheel/pkscreener.svg?style=flat-square\n[GitHub all releases]: https://img.shields.io/github/downloads/pkjmesra/PKScreener/total?color=Green&label=Downloads&style=for-the-badge\n[License-badge]: https://img.shields.io/github/license/pkjmesra/PKScreener?style=for-the-badge\n[License]: https://github.com/pkjmesra/PKScreener/blob/main/LICENSE\n[Codefactor-badge]: https://www.codefactor.io/repository/github/pkjmesra/PKScreener/badge\n[Codefactor]: https://www.codefactor.io/repository/github/pkjmesra/PKScreener\n[PR-Guidelines-badge]: https://img.shields.io/badge/PULL%20REQUEST-GUIDELINES-red?style=for-the-badge\n[PR-Guidelines]: https://github.com/pkjmesra/PKScreener/blob/new-features/CONTRIBUTING.md\n[github-license]: https://img.shields.io/github/license/pkjmesra/pkscreener\n[Downloads-badge]: https://static.pepy.tech/personalized-badge/pkscreener?period=total&units=international_system&left_color=black&right_color=brightgreen&left_text=PyPi%20Downloads\n[Downloads]: https://pepy.tech/project/pkscreener\n[Latest-Downloads-badge]: https://img.shields.io/github/downloads-pre/pkjmesra/pkscreener/latest/total?logo=github\n[Coverage-Status-badge]: https://coveralls.io/repos/github/pkjmesra/PKScreener/badge.svg?branch=main\n[Coverage-Status]: https://coveralls.io/github/pkjmesra/PKScreener?branch=main\n[codecov-badge]: https://codecov.io/gh/pkjmesra/PKScreener/branch/main/graph/badge.svg\n[codecov]: https://codecov.io/gh/pkjmesra/PKScreener\n[Documentation-badge]: https://readthedocs.org/projects/pkscreener/badge/?version=latest\n[Documentation]: https://pkscreener.readthedocs.io/en/latest/?badge=latest\n[Docker Status-badge]: https://img.shields.io/docker/automated/pkjmesra/pkscreener.svg\n[Docker Status]: https://hub.docker.com/repository/docker/pkjmesra/pkscreener\n[Docker Pulls-badge]: https://img.shields.io/docker/pulls/pkjmesra/pkscreener.svg\n[Prod Scan Tests-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w5-workflow-prod-scans_Tests.yml/badge.svg\n[Prod Scan Tests]: https://github.com/pkjmesra/PKScreener/actions/workflows/w5-workflow-prod-scans_Tests.yml\n[After Market-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w9-workflow-download-data.yml/badge.svg\n[After Market]: https://github.com/pkjmesra/PKScreener/actions/workflows/w9-workflow-download-data.yml\n[New Features-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w10-workflow-features-test.yml/badge.svg\n[New Features]: https://github.com/pkjmesra/PKScreener/actions/workflows/w10-workflow-features-test.yml\n[New Release-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w1-workflow-build-matrix.yml/badge.svg\n[New Release]: https://github.com/pkjmesra/PKScreener/actions/workflows/w1-workflow-build-matrix.yml\n[Docker-Build-badge]: https://github.com/pkjmesra/PKScreener/actions/workflows/w15-docker-image.yml/badge.svg\n[Docker-Build]: https://github.com/pkjmesra/PKScreener/actions/workflows/w15-docker-image.yml\n\n<!-- [![Docker Build][Docker-Build-badge]][Docker-Build] [![PKScreener Test - New Features][New Features-badge]][New Features] [![w9. After-Market Data Gen][After Market-badge]][After Market] [![1. PKScreener Build - New Release][New Release-badge]][New Release] [![Documentation][Documentation-badge]][Documentation]\n\n[![GitHub all releases][GitHub all releases]](#) [![GitHub][License-badge]][License] [![BADGE][PR-Guidelines-badge]][PR-Guidelines]\n [![w5. Production Scan Tests On Dev][Prod Scan Tests-badge]][Prod Scan Tests] \n-->\n\n<!--      |                                                                                                                    Discussions []                                                                                                                     | https://t.me/PKScreeners > For any discussion related to PKScreener, you may like to join this related Telegram group                            | <img src=\"https://raw.githubusercontent.com/pkjmesra/PKScreener/main/screenshots/PKScreeners_Group.jpg\" alt=\"Telegram Group\" width=\"100\"/> | --> \n",
    "bugtrack_url": null,
    "license": "OSI Approved (MIT)",
    "summary": "A Python-based stock screener for NSE, India with alerts to Telegram Channel (pkscreener)",
    "version": "0.45.20241017.632",
    "project_urls": {
        "Download": "https://github.com/pkjmesra/pkscreener/archive/v0.45.20241017.632.zip",
        "Homepage": "https://github.com/pkjmesra/pkscreener"
    },
    "split_keywords": [
        "nse",
        " technical indicators",
        " scanning",
        " stock scanners"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52f14421e1baf0dd00dad950690b36ce711c7d09cf3b64b4894cc4be0f8d83e4",
                "md5": "f429febbdfe3eeb61bdfa492bbacd21e",
                "sha256": "50c41fbe4cd94633ba57d155cacb3a2a07b5b48b87ca815b9b3b61c3a3145ac4"
            },
            "downloads": -1,
            "filename": "pkscreener-0.45.20241017.632-cp310-cp310-macosx_12_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "f429febbdfe3eeb61bdfa492bbacd21e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 827813,
            "upload_time": "2024-10-17T13:07:15",
            "upload_time_iso_8601": "2024-10-17T13:07:15.486902Z",
            "url": "https://files.pythonhosted.org/packages/52/f1/4421e1baf0dd00dad950690b36ce711c7d09cf3b64b4894cc4be0f8d83e4/pkscreener-0.45.20241017.632-cp310-cp310-macosx_12_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94965463ab4e71bc3b2f716732ae76373ddf5a399bf58d18bb9e86880e0528db",
                "md5": "57bc3868997578d5178a532e9d30ded9",
                "sha256": "35237e38e05927d460d39dd2cf9a7dd45c038617e1c3590b606cfae6da7b2764"
            },
            "downloads": -1,
            "filename": "pkscreener-0.45.20241017.632-cp311-cp311-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "57bc3868997578d5178a532e9d30ded9",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 827809,
            "upload_time": "2024-10-17T13:06:35",
            "upload_time_iso_8601": "2024-10-17T13:06:35.972772Z",
            "url": "https://files.pythonhosted.org/packages/94/96/5463ab4e71bc3b2f716732ae76373ddf5a399bf58d18bb9e86880e0528db/pkscreener-0.45.20241017.632-cp311-cp311-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe7902fb717a6ee9b96ba6411476cd7ed0f62d6fdb417e5a62fd21395c296188",
                "md5": "f5711fffbda277491346636e8f070df7",
                "sha256": "27966dd898eae0c965e7ddd871cad042c140d7510856087d6ed62ddd029921f8"
            },
            "downloads": -1,
            "filename": "pkscreener-0.45.20241017.632-cp311-cp311-manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f5711fffbda277491346636e8f070df7",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 827799,
            "upload_time": "2024-10-17T13:04:55",
            "upload_time_iso_8601": "2024-10-17T13:04:55.522293Z",
            "url": "https://files.pythonhosted.org/packages/fe/79/02fb717a6ee9b96ba6411476cd7ed0f62d6fdb417e5a62fd21395c296188/pkscreener-0.45.20241017.632-cp311-cp311-manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2de41f680da44fa2b00b6c550b77e29fcc2c30eb70b6ced696188fbd9e7665fa",
                "md5": "773741b27760822f10d4ca505db6fde5",
                "sha256": "7f502e4e5c593ea8d2b5fb7339a43064e4e23970d6d6d95e6a2d5c2afdfea774"
            },
            "downloads": -1,
            "filename": "pkscreener-0.45.20241017.632-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "773741b27760822f10d4ca505db6fde5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 829710,
            "upload_time": "2024-10-17T13:11:25",
            "upload_time_iso_8601": "2024-10-17T13:11:25.721057Z",
            "url": "https://files.pythonhosted.org/packages/2d/e4/1f680da44fa2b00b6c550b77e29fcc2c30eb70b6ced696188fbd9e7665fa/pkscreener-0.45.20241017.632-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96a147387ddc902517b4452127c676a161a3f49a5bffc19649591da2f606b544",
                "md5": "9eb50c317a990fe34153ded456450d2f",
                "sha256": "e48148529bf42be0bc17cdb97341bdb26c199ddd68cc915daa7af706697fbcb0"
            },
            "downloads": -1,
            "filename": "pkscreener-0.45.20241017.632.tar.gz",
            "has_sig": false,
            "md5_digest": "9eb50c317a990fe34153ded456450d2f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 818944,
            "upload_time": "2024-10-17T13:05:00",
            "upload_time_iso_8601": "2024-10-17T13:05:00.829565Z",
            "url": "https://files.pythonhosted.org/packages/96/a1/47387ddc902517b4452127c676a161a3f49a5bffc19649591da2f606b544/pkscreener-0.45.20241017.632.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-17 13:05:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pkjmesra",
    "github_project": "pkscreener",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "pkscreener"
}
        
Elapsed time: 0.38623s