ninjatrader/strategies/trin/README.md

2.4 KiB

TRIN

This strategy was taken from chapter 12 of Short Term Trading Strategies That Work (2008) by Larry Connors.

It is based on the short-term trading index (TRIN), also known as the Arms index.

The formula for calculating the TRIN of an index is as follows:

TRIN = (Advancing Stocks / Declining Stocks) / (Advancing Volume / Declining Volume)

Typically, a TRIN reading below 1 corresponds to rising prices whereas a reading above 1 corresponds to declining prices.

Rules

  1. The asset (e.g., SPY) is above its 200-day moving average.
  2. The 2-period RSI is below 50.
  3. If TRIN closes above 1 for 3 consecutive days, enter a long trade.
  4. Exit the trade when the 2-period RSI is above 65.

Parameters

Long-Term Trend Period: The period of the long-term trend as measured using a simple moving average. (Default: 200)

RSI Period: The period used in the RSI calculation. (Default: 2)

RSI Smoothing: The smoothing used in the RSI calculation. (Default: 1, no smoothing)

RSI Entry Threshold: The RSI value below which trades are allowed to be entered. (Default: 50)

RSI Exit Threshold: The RSI value above which trades are exited. (Default: 65)

TRIN Entry Threshold: The TRIN value above which trades are allowed to be entered. (Default: 1.0)

Days Above Threshold: The number of days in a row that the TRIN must be above the entry threshold in order to enter a trade. (Default: 3)

Backtest Results

SPY

SPY Analysis

SPY Summary

QQQ

QQQ Analysis

QQQ Summary

DIA

DIA Analysis

DIA Summary

XLE

XLE Analysis

XLE Summary

XLF

XLF Analysis

XLF Summary