警报消息中的参考交易方向?

问题描述

是否有内置的方式使用{{ }}方法在警报消息中引用交易方向?我没有时间点击并找到消息后找到正确的图表(交易时间很短,事情进展很快);我只想在警报通知中看到它。

解决方法

是的。在参考中查看:

带有“ strategy”前缀的占位符只能在策略警报中使用:

{{strategy.position_size}} - returns the value of the same keyword in Pine,i.e.,the size of the current position.
{{strategy.order.action}} - returns the string “buy” or “sell” for the executed order.
{{strategy.order.contracts}} - returns the number of contracts of the executed order.
{{strategy.order.price}} - returns the price at which the order was executed.
{{strategy.order.id}} - returns the ID of the executed order (the string used as the first parameter in one of the function calls generating orders: strategy.entry,strategy.exit or strategy.order).
{{strategy.order.comment}} - returns the comment of the executed order (the string used in the comment parameter in one of the function calls generating orders: strategy.entry,strategy.exit or strategy.order). If no comment is specified,then the value of strategy.order.id will be used.
{{strategy.order.alert_message}} - returns the value of the alert_message parameter which can be used in the strategy's Pine code when calling one of the functions used to place orders: strategy.entry,strategy.exit or strategy.order. This feature is only supported in Pine v4.
**{{strategy.market_position}} - returns the current position of the strategy in string form: “long”,“flat”,or “short”.**

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...