Yashas Khoday
·Co-Founder & CPO, FYERS

Automate: Build and Execute Rule-Based Workflow on FYERS Web

Have you ever felt that if emotions were taken out of trading, you would trade better?

A lot of traders have a plan, but sticking to it consistently is the hard part.

Before market hours, things are clear. You know what you want to trade and the rules you want to follow. But once the market opens, things move fast. Prices start moving quicker than expected.

You either wait a little too long and miss your entry, or you enter earlier than planned. Then you look at your P&L, and you start making small adjustments. You move your stop loss. You rethink the exit. You keep reacting to what is happening on the screen.

Later, it becomes obvious. You had a plan. You knew what you were supposed to do. But you still did not follow it the same way every time.

That is what we wanted to solve, and that is why we built Automate.

Automate turns your trading strategies into automation workflows without having to write a single line of code.

You can plan your trading in advance.

  • What to trade.

  • When to trade.

  • When to execute.

  • When to exit.

Once that plan is set, Automate follows it exactly, the same way, every time.

https://www.youtube.com/watch?v=M-ivZx7xm2c

In this blog, I want to explain how Automate works, from its core building blocks to structured workflows for multi-leg options strategies.

The three building blocks of Automate

Every automation you build on Automate is made using three types of nodes:

  • Triggers decide when the workflow wakes up.

  • Actions decide what the workflow does.

  • Conditions decide which path the workflow should take.

You can start building from any node type depending on what you are trying to create. Some traders begin by defining the entry action first. Some start by setting guardrails first. Some start with the trigger.

Triggers

1) Range breakout

A trigger for setups like opening range breakouts and consolidation breaks. You define a range, and the trigger fires when price breaks that range.

If your strategy needs confirmation, use a variant that waits for a candle close beyond the level.

Example: Start evaluating the workflow when price breaks the opening range high (9:15–9:30). From there, actions decide whether to place an entry and how exits are set.

2) Price breakout

Triggers when price or related metrics cross a defined level. This includes:

  • Price crossing above/below a level

  • Breakout with confirmation (candle close)

  • Day’s change breakout (absolute/percentage)

  • Volume breakout.

Example: Start evaluating when Nifty price crosses above ₹X (or when volume breaks above Y). After that, actions can place an order, set exits, or send an alert based on your workflow.

3) Webhook trigger

Allows an external system to start your workflow inside Automate. Useful when your signal logic is outside FYERS (TradingView alerts, your own scripts), but execution is inside Automate.

Example: A TradingView alert fires and the webhook wakes the workflow. Actions then handle the next steps inside Automate (order placement, alerts, risk checks).

4) Order status

Triggers when an order reaches a specific state. Automate supports order execution, rejection, pending, and cancelled states. Useful for sequencing steps in multi-leg logic.

Example: When the first order is marked “executed”, wake the workflow to evaluate the next step. Actions can then place the next leg or stop the flow if the order was rejected.

5) Wait time

Introduces a controlled pause in the workflow. You can wait for a duration or wait till a specific time.

Used for time-based spacing between steps, cooldown periods after stop loss, or time-based exits.

Example: Wake the next part of the workflow after 30 seconds, or at 3:10 PM. Actions after the wait decide what happens next.

6) Portfolio check

Triggers based on account-level values like automation P&L, total P&L, number of open positions, holdings P&L, and intraday holdings P&L. Often used as a risk layer.

Example: When total P&L reaches -₹X, wake the workflow to evaluate a risk rule. Actions can then stop further entries, exit positions, or send an alert depending on your setup.

7) Symbol details check

Triggers based on symbol-level attributes such as 52-week high, upper/lower circuit, day high/low, best bid, best ask, and volume traded. Useful when liquidity and market conditions matter.

Example: Wake the workflow when best bid/ask spread crosses your threshold, so the next actions can decide whether to proceed or block the next step.

8) Orderbook check

Built around order-flow style metrics such as number of orders executed and number of pending orders.

Useful when you want the workflow to react to execution flow conditions, not only price movement.

Example: Wake the workflow when pending orders spike above a set value. Actions can then trigger an alert, stop a strategy, or apply whatever rule you’ve defined.

For detailed FAQs on triggers, refer to this section.

Actions

Once the workflow is active and your logic says “do this now”, actions are what actually execute it.

Actions define what the workflow should do. They can place orders, modify or cancel orders, square off positions, send alerts, and stop the automation.

1) Place order

Place order is the heart of most workflows.

Automate supports placing:

  • Options orders

  • Futures orders

  • Any order directly for a symbol

  • Options order with trailing stop loss

  • Options order with stop loss and target

Instead of picking a fixed contract manually, you define rules for what should be placed when the workflow reaches that block. For options, this includes dynamic selection such as ATM, OTM, or ITM relative to spot at that moment.

So if your workflow says “Buy NIFTY ATM Call”, Automate calculates the right strike when the workflow runs, not when you created it.

Targets, stop loss, and trailing stop loss can be attached directly to the same action. This keeps entry and risk management together, instead of being handled as separate mental steps.

Place order also creates outcome paths on the canvas, so the workflow can branch based on what actually happened:

  • Continue

  • Target hit

  • Stop loss hit

Example: Buy NIFTY ATM Call with a stop loss and target attached. If the stop loss hits, the workflow follows the “Stop loss hit” path and can stop the automation or send an alert.

2) Stop automation

Stop automation stops the workflow from running further.

In Automate, you can stop:

  • The automation only (it can run again on the next scheduled time)

  • The automation and square off positions

  • The automation and square off current automation positions

This is typically used as a safety control, or as the final block after a successful exit.

Example: After your target is hit, stop the automation and square off current automation positions so the workflow does not re-enter.

3) Cancel order

Cancel order helps you remove pending orders automatically.

Automate supports cancel all orders or cancel a specific order by order ID. This is useful when entries do not get filled in time, or when a condition changes and you want to pull an unfilled order.

Example: Place a limit entry order, wait for a defined duration, and if it is still pending, cancel the order to avoid late fills.

4) Modify order

Modify order allows you to modify a pending order using its order ID. This is useful for adjusting entry price, scaling quantity, or handling order-management logic inside a workflow.

Example: If price moves closer to your level and you want a better fill, modify the pending limit order price instead of cancelling and placing a new one.

5) Square off

Square off closes positions. Automate supports multiple square-off scopes, such as:

  • Square off all positions

  • Square off automation positions

  • Square off by segment

  • Square off all options positions (and NSE options)

  • Square off commodity positions

  • Square off all intraday positions

This matters because “exit” can mean different things depending on the workflow. Sometimes you want to exit only what this automation created. Sometimes you want a broad risk-off switch.

Example: If your portfolio check hits a max loss, square off all intraday positions as a one-step risk-off action.

6) Mail alert and mobile app notification

These actions keep you informed. They are useful for logging entries, exits, stop loss events, validation failures, or any point where you want visibility without watching the screen.

Example: Send a mobile notification when an entry is placed, and send another when the workflow exits on target or stop loss.

For detailed FAQs on actions, refer to this section.

Conditions

Triggers wake the workflow up. Actions execute. Conditions decide how the workflow should behave once it is running.

Conditions are how you enforce discipline. They add checks, decision branches, and safety rules that prevent blind order placement.

Automate supports four condition types: IF, AND, OR, and ANY.

1) IF condition

IF creates a clear decision branch.

If the condition is true, the workflow goes one way. If false, it goes another way. This is commonly used for checks like time windows, P&L limits, or market condition filters before placing an order.

2) AND condition

AND allows the workflow to proceed only if all connected checks are true.

For example, trade only if:

  • portfolio open positions are within limit, and

  • spread is acceptable, and

  • time is within your window

3) OR condition

OR allows the workflow to proceed if at least one connected check is true. This is useful when multiple acceptable states can lead to the same action.

4) ANY condition

ANY is different. ANY allows the workflow to monitor multiple conditions in parallel. When any one of them triggers, the workflow immediately moves to the next connected node.

This is most commonly used for exits and safety logic, because it lets the workflow react to whichever event happens first.

Together, conditions complete the control layer of Automate. They help you trade with structure instead of impulse.

For detailed FAQs on conditions, refer to this section.

For additional assistance or help, you can fill this form.

Start, save, schedule

This is the part many people miss. Building the workflow on canvas is only half the process. The final step is making it live in a controlled way.

Once your workflow is set up using triggers, actions, and conditions, Automate follows a simple execution flow built around one primary button - Start.

Start (run)

When you click Start, Automate does three things in sequence:

  1. Check for errors

Automate checks whether the workflow is ready to start. It looks for missing required fields, incomplete configurations, broken connections, and incomplete paths. If something is missing, Automate flags it and prevents you from starting.

  1. Save

If this is a new automation or you have unsaved changes, Automate first prompts you to save. This ensures you do not start an incomplete version.

  1. Confirm and start

You get a confirmation prompt to start the automation. Once you confirm, the automation becomes active and starts running.  This does not mean trades are placed immediately. Trades are placed only if your trigger fires and the workflow reaches a place order action through your conditions.

Save to drafts

You can save your workflow as a draft anytime.

Drafts are for iteration. They let you build, edit, and refine without execution risk. A draft does not run and it does not place trades.

Schedule

Scheduling defines when the automation is allowed to run.

This is how you control availability, for example:

  • Market hours only

  • Specific weekdays

  • A restricted time window

Scheduling does not place trades. It only determines when the automation workflow be active and respond if triggers occur.

Exit conditions

Exit is where most trading discipline breaks. You can have a great entry plan and still lose control because exits become emotional.

Automate is designed so exits can be defined as clearly as entries.

Exit conditions are typically built using:

  • outcome paths from Place order (target hit, stop loss hit)

  • ANY conditions to monitor multiple exit events in parallel

  • portfolio checks to enforce risk limits

  • wait time for timed exits

  • square off actions based on the scope you want

A good exit system answers three questions upfront:

  • What is the profit-taking rule?

  • What is the loss rule?

  • What is the time rule?

Once that is defined, your exit is defined and up.

Example: Bull Put Spread on NIFTY (Range Breakout)

Let’s build a simple automation workflow to set up a Bull Put Spread on a NIFTY breakout.

Step 1: Create the trigger

First, set a schedule that runs daily at 9:00 AM. This makes sure the workflow is active and ready before the setup window begins.

Next, add a Range Breakout trigger that monitors the NIFTY range between 9:30 AM and 10:00 AM.

Configure it to:

  • watch for an upside breakout

  • use a 5-minute timeframe

  • (if applicable) wait for confirmation based on how you want to define the breakout

At this point, the workflow will stay idle and only wake up when the breakout condition is met.

Step 2: Define the actions

Once the trigger fires, the workflow moves into the action blocks for the spread:

  1. Buy an Out of the Money (OTM4) put option

  2. Check that the order is executed before proceeding to the second leg

  3. Sell an At the Money (OTM1) put option

  4. Add portfolio checks to define target (5000) and stop-loss (-2000)

That’s it. The worklow is ready.

Start the workflow

Click Start to run the workflow.

From this point, the workflow waits for the trigger and executes the steps exactly as defined. You can track the automation, its current status, and its history from your dashboard.

The video below shows the full workflow being built step by step on the Automate canvas.

For a thorough deep dive on automate, refer to this section.

Try now!

Most traders already know what they want to do. The gap is doing it the same way every time.

Automate forces clarity. You define what matters, when to act, and when to stop. Once those rules are set, the workflow runs exactly as defined.

Start simple. Go to Automate on FYERS Web. Explore the predefined ones. Build from there.

Currently, Automate is only available on Web.

Let us know what do you think in the comments below.

18
58 replies