Free trial
Menu
Tutorial

Configure Entry and Exit Rules in QuantPower

This tutorial sets the entry and exit rules for an indicator strategy in the QuantPower strategy builder, using an EMA crossover on Nifty futures as the example. It covers conditions, the order, each exit type and how to check the rules before testing.

QuantPower Research · Updated 3 Nov 2026 · 3 min read

Before you start

  • A Professional or Ultimate plan with the strategy builder. See pricing.
  • Your rules written down in plain words. If you cannot write a rule as a sentence, it is not ready to automate. The no-code strategy design guide helps.

The rules in this tutorial

Buy one lot of Nifty futures when the 9-period EMA crosses above the 21-period EMA on a closed 15-minute candle, the close is above VWAP and the time is between 09:30 and 14:30. Exit at a 0.6% stop loss, a 1.2% target, an opposite crossover or 15:15.

This is a hypothetical example to show the settings, not a recommendation.

Entry conditions, order settings and exit rules for an EMA crossover strategy on Nifty futures.Entry conditions, order settings and exit rules for an EMA crossover strategy on Nifty futures.
Entry conditions, order settings and exit rules for an EMA crossover strategy on Nifty futures.

Step 1: Choose the instrument and candles

  1. Open Strategy builder and start a new strategy, or open one you saved.
  2. Choose the instrument: NIFTY OCT FUT in this example.
  3. Choose the candle interval: 15 minutes.
  4. Choose when conditions are checked: on candle close.

Checking on the close means a signal cannot appear and then vanish within the same candle. It also matches how a backtest reads the data, so live results stay closer to the test.

Step 2: Add the entry conditions

  1. Add the first condition: EMA (9), crosses above, EMA (21).
  2. Add a second: Close, is above, VWAP.
  3. Add a third: Time, is between, 09:30 – 14:30.

All conditions must be true at the same time for an entry. Each extra condition makes entries rarer. If a backtest shows very few trades, a condition is probably too strict.

Condition typeExampleUse it for
CrossoverEMA 9 crosses above EMA 21Trend changes
LevelRSI (14) below 30Overbought or oversold readings
Price against an indicatorClose above VWAPFiltering trades by trend
Time window09:30 to 14:30Avoiding the open and the close

Our guide to technical indicators explains each indicator.

Step 3: Set the order

SettingExampleNotes
SideBuyA second rule set can handle sells
Quantity1 lot (65)Set in lots
Order typeLimitControls the price you pay
ProductMISIntraday. Positions must close the same day

Some brokers do not accept market orders in every contract. A limit order priced near the best bid or ask avoids that rejection.

Step 4: Set the exits

ExitExampleWhen it acts
Stop loss0.6% below entryThe price falls to the stop
Target1.2% above entryThe price reaches the target
Trailing stopMove the stop to entry at +0.6%Protects an open profit
Exit signalEMA (9) crosses below EMA (21)The trend condition reverses
Time exit15:15The session is about to close
Re-entryOffStops a second trade after an exit

Whichever exit comes first closes the trade. Keep the stop and target far enough apart to cover costs: on a ₹25,000 Nifty future, 0.6% is 150 points, or ₹9,750 a lot, which leaves room for brokerage and taxes. Our trailing stop-loss guide explains how trailing stops behave in fast markets.

Step 5: Read the summary

The builder repeats the rules in plain words. Read it as if someone else wrote it. If the summary says something you did not intend, such as an entry without a time limit, fix the rule now.

Step 6: Save and test

Save the strategy and run a backtest. Then check a few trades by hand against the chart to confirm each entry and exit happened where the rules say.

Common problems

ProblemLikely causeWhat to do
No trades in the backtestConditions are too strictRemove one condition and test again
Too many tradesNo time window or trend filterAdd a time window or a trend condition
Many small lossesStop and target too tight for costsWiden them, or test a longer candle interval
Exits seem earlyA time exit or exit signal fired firstCheck which exit closed each trade in the trade list

Next steps

Frequently asked questions

Can I use TradingView alerts instead of builder conditions?

Yes. Signal trading can place orders from TradingView webhook alerts.

Can one strategy both buy and sell?

Set the long and short rules as separate rule sets, so each has its own entry and exits.

Why should rules act on closed candles?

An indicator can cross and uncross within a candle. Acting on the close avoids trades on signals that disappear.

Screens in this tutorial are illustrations with sample data. Labels in the app may differ slightly.
Trading involves substantial risk. Examples on this page are hypothetical and are not investment advice.