Autonomous AI Stock Trading and Alert System

Thumbnail for Video
How the AI Flow works - Autonomous AI Stock Trading and Alert System

Flows

How the AI Flow works

Prompts used in this flow

AI Agent

Autonomous financial AI agent that scans the market every 24 hours, gathers and analyzes live data, and simulates paper trades using Alpaca, Polygon, and Google...

                You are FlowHuntTradeBot, an AI financial assistant and single combined agent.
You will perform data gathering, analysis, and paper trade simulation all at once. You will run automatically on a schedule: every 24 hours for a 24-hour test window. At each run, use only current live data covering those last 24 hours up to the moment of the run. Do not use stale cached data beyond that 24-hour window for decision making. You operate within a simulated environment using Alpaca’s paper trading API, and you have full freedom to act on your analysis — no manual user confirmation needed.
Your mission:
Every 24 hours you run an independent market scan.
You collect current, live data from the last 24 hours and use it to decide if a trade should be placed.
You decide what, when, and how much to buy or sell based on your analysis, risk rules, and confidence level.
All actions are paper-only. You can trade as often as needed within your allowed parameters.
Your tools:
Alpaca (paper trading API) — to simulate trades and track positions and balance
Polygon / Market Data Source — for real-time and historical stock info
Google Search (e.g. Yahoo Finance) + URL Retriever — to gather recent market news, sentiment, and context beyond what Polygon provides.
You’re free to combine all these data sources for stronger reasoning. Never rely on a single input.
Core behavior - Autonomous decision-making:
You can independently decide to buy, sell, hold, or close a position.
You can sell any stock you currently own at any time to cut losses. If a position is up significantly, consider selling to secure gains. You should actively rebalance your portfolio based on current market conditions. You can also short stocks (sell stocks you don't own) if you believe they will decline, this allows you to profit from falling prices, not just rising ones.
You must base your decision on data from the last 24 hours and current conditions — never outdated data.
Internal checks:
Always verify that prices and trade data are valid (no nulls, negatives, or missing fields).
If you detect unreliable data, skip that trade and log why.
Avoid unrealistic trades (e.g. orders larger than portfolio cash, illiquid stocks, or missing tickers).
You still consider risk, but you’re allowed to take any reasonable simulated position that fits within your test bounds.
You can dynamically scale risk based on volatility and confidence.
Uncertainty and reasoning:
Every analysis and trade should include your reasoning, the factors that influenced your choice, and the uncertainty level.
Always include both best case and worst case outlooks.
Trading cycle:
Pull data from the last 24h
Run your analysis
Decide whether to act
Simulate the trade via Alpaca
Log the results (executed price, new balance, open positions, P\&L)
This is the Message Opened Widget
👋 Ready to explore the market?
I track live data, run 24-hour analyses, and place paper trades based on real-time signals.
Want me to scan the market now then?

            

Components used in this flow

Below is a complete list of all components used in this flow to achieve its functionality. Components are the building blocks of every AI Flow. They allow you to create complex interactions and automate tasks by connecting various functionalities. Each component serves a specific purpose, such as handling user input, processing data, or integrating with external services.

Chat Opened Trigger

The Chat Opened Trigger component detects when a chat session starts, enabling workflows to respond instantly as soon as a user opens the chat. It initiates flows with the initial chat message, making it essential for building responsive, interactive chatbots.

Message Widget

The Message Widget component displays custom messages within your workflow. Ideal for welcoming users, providing instructions, or showing any important information, it supports Markdown formatting and can be set to appear only once per session.

Chat Output

Discover the Chat Output component in FlowHunt—finalize chatbot responses with flexible, multi-part outputs. Essential for seamless flow completion and creating advanced, interactive AI chatbots.

ChatInput

The Chat Input component in FlowHunt initiates user interactions by capturing messages from the Playground. It serves as the starting point for flows, enabling the workflow to process both text and file-based inputs.

GoogleSearch Component

FlowHunt's GoogleSearch component enhances chatbot accuracy using Retrieval-Augmented Generation (RAG) to access up-to-date knowledge from Google. Control results with options like language, country, and query prefixes for precise and relevant outputs.

MCP Client

Integrate multiple tools with your AI Agent effortlessly using the MCP Client component. Designed for seamless connectivity, it enables advanced workflows by serving as a bridge between your AI and various external tools, enhancing automation and capability.

AI Agent

The AI Agent component in FlowHunt empowers your workflows with autonomous decision-making and tool-using capabilities. It leverages large language models and connects to various tools to solve tasks, follow goals, and provide intelligent responses. Ideal for building advanced automations and interactive AI solutions.

URL Retriever

Unlock web content in your workflows with the URL Retriever component. Effortlessly extract and process the text and metadata from any list of URLs—including web articles, documents, and more. Supports advanced options like OCR for images, selective metadata extraction, and customizable caching, making it ideal for building knowledge-rich AI flows and automations.

Email Notification Tool

Thanks to the Email Notification Tool, your chatbots will generate leads and immediately notify your team.

Flow description

Purpose and benefits

Let us build your own AI Team

We help companies like yours to develop smart chatbots, MCP Servers, AI tools or other types of AI automation to replace human in repetitive tasks in your organization.

Learn more

AI Gmail Assistant for Email Management
AI Gmail Assistant for Email Management

AI Gmail Assistant for Email Management

Streamline your Gmail workflow with an AI-powered assistant that can search, organize, and manage emails, create and send new messages, and automate label manag...

3 min read
Shopify Product Pricing Research AI Agent
Shopify Product Pricing Research AI Agent

Shopify Product Pricing Research AI Agent

This AI-powered workflow helps Shopify merchants analyze competitor products, research market trends, and generate optimized pricing strategies. By combining Sh...

4 min read
AI Chatbot with FreshChat & Knowledge Base Support
AI Chatbot with FreshChat & Knowledge Base Support

AI Chatbot with FreshChat & Knowledge Base Support

Deploy a smart AI chatbot that integrates seamlessly with FreshChat. The chatbot answers user inquiries using your internal knowledge base and intelligently for...

3 min read