Build Your Own Trading Strategy Without Code in StockYatra

Write a strategy the way you would say it: Buy when this crosses that, exit when this happens. Here is how the rule builder works, with three example builds.

By StockYatra Team
StockYatra no-code strategy builder with entry and exit rules

In short

  • In Pro Chart, open My builds → Build your own strategy.
  • Each rule has three blocks: something, crosses above / crosses below / is above / is below, something else.
  • Join rules with ALL match or ANY match, for long only, short only, or both.
  • Add an optional stop-loss % and target %, then Save & backtest.
Strategy builder with Buy when and Exit when rulesPicking an indicator for a rule
Rules are built from blocks you tap, no typing needed.

How a rule works

Every rule reads like a sentence: EMA 9 crosses above EMA 21. Tap the first or last block to pick price (close, open, high, low), an indicator (EMA, SMA, WMA, Bollinger bands, RSI, MACD, Stochastic, CCI, ADX, ATR, volume) or a fixed number. Tap the middle word to cycle through crosses above, crosses below, is above and is below.

"Crosses" fires only on the bar where it happens. "Is above" stays true for as long as it is true, which is useful as a filter.

Three builds to try

BuildBuy whenExit whenRisk
Trend followerEMA 9 crosses above EMA 21 and Close is above SMA 200EMA 9 crosses below EMA 21Stop 3%
Oversold bounceRSI 14 crosses above 30RSI 14 crosses above 60Stop 2%, target 4%
Band breakoutClose crosses above BB upper 20 and Volume is above Volume SMA 20Close crosses below SMA 20Stop 2.5%
Key idea: A filter like "Close is above SMA 200" removes many bad trades in a falling market. Try a build with and without it and compare the drawdown.

Stops and targets

The stop-loss closes a trade when it falls the chosen percent from entry; the target closes it when it gains the chosen percent. After a stop or target, the build waits for a fresh entry signal before trading again. Leave either blank to switch it off.

If it says "no trades yet"

Your entry rules never matched on these bars. Use ANY match instead of ALL, loosen a number (RSI below 35 instead of 30), or switch to a longer time frame.

Key takeaways

  • Rules read like sentences and are built by tapping.
  • ALL match is strict, ANY match is loose.
  • A trend filter often matters more than the entry.
  • Builds are saved on your phone and backtested with fees.

Summary in Nepali (नेपालीमा सारांश)

Pro Chart को My builds मा कोड नलेखी आफ्नै रणनीति बनाउन सकिन्छ: जस्तै "EMA 9 ले EMA 21 लाई माथि काट्दा किन्ने"। नियमहरू ALL वा ANY ले जोड्नुहोस्, stop-loss र target थप्नुहोस्, अनि Save & backtest थिच्नुहोस्।

Build your first strategy

StockYatra is free on the App Store and Google Play. Already installed? The October update arrives automatically the next time you open the app. You start with 10,000 free virtual coins; prices are simulated and coins are never real money.

Get StockYatra See the changelog

More from the October update

StockYatra is an education app, not a broker or adviser. Prices on its practice market are simulated around each stock's real-world level, coins are virtual, and nothing here is a recommendation to buy or sell any security. Backtests describe the past and do not predict future results.

Frequently asked questions

Do I need to know coding?
No. Every rule is built by tapping blocks. If you want to code, Pro Chart also has a Pine Script editor.
What does "Long & short" do?
The Buy rule opens a long trade and the exit rule flips to a short, so the build is always in the market one way or the other.
Are my builds shared with anyone?
No. They are saved on your phone only.