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.
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
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)