You can use TradingView stock screener to filer among 100s of stocks of your choice. Trading view offers free stock screener for various exchanges, with this one can easily filter stocks based on various technical or fundamental parameters.
In this tutorial we are going to show you simple example on how to setup automatic trades for long entry and long exit based on some technical parameters using trading views free stock screener
Strategy logic
Long Entry Condition (LE) :
- Open equals low
- Stocks showing some much activity in last 15min (change in 15 min > change in day)
- Exponential moving average(10) is above Exponential moving average(20){UPTREND}
- Price is trading above VWAP
Long Exit Condition (LX):
- We will have long exit based on trend , exit if Exponential moving average(10) is below Exponential moving average(20){Down trend}
- Exit only stocks that are in a long position
APIBridge Configuration
Trading view filters ALL stocks available in exchange which can include very low volume stocks. You should first prepare a list of liquid stocks and import them in APIBridge. See here how to import a list of Nifty50 stocks https://mycoder.pro/apibridge/how-to-import-export-symbol-settings/
Now we need to set up risk management settings of the setup,
In this example, We are going to hold max position 1 for a particular stock, limit the max trades per day.
For this go to Risk management settings and limit the parameters in the strategy You applied for your stocks. Also, note that you can only trade in Market Orders with MIS/NRML product types. Other orders like Limit, CO, BO are not advisable from tradingview screener.
Setting up signal rules:
We are going to set up a rules that
- AVOID MULTIPLE LONG OR SHORT ENTRIES
- AVOID LONG/SHORT EXIT SIGNAL IF NO LONG/SHORT POSITION
This needs to be done because the screener may send multiple long entries, and we are interested to use long exit rules only to exit our current positions
Setting up screener:
Select stock screener in Trading view
Click on Filters
Now we are going to set up our long entry conditions
We recommend you also add a volume filter in the screener to avoid the trigger of too many stocks.
After setting the filters close this tab and click save the filter as
Now choose the chart time interval and refresh settings
Click on the alert option and add
TYPE: LE
Setting up Long Exit settings
Click on filters, Setup moving average trend condition. We recommend you also add a volume filter in the screener to avoid the trigger of too many stocks.
Close save the filter as LX
Select time frame same as long entry filter and click on add alert and add
TYPE: LX
Trading view may trigger alerts on various scripts but ONLY scripts added in API bridge will be traded. We recommend you also add a volume filter in the screener to avoid the trigger of too many stocks.
We have made our setup such that the long exit will only happen to stocks in which we have a Long position. Even though you may get LX from a lot of stocks.
This is a simple Trade setup to demonstrate also setup in TV screener, however, you can set up trade conditions based on some other technical indicators like Bolinger bands, Ichimoku cloud, Rsi, etc
Do you want coding help to deploy your own strategy for live trading? Check our coding assistance.
Great work sir please give explaination for option callput buy and sell .