magarto

magarto indicator

You also need to add a MA30 to the chart and set a timeframe of W on FOREX and others and H4 or D for BTCUSD.
Buy: when MA30 changes from downtrend to uptrend, price is over MA30 and magarto indicator shows a crossover in the top.
Sell: opposite scenario

Update 1: Sorry, for LTCUSD it didn't work. I used the wrong chart when I published it so check it in BTCUSD.
开源脚本

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

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study("magarto indicator",overlay=false)
ma=sma(close,30)
maslope=ma-ma[2]
maslopeB=iff(maslope<0,-1,iff(maslope>0,1,0))

candleOver=iff(ohlc4>ma,1,-1)

xMA = ema(close,13)
DayLow = iff(dayofmonth != dayofmonth[1], low, min(low, nz(DayLow[1])))
bearpower = DayLow - xMA

DayHigh = iff(dayofmonth != dayofmonth[1], high, max(high, nz(DayHigh[1])))
bullpower = DayHigh - xMA

bothElder=iff((bearpower>0 and bullpower>0),1,iff((bearpower<0 and bullpower<0),-1,0))

all4=maslopeB+candleOver+bothElder
plot(all4)
hline(3)
hline(-3)
buy = all4 == -3 ? all4 : na
sell = all4 == 3 ? all4 : na
plot(buy, style=circles, linewidth=4, color=red)
plot(sell, style=circles, linewidth=4, color=green)