How to code this in Streak Zerodha

Hi there,

Please help me to code this in the streak platform.

I want to scan for:

MACD(12,26,9) crosses bullish within the previous 15 days for the daily candles.
or in another word: MACD line crosses above the signal line within the previous 15 days for daily candles.

@Streak Can you.

1 Like

Hi @Zodiac,

You can create this query where you will get an alert when MACD gave a buy/bullish indication. However, the day parameter will not be possible using a short query.

If you want to do this, you have to create a condition for each day on a daily timeframe. The following example shows how you can check for a bullish cross within 8 days

MACD (12, 26, 9, macd, 0) crosses above MACD (12, 26, 9, signal, 0) or MACD (12, 26, 9, macd, 1) crosses above MACD (12, 26, 9, signal, 1) or MACD (12, 26, 9, macd, 2) crosses above MACD (12, 26, 9, signal, 2) or MACD (12, 26, 9, macd, 3) crosses above MACD (12, 26, 9, signal, 3) or MACD (12, 26, 9, macd, 4) crosses above MACD (12, 26, 9, signal, 4) or MACD (12, 26, 9, macd, 5) crosses above MACD (12, 26, 9, signal, 5) or MACD (12, 26, 9, macd, 6) crosses above MACD (12, 26, 9, signal, 6) or MACD (12, 26, 9, macd, 7) crosses above MACD (12, 26, 9, signal, 7) or MACD (12, 26, 9, macd, 8) crosses above MACD (12, 26, 9, signal, 8)

Hope this helps.

Thanks @Krishnendu for explaining.

Problem solved.:+1::+1::+1: