做空
DCC

/ This code snippet is written in PineScript, a programming language used in TradingView software.
// This function monitors the daily price of cryptocurrency
study(title="Cryptocurrency Price Monitor", precision=8)
// Define cryptocurrency symbol to monitor
symbol = "BTCUSD"
// Retrieve price history for this currency
price_history = security(symbol, "D", close)
// Define alert threshold in percentage
threshold = 0.1
// Calculate the upper alert threshold
price_upper = price_history * (1 + threshold/100)
// Calculate the lower alert threshold
price_lower = price_history * (1 - threshold/100)
// Plot current price
plot(price_history, title="Price", color=color.blue, linewidth=2)
// Plot upper alert threshold
plot(price_upper, title="Price Alert Upper", color=color.orange, linewidth=2)
// Plot lower alert threshold
plot(price_lower, title="Price Alert Lower", color=color.red, linewidth=2)
// When the price rises above the upper alert threshold,
// an alert will be triggered
alertcondition(price_history > price_upper, title="Price Alert", message="The price of cryptocurrency
// This function monitors the daily price of cryptocurrency
study(title="Cryptocurrency Price Monitor", precision=8)
// Define cryptocurrency symbol to monitor
symbol = "BTCUSD"
// Retrieve price history for this currency
price_history = security(symbol, "D", close)
// Define alert threshold in percentage
threshold = 0.1
// Calculate the upper alert threshold
price_upper = price_history * (1 + threshold/100)
// Calculate the lower alert threshold
price_lower = price_history * (1 - threshold/100)
// Plot current price
plot(price_history, title="Price", color=color.blue, linewidth=2)
// Plot upper alert threshold
plot(price_upper, title="Price Alert Upper", color=color.orange, linewidth=2)
// Plot lower alert threshold
plot(price_lower, title="Price Alert Lower", color=color.red, linewidth=2)
// When the price rises above the upper alert threshold,
// an alert will be triggered
alertcondition(price_history > price_upper, title="Price Alert", message="The price of cryptocurrency
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。