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 אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

כתב ויתור