# In-depth

Scanner is basically a filter, which allows users to list all stocks among Nifty 50, 100 or 500 stocks, that matches user's conditions. This has been built to solve one of traders' dilemma - Stock selection. With scanner, all you need to do is type in your conditions and select the group (Nifty 50, Energy, Healthcare, Real Estate), you want to scan, provide a name for the scan and then click on Scan And Save.

Scan on: Scanner supports Nifty 50, 100 500, Indices, Equity Futures, Bank Nifty and Nifty Options, MCX and CDS market. You can also scan on specific sectors or on a customised watchlist.

Time frame: The candle timeframe on which you want to run your scan.

Chart type: Scanner supports Candlestick and Heikin Ashi chart.

## Conditions¶

Suppose you want to see which stocks have high volume (more than 10,00,000). You can easily see a list within a few seconds. Scanner lets you create simple to complex conditions and use them on all the 50, 100 or 500 stocks, all commodities and currency instruments.

Let us go through all the points here to understand how you can take advantage of scanner to improve your trade.

Important Note

Every condition has 3 parts:

1. Indicator1 - Technical indicator such as RSI, MOM, Supertrend etc.
2. Comparator - A logical comparator such as higher than, lower than etc.
3. Indicator2 - Something to compare Indicator1 with, a value such as number, OHLCV etc.

#### Indicators¶

You can use most of the supported indicators in Streak on all scrips to check whether it is giving a buy/sell signal.

offset: Every indicator has an offset value, this is helpful to point to any historical candle. Previous close price can be denoted by either Previous Close or Close(-1) or Prev N (Close,-1). -1 is the offset value. Similarly for 2nd last candle, the offset value is -2. Current candle's offset value is 0.

Example

You want to see all the scrips for which SuperTrend is giving a buy.
Supertrend gives a buy signal when the stock is trading above the Supertrend. To check this you just need to tell the scanner, list all stocks where Close is higher than Supertrend.

Condition: Close(0) higher than SuperTrend(7,3)

As you can see you can get a list of all stocks, where Supertrend is giving a buy in less than a minute. You can also sort the list by Volume, %change from previous day close, LTP, Sector and Name.

#### Comparator¶

Scanner supports the following comparators:

1. up by/down by
2. crosses above/crosses below
3. lower than equal to/higher than equal to
4. lower than/higher than/equal to

#### Math operator¶

You can also use math operators to add, subtract divide and multiply values. Math operators are usefull for creating complex conditions. How is helpfull?

Let's understand this with an example

Example

Suppose you want to see a list of stocks with a rising RSI. But you don't know by what percentage the RSI should rise. Now, how do we create this condition in scanner?

Ok, first lets consider a stock moving in a straight line. For the above stock, what is the difference between the price on September 3rd and September 2nd? The answer is 0. So, if I were to create a condition in Scanner to look for the movement like in the above chart, I would put in the below mentioned condition: Close(0) - Close(-1) equal to 0

Again, lets consider a stock, whose price is rising gradually. For the above stock, there is a price difference between the candles. The difference between the price on September 3rd and September 2nd = INR 10 and the difference between the price on September 4th and September 3rd = INR 10. So, if we calculate the difference between all the candle it is going to give a positive number( i.e. higher than 0). So, if I were to create a condition in Scanner to look for the movement like in the above chart, I would put in the below mentioned condition: Close(0) - Close(-1) higher than 0

Now, we are going to use the same logic for rising RSI, we are going to take the help of indicator offset and math operator to do this. An uptrending RSI can denoted by positive difference.
Condition:
RSI(14,0) - RSI(14,-1) higher than 0 and
RSI (14,-1) - RSI (14,-2) higher than 0 and
RSI(14,-2) - RSI(14,-3) higher than 0

The above expression calculating the difference between current candle RSI1 and previous candle RSI and checking whether this is higher than 0. We can feed this into the scanner to get a list of stocks with rising momentum.

#### Math Functions¶

You can also perform mathematical operations with ease in scanner.

Period Min: The period min function returns the item with the lowest value within stated period. This function takes in two arguments, one is the period and the other is a variable that users want to compare Period min(Period, Variable). It scans through all the values mentioned for the period mentioned and returns the minimum value.

Example

Scan on:Nifty 100 Time frame:1 day
Conditions: Close(0) lower than Period Min(5, Low(-1))

The above query would return a list of stocks within Nifty 100, whose current candle close price1 is lower than lowest low price of the past five days.

Example

In this example we are going to take the rising RSI example and simplify our conditions using Period min function.
Condition: Period Min (3,RSI(14,0) - RSI(14,-1)) higher than 0
The above condition is going to check for the same condition as in the RSI example, but we just write one line instead of 3 lines.

Period Max: The period max function returns the item with the highest value within stated period. This function takes in two arguments, one is the period and the other is a variable that users want to compare Period max(Period, Variable). It scans through all the values mentioned for the period mentioned and returns the maximum value.

Example

Scan on:Nifty 100 Time frame:1 day
Conditions: Close(0) higher than Period Max(5, high(-1))

The above query would return a list of stocks within Nifty 100, whose current candle close price1 is higher than the highest high price of the past five days.

Min: The min() function compares two variables and returns the item with the lowest value. This function takes in two variable arguments, that users want to compare Min(Variable, Variable). This is different from Period min as this consider two variables instead of one. The min function is especially helpfull when you want to compare two independent conditions.

Example

Scan on:Nifty 100 Time frame:1 day
Conditions: Close(0) lower than Min(SMA(Low,20,0), Low(-1))

The above query would first calculate previous 20 period's simple moving average(low price) and previous candle's low price and check which variable has the lowest value among them. Then the scanner will check if the current close price1 of all Nifty 100 stocks is lower than the lowest of the two variables.

Max: The max() function compares two variables and returns the item with the highest value. This function takes in two variable arguments, that users want to compare Max(Variable, Variable). This is different from Period max as this consider two variables instead of one. The max function is especially helpfull when you want to compare two independent conditions.

Example

Scan on:Nifty 100 Time frame:1 day
Conditions: Close(0) higher than Max(SMA(High,20,0), High(-1))

The above query would first calculate previous 20 period's simple moving average(high price) and previous candle's high price and check which variable has the highest value among them. Then the scanner will check if the current close price1 of all Nifty 100 stocks is higher than the highest of the two variables.

Multi Timeframe: The multi timeframe() function allows users to perform multi timeframe analysis i.e check conditions for two different timeframes in a single query.

Note

MTF calculates value of larger timeframe indicator values on partial candles (since the larger timeframe candle takes more time to form). When MTF is used for scanning, live alerts may not always be verifiable with charts. This is because it is not possible to validate partial OHLC values and indicator on charts.

Example

Suppose, you want to create a query where you want to create a strategy and take an entry when the stock is
a. trading above 10 EMA on a daily timeframe, and
b. hourly RSI is above 50, and
c. MACD is giving a buy signal in 5 min timeframe

You will be able to do this with just 3 lines now...

Time frame:5 min
Conditions:Close (0) higher thanMulti timeframe(day, EMA(Close,10,0)) and
Multi timeframe(hour, RSI(14,0))higher than 50 and
MACD (12,26,9,macd,0)higher than MACD (12,26,9,signal,0)

How does multi timeframe looks like without Streak?

Abs: The abs() function is similar to mod function and is used to return the absolute value of a number. abs(-6) and abs(6), both would return the absolute value of 6.

Example

Suppose, you want to create a condition to filter out stocks in which there is a sudden change price level in a short timeframe(current candle). To do this you want to calculate the difference in open and close price of the same candle and then check if the range is more than a specified level. In the below mnetioned example, the specified level is the period days's Open - Close range.

Scan on:Nifty 100 Time frame:5 min
Conditions: abs(Open(0) - Close(0)) higher than abs(Prev N(Open,-1,day) - Prev N(Close,-1,day))

The above query would calculate difference between current candle's1 (Open - Close) and previous day's (Open - Close) and check if current candle's open close range is higher than previous whole day's open close range for all 100 stocks.

But I was unable to understand, why did you use abs() function?

Because abs function always returns a value and ignores whether it is positive or negative. In case of a green candle (Open - Close) would be negetive but for a red candle (Open - Close) would be positive. So, the above scan will show result whenever there is a big price move irrespective of trend (Up or Down).

Ceil: The ceil() function approximates the given number to the smallest integer, greater than or equal to the given float value. This function is helpful when creating conditions that involve calculation of value and you are unsure about the result. This function rounds up the value to the nearest largest integer. Ceil(5.678) would be rounded up to 6.

Floor: The floor () function returns the largest integer less than or equal to the given number. Similar to Ceil function, this function lets you round off the value to the nearest largest integer. Floor(5.678) would be rounded off to 5.

#### Brackets¶

Brackets are used to denote and group sub-expression. Bracket follow BODMAS rules.

### Scan Results¶

After you run a query in scanner, you will a get a list of instruments that matches your condition. The list can be sorted based on Volume, %change from previous day close, LTP, Sector and Name.

You can place orders directly from the list . You just need to hover on the instrument, you want to buy/sell and you will get 3 options.

: This button opens a Buy order window and lets user place order directly.

Sell

: This button opens a Sell order window and lets user place order directly.

: You can open Streak technicals window directly from the scanner result and quickly get a technical view on an instrument.

: By clicking on this icon you will be able to open the chart for the respective scrip in a new tab.

Now that you have a list of stocks on which you want to trade on, you can select all the scrips by clicking on checkbox in the left side of the screen. After this, you can click on "Add to Basket" to add in an existing basket or create a custom basket, comprising of the result. Alternatively, you can click on "Create Strategy" to directly import the scrips from the result.

Important

You can only import a maximum of 100 scrips for basket creation and for strategy implementation you can import a maximum of 50 scrips.

## Technicals ¶

Technicals provides a technical overview (bullish/bearish/neutral) of an instrument based on 27 most popular oscillator and moving average indicators. By default, the technical view is based on an hourly time frame, but this can be changed between 1 min to 1 day, for long and short term instantly, based on your style of trading.

You can get detailed information about the specific moving average and oscillator indicators separately by scrolling down. At the bottom you can also see a list of sample strategies. You can further choose a strategy and backtest it on historical data of the instruments.

How is scanner different from Create?

Create allows user to backtest their condition in historical data and get a notification when the strategy condition is met. The create page let users play with TP SL and entry time. Also strategy based on Renko charting in create page however, scanner is just a filter and sends a notification, when your condition is met, if you make the scan live. Also, Streak scanner consider last received price while the create page consider only OHLC candle data.

Can I backtest my scan conditions?

No, Scanner is a like a filter. Suppose, you only want to trade in Nifty 100 stocks which has shown a bullish trend in daily chart and lets assume that you consider all stocks above EMA 50 to be bullish. You cannot monitior all the instruments at once, but a scanner will monitor all the 100 stocks and send a signal when your conditions are met.

Scanner is too complex, I have a condition that I want to check but I am unable to create a scan.

Write the detials of your requirement and send it to support@streak.tech. Our team can help you create the query.

Scanner is giving wrong result. How can I trust the scanner?

Scanner considers last received price while checking condition. This means that the scan condition was true when the scan was run, but might change as the stocks continues its movement. If you want to verify the singal, you need to look at the minute level data and look at the movement from the candle open to the time when the scan was run. The condition was run on that accumulated price action (candle open to scan time).

1. Scanner use last received price for checking conditions unlike Streak create which uses OHLC value of a candle post candle closure. Hence, the scan result is valid at the point of time when scan is run.