LastBattle

[STRATEGY] Follow the Janet Yellen

In the era of central bank's helicopter money, the market will always be skyrocketing up and up given enough time.

What's the strategy to profit from indices?
Only short the market when its in a state of euphoria /irrational exuberance bubble, or sell when it is confirmed (20% drawdown). Otherwise, you really have no reason not to long at every chance.

Conclusion:
Follow the printing press like a sheep.

Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//@version=2
strategy("Follow the Janet Yellen", overlay=true)

// Input
close_price = close[0]
len = input(defval=100, minval=1, title="Linear Regression length")

linear_reg = linreg(close_price, len, 0)
linear_reg_prev = linreg(close[1], len, 0)
slope = ((linear_reg - linear_reg_prev) / interval)

plotarrow(slope, colorup=teal, colordown=orange, transp=40)
plot(linear_reg, color = red, title = "Linear Regression Curve", style = line, linewidth = 2)

if (slope < -10)
    strategy.entry("Short", strategy.short)
if (slope > 75)
    strategy.entry("Madness", strategy.short)
if (slope > 5 and slope < 20) 
    strategy.entry("Long", strategy.long)