Samples

This page list the sample Algo strategies along with their source code links on GitHub

We have put together a comprehensive list of sample algo strategies using Technical Indicators, Price Action, Candlestick Patterns and a few using Machine Learning techniques. You can explore these on our GitHub repos.

Sample Strategy Details

Golden Crossover

This strategy sample uses EMA (Exponential Moving Average) with short and long time periods to make entry. This is based on 1 Minute candles.

Reference: Golden Crossover

Entry Condition
The stock is BOUGHT when the EMA 50 candles cross above EMA 200 candles.

Exit Condition
The stock is SOLD (for profit) when the current stock price raises above 0.5% of the entry price.

Stop Loss
The stock is SOLD (for loss) when the current stock price falls below 0.5% of the entry price.

Support Resistance

This strategy sample uses Support and Resistance levels to make entry. This is based on 1 Minute candles.

Reference: Support Resistance

Entry Condition
The stock is BOUGHT when the stock price touches below the support value and then moves above the support value, and is below the half the distance to the resistance value from the current price.

Exit Condition
The stock is SOLD (for profit) when the current stock price raises above 0.25% of the entry price.

Stop Loss
The stock is SOLD (for loss) when the current stock price falls below 0.25% of the entry price.

Trend Reversal

This strategy sample uses reversal of an ongoing Trend to make entry. This is based on 1 Minute candles. We track the long trend with 60 candles and short trend with 10 candles.

Reference: Reversal

Entry Condition
The stock is BOUGHT when the long direction was strongly DOWN and the short direction just started moving UP.

Exit Condition
The stock is SOLD (for profit) when the current stock price raises above 0.25% of the entry price.

Stop Loss
The stock is SOLD (for loss) when the current stock price falls below 0.5% of the entry price.

RSI (Relative Strength Index)

This strategy sample uses RSI to make entry. This is based on 5 Minute candles. Max of one entry happens per day in this strategy. After the trade is done (BUY & SELL), the strategy waits for the next day tick to come in before trying for another entry. This strategy also demonstrates how to clear candles accumulated in your indicator evaluator, so that further evaluation can start fresh.

Reference: Relative Strength Index

Entry Condition
The stock is BOUGHT when the RSI value crosses below a value of 30, which indicates an oversold condition of the stock.

Exit Condition
The stock is SOLD (for profit) when the current stock price raises above 0.25% of the entry price.

Stop Loss
The stock is SOLD (for loss) when the current stock price falls below 0.25% of the entry price.

Gap Up

This strategy sample uses Gap Up condition to make entry. This is based on 1 Day candles. Max of one entry happens per day in this strategy. After the trade is done (BUY & SELL), the strategy waits for the next day tick to come in before trying for another entry. This strategy also demonstrates how to SHORT the stock in Algorum. Shorting is pretty straight forward. It involves selling a stock when you are not holding it, at a higher price and then buying it back when the price of the stock is low.

Reference: Gap Trading

Entry Condition
The stock is SOLD (Short) when the today's open price is higher than or equal to yesterday's high price,
AND if the today's open price is at-least X percentage greater than yesterday's close price.

Exit Condition
The stock is BOUGHT back (for profit) when the current stock price falls below 0.25% of the entry price.

Stop Loss
The stock is BOUGHT back (for loss) when the current stock price raises above 0.25% of the entry price.