fbpx
Tickerly Trading bot service logo

BLOG

Session-Based Trading Bots: Options Compared

by

A session-based trading bot only trades inside time windows you define, such as the London or New York session, and stays flat outside them. You can build one four ways: a session filter in a TradingView strategy routed to an execution platform, an expert advisor (EA) on MetaTrader, a no-code rule builder, or custom code. This guide compares them on the things that decide whether a session bot works: timezone handling, forced exits, speed, and rules from your broker or prop firm.

Tickerly
tickerly.net
Automate Your TradingView Strategy
Tickerly turns TradingView strategies into trading bots, helping you automate session-based trading across crypto, forex, and stocks.

Explore Tickerly

TL;DR

  • A session bot is a time-window filter on entries plus a hard exit before the window closes. The exit matters more than the entry.
  • For TradingView users, the shortest path is a Pine Script session filter feeding alerts to an automation platform. No VPS and no extra code is needed on the execution side.
  • Always set the timezone explicitly in your session string. Daylight saving mismatches are the most common silent failure.
  • Check your account rules first. Some prop firms ban bots outright, and the CFTC warns about scams that promise guaranteed automated returns.
  • Tickerly plans start at $19 per month, with a 30-day free trial.

Table of Contents

What a session-based bot actually does

A session-based bot restricts signals to pre-defined windows, for example London 08:00 to 16:00 UTC. Typical setups split the day into Asia (consolidation), London (breakout) and New York (confirmation). Many add a one-trade-per-session cap and fixed stop-loss and take-profit levels to reduce overtrading. Those parameters come from a session-based cTrader bot description, and they are a useful template even if you never use that product.

The logic has three parts:

  1. Entry filter. Signals outside the window are ignored.
  2. Position limits. One trade per session, or a fixed number, so a choppy window cannot trigger ten entries.
  3. Session-end exit. A close-all instruction forces a flat position at the window’s edge, so you carry no overnight exposure.

Pine Script developers often call the session filter the most underused optimization tool. The reasoning, shown in a TradingView session filter example, is that restricting signals to high-liquidity hours avoids low-volume noise that hurts breakout and trend-following systems. Treat that as a developer’s view, not a guarantee. Backtest your own strategy with and without the filter before trusting it.

Why the exit is the hard part

Most people spend their time on the entry. Traders who run session bots tend to say the exit logic matters more. A common oversight is never defining what happens to an open position when the session ends. One builder’s write-up of a session-based SOL bot stresses a hard-coded rule that forces a flat position before the close. Your risk then stays the same whatever the news does after hours.

In practice, decide these before you go live:

  • Does the bot close at the last bar of the session, or a few minutes before it?
  • Does a pending limit order get cancelled when the window ends?
  • What happens if the exit alert fails to fire or the exchange rejects it?

If you flatten at the session’s edge with a Tickerly close all alert, remember that it closes the position but does not cancel resting orders: stop-loss or take-profit orders left on the exchange can survive, so check the order list or have the strategy cancel them too.

We cover the mechanics of alert-driven exits in automating trade exits in TradingView.

Getting session filters right in TradingView

If your strategy lives in Pine Script, the filter is a few lines. The trap is time. TradingView’s time functions depend on a timezone, and the Pine Script time documentation explains that the timezone parameter defines how session strings are read. Name it explicitly, for example America/New_York, instead of relying on the exchange default. Otherwise a daylight saving change can shift your window by an hour and the bot trades in a period you never intended.

A checklist for your session filter:

  1. Write the session as a string with an explicit IANA timezone.
  2. Plot the session as a background color on the chart and visually confirm it on a DST-change week.
  3. Gate entries with the session flag, and gate exits with a separate “session ending” flag.
  4. Send entry and exit as distinct alerts, so the execution side can tell them apart.
  5. Run the strategy in paper trading through at least one full week before sending real orders.

On a 15-minute chart, an exit set for the last bar of a 16:00 close can fire after your intended cutoff. Test your exact bar timing rather than assuming it.

The four ways to run a session bot, compared

Approach Best for Session control Main drawback
TradingView session filter plus an automation platform (Tickerly) TradingView users who already have a Pine Script strategy Full, because the filter lives in your script Depends on alerts reaching the platform
MetaTrader EA Forex traders who work only in MT4/MT5 Full, in MQL code or EA settings Usually needs a VPS to run around the clock, and you can’t reuse your TradingView logic
No-code rule builder (for example Coinrule) Beginners building simple if-then rules Limited to what the rule blocks expose Hard to express custom session logic or complex exits
Custom code (Python, for example on MT5) Developers who want total control Unlimited You own the infrastructure, error handling and maintenance

For the custom route, open-source frameworks such as aiomql, a Python framework for MetaTrader 5 bots, give you building blocks for strategies, risk management and execution. That is real power, and real upkeep.

TradingView plus Tickerly

This is the setup we built Tickerly for. You keep your strategy and its session filter in TradingView. Alerts become orders on supported exchanges within a fraction of a second, with no coding on the execution side and no VPS for direct exchange connections. Tickerly supports crypto, forex, stocks, futures and prop firm markets, including MetaTrader 4 and 5 (where the Tickerly connector runs in your own terminal, which has to stay on), with unlimited strategies from Level 3 and up to 2,500 alerts a day depending on plan. You can inspect every alert and its result in the alert log, which helps when you are debugging a session-end exit.

The session-specific advantage is that you can run separate strategies for Asia, London and New York at once, each with its own filter, rather than one monolithic bot.

MetaTrader expert advisors

An EA runs inside the terminal, so latency to the broker can be excellent when it is hosted well. The costs are the terminal environment and a lack of portability: logic written for MT5 does not carry over to your TradingView charts. If you want the best of both, use TradingView for signals and route execution to MT4/MT5 through an automation layer. Our overview of bots in forex trading goes through the tradeoffs.

No-code rule builders

Platforms like Coinrule use an if-this-then-that approach with no coding. That suits a simple rule such as buying on a price condition. A session bot with a forced exit, a per-session trade cap and a volatility filter pushes beyond what most rule blocks offer. If your edge is already scripted on TradingView, you would be rebuilding it with fewer controls.

Writing your own

A Python bot gives complete freedom and complete responsibility. You handle reconnects, rejected orders, clock drift and logging. For a trader whose edge is the strategy, not the plumbing, that is time not spent trading. If you do build, add layered risk controls, covered below.

Our perspective: sessions are risk windows, not just signals

We see session filters as a risk-management tool first and an alpha tool second. A strategy that only trades when liquidity is present has fewer fills at poor prices and a more predictable exposure profile. That is why we push traders toward the pairing of an entry filter and a forced exit.

What we’d tell a trader starting out:

  • Keep the session logic in Pine Script, where you can see it and backtest it.
  • Send the execution layer plain, unambiguous alerts. Our full trade alerts and advanced alert messages are built for that.
  • Think about liquidity inside the session too. Open and close hours behave differently, as we explain in bot trading liquidity factors.
  • Run multiple small, specialized strategies instead of one that tries to cover every hour. Diversifying across sessions and assets is where handling many strategies at once pays off.

Speed matters most at session boundaries. London open and New York open are exactly when fleeting moves happen, and a slow alert-to-order path costs you the fill you designed the strategy around.

— Jay

Risk controls to add on top of the session window

A time window does not make a bot safe. The CFTC says automated trading is not risk-free, and its guidance on AI trading bots notes that malfunctions and human errors can cause sudden disruptions. Layered controls are the practical answer:

  • Maximum position size per order and per session.
  • Daily loss limit that disables the strategy for the rest of the day.
  • Velocity limits: a cap on orders per minute, so a looping alert cannot flood your account.
  • Manual kill switch you can reach in seconds.

With a TradingView strategy, the first three belong in your Pine Script, where you can backtest them alongside the session filter. For the kill switch, pausing the TradingView alert stops new orders, and a Tickerly close all alert flattens a symbol in one step.

That last item can be physical. A programmable keypad for closing positions and flattening risk is one option, and this guide to a compliance-friendly trade execution setup for US traders covers how to limit losses when something misfires.

For futures specifically, see our risk-first guide to futures trading bots.

Check your account rules before you automate

Bots are generally legal, but your venue’s rules decide what you can run. TakeProfitTrader is a clear example: its Universal Trading Policies say bots and algorithmic execution tools are not permitted, with trade copiers a noted exception on accounts owned solely by the trader. If you are asking whether you can use a bot on Take Profit Trader, read that page and confirm with the firm’s support before connecting anything. Other prop firms differ, and rules change. We keep a guide to prop firm trading bot rules for this reason.

Check your account rules before you automate — overview diagram

Also be careful about who you trust. The CFTC says fraudsters exploit interest in AI trading, and it describes cases where defendants promised huge returns from algorithms. Its advice is to research a company’s background and check domain registration history. No product, including ours, can promise returns, and no bot predicts sudden market changes.

How to launch a session bot in six steps

  1. Define your session in UTC and in your local timezone, and write down both.
  2. Add the filter and the forced exit to your Pine Script strategy.
  3. Backtest with and without the filter, including a DST-change period.
  4. Create entry and exit alerts and connect them to your execution platform.
  5. Paper trade for a week, then go live with minimum size.
  6. Review the alert log weekly and compare actual fills against backtest assumptions.

Trying it with Tickerly

Tickerly is a subscription service with a 30-day free trial. Published plans on the plans page are Level 2 at $19 per month, Level 3 at $29 per month, Level 4 at $39 per month and Level 4 Ultra for traders who need 2,500 alerts a day. Tiers vary by supported asset classes, strategy count and alert limits, so check which matches your session setup. You can see the full breakdown on the pricing page, or read the automated trading FAQ first.

FAQ

Automated trading is generally legal, but venues and firms set their own rules. Some proprietary trading firms ban bots entirely. Check your broker or firm’s current policy, and consult a licensed professional in your jurisdiction for legal questions.

Can you use a trading bot on Take Profit Trader?

According to its 2026 Universal Trading Policies, automated bots and algorithmic execution tools are prohibited on its Test, PRO and PRO+ accounts. Trade copiers are a noted exception for accounts solely owned by the trader. Confirm with the firm before you automate anything.

What is a bot in forex trading?

It is software that places forex orders from predefined rules, such as a signal, a time window or a risk limit. Some run as EAs inside MetaTrader, and others execute alerts from charting tools like TradingView. A session-based bot adds time windows so it trades only in sessions like London or New York.

Do session filters really improve a strategy?

They can reduce noise from low-liquidity hours, but they do not guarantee better results. Some strategies perform best at specific hours, and others lose edge when over-filtered. Backtest both versions on enough data, and include different market conditions.

Sources

This article was produced with Al assistance and reviewed for accuracy. It is provided for general information only and is not professional or financial advice.

Tags :

Latest Post