OPEN-SOURCE SCRIPT

MACandles-LinearRegression-Strategy

已更新
This is combination of multiple indicators and strategies. Mainly useful for indexes and to time the entry and exits of indexes. No stoploss used - makes it less desirable for leveraged trades or trading individual stocks.

Let us rewind and look back at some of the indicators/strategies published earlier.

1. Moving Average Candles - this is one of my favourite tool for general trend filtering. Applying supertrend on moving average candles is one of the easiest ways to find reversal in trending market without exiting positions too early. Few scripts published on this basis are:

MA Candles Supertrend
MA Candles Supertrend Strategy

2. VixFix and Linear Regression - this itself is combination of two indicators.

Williams-Vix-Fix-Finds-Market-Bottoms - by @ChrisMoody
Squeeze-Momentum-Indicator - by @LazyBear

I have combined these two indicators to derive VIX-Fix linear regression to find absolute market bottoms. More description here:
VixFixLinReg-Strategy
VixFixLinReg-Indicator

Now, in this strategy, we combine all these together.

  • Derive moving average candles
  • Derive momentum of moving average candles
  • Derive Linear regression on momentum
  • Optionally, also calculate VIX Fix and Linear regression on VixFix momentum


To find market bottom:

There are two options
1. Use when momentum of MA candles hit bottom (red) and slowly turn up (orange). In aggressiveLong mode, signals are also generated when momentum starts going positive from negative.
2. Use Vix Fix linear regression of MA candles as described in the original script of VixFixLinReg-Strategy

To find market top

Here only Ma candles momentum decreasing is used as signal. If looking for longTrades, exit signal is generated only when momentum is turning negative extreme(orange). Or else, exit signal is generated when momentum has turned neutral.

At this stage, it is very much experimental - use it with caution :)
版本注释
Convert to pine5
Linear RegressionmarketbottommarkettimingmarkettopsMoving AveragesVolatility

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明