#### Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Hello,
I am currently using the below scan to identify Momentum Buy on SMA, MACD and RSI becoming true, it is a very useful scan so far. However, in these bearinsh times I would like to scan for Momentum sells, can anyone please help me with the inverse of the scan for below:
// Scan starts here
[type = stock]
and [
[
[SMA(5,close) x SMA(15,close)] and
[RSI(14) > 50] and
[MACD Line(12,26,9) > MACD Signal(12,26,9)] and
[MACD Line(12,26,9) > 0]
]
or
[
[SMA(5,close) > SMA(15,close)] and
[RSI(14) x 50] and
[MACD Line(12,26,9) > MACD Signal(12,26,9)] and
[MACD Line(12,26,9) > 0]
]
or
[
[SMA(5,close) > SMA(15,close)] and
[RSI(14) > 50] and
[MACD Line(12,26,9) x MACD Signal(12,26,9)] and
[MACD Line(12,26,9) > 0]
]
or
[
[SMA(5,close) > SMA(15,close)] and
[RSI(14) > 50] and
[MACD Line(12,26,9) > MACD Signal(12,26,9)] and
[MACD Line(12,26,9) x 0]
]
]
and [
[favorites list is 26] // Nifty 50
OR
[favorites list is 27] // Nifty Next 50
]

• mod
I think all you have to do is reverse the ">" sign to "<" and for the crossovers ( "x" ), reverse the order of the terms, e.g. instead of "and [MACD Line(12,26,9) x 0]" use "and [0 x MACD Line(12,26,9)]".

Also, your scan will run faster if you put your lists (the Nifty 50s) statement at the TOP of your scan as the first line(s). That way, the scan will look at ONLY the stocks in your lists instead of looking at ALL the several thousand symbols in the scan engine database.
• Thank you Markd I will give it a shot rightaway. Thanks much once again...
• @markd I have made the suggested changes its now picking up the Momentum Sells, However, I would like to request you to please review once:

Changed all > to < and made below changes which I wish to run by you once ...

Especially the changes made in :

a.) SMA with x reversed to pick SMA 15 rising over SMA 5
b.) RSI: 50 x RSI
c.) MACD: [MACD Signal(12,26,9) x MACD Line(12,26,9)

[type = stock] // test
and [
[favorites list is 26] // Nifty 50
OR
[favorites list is 27] // Nifty Next 50
] and
[
[
[SMA(15,close) x SMA(5,close)] and [RSI(14) < 50] and [MACD Line(12,26,9) < MACD Signal(12,26,9)] and [MACD Line(12,26,9) < 0]
]
or
[
[SMA(5,close) < SMA(15,close)] and [50 x RSI(14)] and [MACD Line(12,26,9) < MACD Signal(12,26,9)] and [MACD Line(12,26,9) < 0]
]
or
[
[SMA(5,close) < SMA(15,close)] and [RSI(14) < 50] and [MACD Signal(12,26,9) x MACD Line(12,26,9)] and [MACD Line(12,26,9) < 0]
]
or
[
[SMA(5,close) < SMA(15,close)] and [RSI(14) < 50] and [MACD Line(12,26,9) < MACD Signal(12,26,9)] and [0 x MACD Line(12,26,9)]
]
]
• mod
Looks right in all three cases.
• ✭✭
well done @suryak
• Thank you @markd and @lmkwin