Skip to content

Create

Creating an algo

Using Streak’s intuitive interface and elegant design, creating an algo 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 70 technical indicators including Supertrend, MACD, RSI, Momentum indicator, Moving Average etc.

Creating Algo

Parameters required

  • Scrip/Instrument Select the stocks, ETFs or Crypto pairs(view the full list of supported cryptocurrencies and exchanges here). Example, BTC/USD COINBASE, BTC/USDT BINANCE, ETC/BTC OKEX, ETH/USDT POLONIEX, ETH/USDT HITBTC, LTC/EUR COINBASE. You can add up to a maximum of 20 instruments or you can also select custom-built baskets.

  • Candle Interval

    1. 1 minute checks for signals respective candles based on data availability with maximum allowed window of 30 days.
    2. 3 minute to 30 minutes checks for signals respective candles based on data availability with maximum allowed window of 90 days.
    3. 1 hour candle checks for signals on an hourly candle with maximum allowed window of 1 year based on data availability.
    4. 1 day candle checks for signals on a day candle with 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 quantity to be used by the algo.

  • Indicator Each condition in a trading algo 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.
  • 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 an algo. It is very important that traders plan their entry/exit and risk before entering a trade 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 or Candlestick charting.
    • Entry start and stop time can also be customized as per requirements, by default it is set from 00:00 AM to 23:59 PM UTC

Important

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.

Advanced

  • Algo name: You need to set a unique name to the algo and click on BACKTEST. Algo name once saved, cannot be changed. To change the name of an existing algo, you need to copy the algo and save it with a different name while deleting the source algo.

Info

Backtest is run keeping intraday orders (MIS) as default. You can change it to CNC/NRML from the advanced section.

Examples

RSI indicator

  1. Add scrips of your choice like AAPL
  2. Select candle interval as 30 minutes
  3. Set a position as Buy
  4. Enter quantity as 100
  5. In the Technical indicator field, type RSI and you get a drop down menu that consists of RSI and select it (leave the default value)
    1. 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
    2. Now in second indicator field select Number and enter 30
  6. For Exit condition (Optional): RSI Crosses below 70 you can exit the condition
  7. Enter Stop loss as 0.5% and Target profit as 1%
  8. Give this algo a unique name and run Backtest

Note

Streak has made it simple for you, usually, the process of coding a similar algo on traditional platforms would have taken about 2 hours depending on your coding skills and data availability.

RSI example

Supertrend

  1. Add sample basket LTC Basket
  2. Choose timeframe as 10 mins
  3. Select your position Buy
  4. Enter quantity as 1
  5. In technical indicator field search of Supertrend and select the Supertrend indicator from dropdown and click ok with default values as it is.
    1. Choose crosses below in comparator field
    2. Now in second indicator field Select Close
  6. Add the Stop Loss and Target Profit % of 0.5 and 1 respectively.
  7. Give this algo an unique name and run Backtest

Supertrend example

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 an algo 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 algos at a point of time

More on Create

Entry condition

Entry condition forms a logical point to generate an entry signal to take a position. An entry condition can 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.

Example

20 SMA higher than 10 SMA
Here, 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.

Combining conditions (with "AND"/"OR")

When a trading algo has multiple conditions, these conditions are combined together using "AND"/"OR" to collectively form a single algo with a single entry/exit point event. The output of the combination of entry/exit conditions is based on digital logic operations.
Algo logic is calculated in the order specified by the user with "AND" having higher preference over "OR".

Note

  1. logic1 AND logic2 OR logic3 AND logic4 will be calculated as (logic1 AND logic2) OR (logic3 AND logic4)
  2. logic1 OR logic2 AND logic3 will be calculated as logic1 OR (logic2 AND logic3)

Exit condition

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 algo 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 algos, if the algo 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.