全部
常见问题
公告
产品文档
OKX信号策略:如何使用TradingView警报创建您的信号策略 - 附录
//@version=5 indicator('MACD Sample Script 1', overlay=true) // Calculate MACD [macdLine, signalLine, _] = ta.macd(close, 12, 26, 9) // Define the golden cross condition goldenCross = ta.crossover(macdLine, signalLine) // Define the death cross condition deathCross = ta.crossunder(macdLine, signalLine) // Use the alertcondition function to generate alerts alertcondition(condition=goldenCross, title="MACD Golden Cross", message="") alertcondition(condition=deathCross, title="MACD Death Cross",发布于 2023年8月21日更新于 2025年4月1日产品文档OKX信号策略:如何使用TradingView警报创建您的信号策略
``` javascript //@version=5 strategy("RSI Strategy", overlay=true) // RSI Parameters rsiLength = input(14, "RSI Length") overboughtLevel = input(60, "Overbought Level") oversoldLevel = input(40, "Oversold Level") // Calculate RSI rsiValue = ta.rsi(close, rsiLength) // Strategy Conditions longEntry = ta.cross(rsiValue, oversoldLevel) longExit = ta.cross(rsiValue, overboughtLevel) // ENTER_LONG Condition if longEntry strategy.entry("Long Entry", strategy.long) // EXIT_LONG Condition if longExit strategy.close发布于 2023年8月30日更新于 2025年12月3日产品文档
显示第 1-2 篇文章,共 2 篇