How To Trade from TradingView Screener - MyCoder (2024)

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/

How To Trade from TradingView Screener - MyCoder (1)

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.

How To Trade from TradingView Screener - MyCoder (2)

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
How To Trade from TradingView Screener - MyCoder (3)

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

How To Trade from TradingView Screener - MyCoder (4)

Click on Filters

How To Trade from TradingView Screener - MyCoder (5)

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.

How To Trade from TradingView Screener - MyCoder (6)
How To Trade from TradingView Screener - MyCoder (7)
How To Trade from TradingView Screener - MyCoder (8)

After setting the filters close this tab and click save the filter as

How To Trade from TradingView Screener - MyCoder (9)

Now choose the chart time interval and refresh settings

How To Trade from TradingView Screener - MyCoder (10)

Click on the alert option and add

TYPE: LE

How To Trade from TradingView Screener - MyCoder (11)

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.

How To Trade from TradingView Screener - MyCoder (12)

Close save the filter as LX

How To Trade from TradingView Screener - MyCoder (13)

Select time frame same as long entry filter and click on add alert and add

TYPE: LX

How To Trade from TradingView Screener - MyCoder (14)

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.

How To Trade from TradingView Screener - MyCoder (15)

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.

How To Trade from TradingView Screener - MyCoder (16)

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.

How To Trade from TradingView Screener - MyCoder (2024)
Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 6048

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.