Skip to content
All library documents

Least-Squares Forecast Signals with a Karobein Filter and Trailing Stops

Article TradingView scripts

Summary

This strategy builds a signal from ordinary least squares applied to a selected price series and a generated auxiliary series, then passes the result through a Karobein oscillator filter. Changes in the filtered prediction define long and short conditions. The script can place strategy entries, optionally attach trailing stops, and restrict trades to a chosen backtest start date. A repainting option controls whether the higher-timeframe request uses the current or prior price input.

The author says it was tested on five-minute EURUSD data and advises adjusting settings for other timeframes, lookbacks, and securities. No performance statistics or validation details are included in the supplied text. Although the description says the indicator does not repaint, the default repaint option is enabled and the higher-timeframe request uses lookahead, so users should examine signal timing and backtest assumptions carefully. The generated regression input also makes the forecasting interpretation difficult to assess from the document alone.

Key ideas

  • The signal applies rolling OLS to price and a generated auxiliary series, then filters the output with a Karobein oscillator.
  • Long and short entries are triggered by turns in the filtered prediction.
  • The strategy offers optional trailing exits and a configurable backtest start date.
  • The script was reported as tested on five-minute EURUSD, with settings expected to vary by market and timeframe.
  • The repaint option and lookahead behavior warrant careful review before interpreting backtest signals.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.