# The condition is not working as expected

**URL:** https://tradingqna.com/t/the-condition-is-not-working-as-expected/198327
**Category:** Streak - backtesting
**Created:** [September 22, 2026, 1:06pm UTC](https://tradingqna.com/t/the-condition-is-not-working-as-expected/198327 "2026-09-22T13:06:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vinay\_kumar](https://tradingqna.com/user_avatar/tradingqna.com/vinay_kumar/32/84386_2.png) [@vinay\_kumar](https://tradingqna.com/u/vinay_kumar)
#### Post date: [September 22, 2026, 1:06pm UTC](https://tradingqna.com/t/the-condition-is-not-working-as-expected/198327/1 "2026-09-22T13:06:41Z")

</div>

Hello,

I am trying to create a condtion as below but its not returning any data even though there are few stocks

meet the below condition . not sure what is incorrect here.

 ![image](https://tradingqna.com/uploads/default/original/3X/9/2/9245ea49d31cf6764d6c46a6000647c2e2837f52.png)

---

<div class="post-metadata">

### Author: ![Abhijit](https://tradingqna.com/user_avatar/tradingqna.com/abhijit/32/59569_2.png) [@Abhijit](https://tradingqna.com/u/Abhijit)
#### Post date: [September 22, 2026, 1:22pm UTC](https://tradingqna.com/t/the-condition-is-not-working-as-expected/198327/2 "2026-09-22T13:22:08Z")

</div>

Your query is **stock’s daily close is above its 200-day EMA AND today’s first 15-minute candle was green.**

You’re currently scanning only **NFO stocks (F&O stocks)**. The query itself looks correct, but it appears that no NFO stock satisfies both conditions.

Please try the same query on the **Nifty 500** universe and check whether it returns any results.

---

<div class="post-metadata">

### Author: ![Streak](https://tradingqna.com/user_avatar/tradingqna.com/streak/32/89355_2.png) [@Streak](https://tradingqna.com/u/Streak)
#### Post date: [September 22, 2026, 2:13pm UTC](https://tradingqna.com/t/the-condition-is-not-working-as-expected/198327/3 "2026-09-22T14:13:01Z")

</div>

@vinay_kumar Please note that for the 15-minute timeframe, the supported lookback period is limited to 3 months of data. Since a 200 EMA on the 1-day timeframe requires more historical data than what is available within this period, the indicator cannot be calculated, and consequently, no stocks are returned in the scanner.

As a workaround, you can try changing the EMA period to 50 and check the scanner results.
