OPEN-SOURCE SCRIPT

OTHERS / ETH

49
//version=5
indicator("OTHERS / ETH", shorttitle="OTHERS/ETH", overlay=false, precision=6)

// --- Symbol inputs
others = request.security("CRYPTOCAP:OTHERS", "D", close)
eth = request.security("BINANCE:ETHUSDT", "D", close)

// --- Ratio
ratio = eth != 0 ? others / eth : na

// --- Plot
plot(ratio, color=color.orange, linewidth=2, title="OTHERS/ETH")

// --- Optional Moving Average
ma = ta.ema(ratio, 21)
plot(ma, color=color.blue, linewidth=2, title="EMA 21")

// --- Alerts
alertcondition(ta.crossover(ratio, ma), title="Cross Up", message="OTHERS/ETH crossed above EMA21")
alertcondition(ta.crossunder(ratio, ma), title="Cross Down", message="OTHERS/ETH crossed below EMA21")

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。