Creating a strategy¶
Using Streak’s intuitive interface and elegant design, creating a strategy is as simple as typing out technical indicators, keying in stop loss and target profit percentage and selecting the stocks you want to trade with.
Streak platform supports more than 80 technical indicators including Supertrend, MACD, RSI, Momentum indicator, Moving Average etc.
Scrip/Instrument Select the stock, commodity. stock or currency futures from NSE. You can add upto a maximum of 20 instruments or you can also select custom built baskets.
- 1 minute runs checks for signals on min candles with a maximum allowed window of 30 days
- 3 minute to 30 minutes checks for signals respective candles based on data availability with a maximum allowed window of 90 days.
- 1 hour candle checks for signals on an hourly candle with a maximum allowed window of 1 year based on data availability.
- 1 day candle checks for signals on a day candle with a maximum allowed window of 5 years based on data availability.
Position allows users to define the entry type (i.e. buy/sell).
Quantity states the number of equity share or future lots to be used by the strategy.
SBIN, SBIN19SEPFUT Timeframe:
In the above example, the platform will consider the quantity for SBIN as 1 and quantity for SBIN19SEPFUT as 1 lot, i.e. 3000 stocks.
Indicator Each condition in a trading strategy has 3 parts:
- Indicator1 - Technical indicator such as RSI, MOM, Supertrend etc.
- Comparator - A logical comparator such as higher than, lower than etc.
- Indicator2 - Something to compare Indicator1 with, a value such as number, OHLCV etc.
Stop loss & Target profit percentage: For any rules based trading system it is mandatory to enter stop loss and target profit percentage as a part of creating a strategy. It is very important that traders plan their entry/exit and risk before entering a trade so as to better manage their risk.
Advanced section (Optional) There are 4 advanced options available to users:
- Chart type: You can change the chart type here. You can use Heikin-Ashi, Candlestick or Renko charting.
- Order type: You can change order type from MIS(Intraday) to CNC/NRML(Delivery). This will change the backtest results as well.
- Entry start and stop time can also be customized as per requirements, by default it is set from 9:00 AM to 11:30 PM
Given trade time is only inclusive of candle close time. Example If trade entry time is given between 11:15 AM to 03:00 PM and for a 15 minute candle interval. Then for 11:00 AM candle since it closes at 11:15 AM and meets the entry condition, the trade will be executed. Similarly, for 03:00 PM candle, the close time is 03:15 PM, even if it meets the condition but since the trade time given was only till 03:00 PM trading signal will not be generated.
- Strategy name: You need to set a unique name to the strategy and click on BACKTEST. Strategy name once saved, cannot be changed. To change the name of an existing strategy, you need to copy the strategy and save with a different name while deleting the source strategy.
Backtest is run keeping intraday orders (MIS) as default. You can change it to CNC/NRML from the advanced section.
- Add scrips of your choice like INFY
- Select candle interval as 30 minutes
- Set a position as Buy
- Enter quantity as 100
- In the Technical indicator field type RSI and you get a drop down that consists of RSI and select it (leave the default value)
- After selecting the Technical indicator, we know that if RSI is below 30, then it is in oversold territory. And you would want to buy the stock when RSI crosses above 30, so select crosses above in the comparator field
- Now in second indicator field select Number and enter 30
- For Exit condition (Optional): RSI Crosses below 70 you can exit the condition
- Enter Stop loss as 0.5% and Target profit as 1%
- Give this algo a unique name and run Backtest
Streak has made it simple for you, usually the process of coding a similar strategy on traditional platforms would have taken about 2 hours depending on your coding skills and data availability.
- Add sample basket Bank Nifty - Sample Basket
- Choose time frame as 10 mins
- Select your position Buy
- Enter quantity as 1
- In technical indicator field search of supertrend and select the Supertrend indicator from dropdown and click ok with default values as it is.
- Choose crosses below in comparator field
- Now in second indicator field Select Close
- Add the Stop Loss and Target Profit % of 0.5 and 1 respectively.
- Give this strategy a unique name and run Backtest
Points to remember¶
- The advanced feature allows you to select different charts types.
- You can add upto a maximum of 10 entry and exit conditions (for Ultimate plan).
- You can select different timeframe to enter a stock in the advanced section.
- The limit of every basket is 20 and you can create strategy for upto 20 stocks in one go.
- The backtest limit per day for basic plan is 200 and you get 25 live deployments at any given time. For the Ultimate plan, you can backtest upto 1000 times and deploy 100 strategies at a point of time
More on Create¶
Entry condition forms a logical point to generate an entry signal to take a position. An entry condition can be comprised of one or more individual conditions which must be logically "true" to generate a signal. An individual condition is created by comparing one value/parameter/indicator with another value/parameter/indicator.
20 SMA higher than 10 SMAHere, the condition will be logically true when the value of '20 SMA' is more than the value of '10 SMA'.
The generation of a trading signal is determined by the logical combination of the conditions being true for the current candle and it being false in previous candle.
With At price indicator no other entry condition is allowed
Combining conditions (with "AND"/"OR")¶
When a trading strategy has multiple conditions, these conditions are combined together using "AND"/"OR" to collectively form a single strategy with a single entry/exit point event. The output of the combination of entry/exit conditions is based on digital logic operations.
Strategy logic is calculated in the order specified by the user with "AND" having higher preference over "OR".
- logic1 AND logic2 OR logic3 AND logic4 will be calculated as (logic1 AND logic2) OR (logic3 AND logic4)
- logic1 OR logic2 AND logic3 will be calculated as logic1 OR (logic2 AND logic3)
Exit condition defines the point at which a position can be exited. An exit signal similar to the entry signal and is optional. After the strategy enters a position, the target stop loss price and the target take profit is calculated on the average of the entry price.
1. During a backtest, if the close price crosses either of the exit price points (SL,TP) in the current candle, an exit is triggered. However, exit signal is met, the hypothetical exit order is placed on the open price of the next candle.
2. After deployment, for live strategies, if the strategy has entered a position in the market and the LTP (last traded price) crosses either of the exit prices point(TP SL) or the exit signal is met, an actionable alert is sent to the user on which they can click "buy/sell" to place a market order in the exchange.