Generate Swing Trade Ideas
Analyzes daily NSE stock data using AI to find high-probability swing trade setups, delivering them directly to Telegram and logging them in Google Sheets.
This workflow runs every weekday after NSE market close and generates high-probability swing trade ideas from a curated list of 40 Nifty 50 large-cap stocks. It combines real-time market data, technical analysis powered by an AI model, and instant delivery via Telegram and Google Sheets.
It performs the following steps:
- Triggers every weekday at 4:05 PM IST (just after NSE market close at 3:30 PM IST).
- Defines a universe of 40 NSE large-cap stocks across various sectors.
- Fetches live End-of-Day (EOD) market data for all 40 stocks in parallel using Yahoo Finance via RapidAPI.
- Cleans and normalizes the raw API responses into structured stock objects.
- Sends the data to an AI agent which identifies exactly 3 swing trade setups with entry, target, stop loss, and reasoning.
- Delivers formatted trade alerts to a Telegram channel or group.
- Logs every trade recommendation into a Google Sheet for historical tracking.
What you need
- A RapidAPI account with access to the Yahoo Finance API (apidojo-yahoo-finance-v1).
- A Telegram Bot token and a Chat ID (channel or group) where alerts will be delivered.
- A Google account with a Google Sheet set up for trade logging.
- A Needle Google connector authorized for Google Sheets write access.
- A Needle Telegram connector authorized with your Bot token.
Configuration Variables
| Variable | Type | Description |
|---|---|---|
| RAPIDAPI_KEY | Secret | Your RapidAPI key for Yahoo Finance access |
| TELEGRAM_CHAT_ID | String | The ID of the Telegram channel or group |
| sheetId | String | ID of the Google Sheet for logging trades |
| worksheetId | String | ID of the specific worksheet inside the Google Sheet |
How the flow works
- Scheduled Trigger: Fires automatically every Monday through Friday at 4:05 PM IST using the cron expression
5 16 * * 1-5. No manual action is needed once published. - Stock Ticker List: A code node defines the watchlist of 40 NSE symbols covering all major Nifty 50 sectors. It outputs an array of ticker objects, enabling the next node to run in parallel.
- Yahoo Finance HTTP Request: Fetches live EOD market quote data for every ticker simultaneously using RapidAPI. Run mode is set to item so all 40 requests happen in parallel.
- Data Parser and Normalizer: A code node processes raw API responses and extracts technical fields (price, volume, moving averages, etc.). Invalid or empty responses are filtered out gracefully.
- AI Agent: Receives the full normalized dataset and uses deep technical analysis to identify exactly 3 high-probability swing trade setups. It evaluates Moving Average crossovers, volume confirmation, support and resistance levels, risk to reward ratios, and valuation. The temperature is set to 0.2 for consistent, analytical responses.
- Trade Array Normalizer: A code node ensures the AI output is always a clean flat array before it is passed to the output nodes.
- Telegram Alert Node: Sends a clean formatted markdown message to your Telegram channel for each trade.
- Google Sheets Logger Node: Appends one row per trade recommendation to your tracking spreadsheet, capturing all fields for performance review.
Output
You get 3 actionable swing trade ideas every weekday evening delivered to:
- Your Telegram channel or group as formatted real-time alerts.
- A Google Sheet that builds into a historical trade journal over time.
Trade Details Captured:
| Field | Description |
|---|---|
| Symbol | The stock ticker symbol |
| Direction | Buy or Sell recommendation |
| Entry | Suggested entry price |
| Target | Price target for the trade |
| Stop Loss | Level to cut losses |
| Timeframe | Expected holding period (e.g., 3 to 15 trading days) |
| Reason | A concise technical reason grounded in the EOD data |
Notes
- This workflow uses only the EOD data fetched during the run. The AI does not access real-time intraday data or external news.
- Ensure your RapidAPI plan supports at least 40 requests per call to avoid rate limiting.
- The Google Sheet must have column headers matching the trade fields before the first run.
- This workflow is for educational and informational purposes only. It does not constitute financial advice.
- You can expand the stock universe by editing the ticker list in the Code Node.
Want to showcase your own workflows?
Become a Needle workflow partner and turn your expertise into recurring revenue.
