OPEN-SOURCE SCRIPT

OTHERS / ETH

63
//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")

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.