OKX信号策略:如何使用TradingView警报创建您的信号策略
``` javascript //@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
发布于 2023年8月30日更新于 2025年12月3日产品文档