pine-script - 仅当在交易视图上满足条件时触发指标警报
问题描述
我需要帮助来使用两个指标创建 TradingView 警报条件:随机指标和市场解放者。该策略包括仅在随机数位于通道之外时触发来自 Market Liberator 的分歧(内置分歧警报)。
有可能吗? 这是一张图片
解决方案
如果 'Market Liberator' 指标的源代码被关闭 - 恐怕这是不可能的。
但是,您的屏幕截图中的“市场解放者”看起来像是从免费的公共开源脚本中抄袭而来,它们有不同的名称,其中最流行的名称之一 - vumanchu cipher B
如果 Market Liberator 是开源 Cipher 指标的副本 - 您只需在背离警报中包含一个基于随机指标的额外条件,如下面的示例所示(使用 Vumanchu 的市场密码 B 脚本):
...
// Stoch indicator and inputs:
periodK = input(14, title="%K Length", minval=1)
smoothK = input(1, title="%K Smoothing", minval=1)
periodD = input(3, title="%D Smoothing", minval=1)
k = sma(stoch(close, high, low, periodK), smoothK)
d = sma(k, periodD)
// Stoch outside the 20-80 channel:
bool stochBuy = d < 20
bool stochSell = d > 80
// Divergence alerts from the MC script with additional stoch condition:
// bullish
alertcondition(buySignalDiv and stochBuy, 'Buy (Big green circle + Div)', 'Buy & WT Bullish Divergence & WT Overbought')
// bearish
alertcondition(sellSignalDiv and stochSell, 'Sell (Big red circle + Div)', 'Buy & WT Bearish Divergence & WT Overbought')
推荐阅读
- python - 如何从特定显示器上的 python 绑定启动 VLC 实例?
- mks-integrity - PTC 完整性 CLI 未识别任何命令
- wordpress - Woocommerce Rest API 将自定义数据添加到产品列表
- javascript - 对齐在页脚的反应中不起作用
- ruby - 打印代码符号表失败并出现 RuntimeError
- android - 在 Android 应用程序中监控 WebRTC 比特率
- reactjs - 使用 React,使用State 映射槽状态对象,并创建音频元素数组。然后将音频持续时间保存为数组状态
- r - R - openxlsx read.xlsx 无法读取某些列
- c# - 奇怪的屏幕缩放和精灵显示
- react-native - 构建失败的反应原生(不生成 apk)