【发布时间】:2021-10-02 13:45:16
【问题描述】:
嗨,所以我已经调整了一个已经存在的策略,它使用 v2 pine 进行波段交易,它看起来有利可图,但我无法使用 1 个警报将它连接到 3commas 以做多或关闭做多,我试图做一个逃生角色要使策略只需要 1 个警报即可自动打开或关闭交易,我的意思是必须手动创建新警报以打开或关闭毫无意义,它变成了半个机器人哈哈
strategy.entry("long", strategy.long, when=buy1, comment="{/n/"message_type/": /"bot/",/n/"bot_id/": 123456,/n/ "email_token/": /"123456/",/n/"delay_seconds/": 0/n}")
strategy.close("long", when=sell2, comment="{/n/"action/": /"close_at_market_price/"n/,/"message_type/": /"bot/"/n,/ "bot_id/": 123456,/n/"email_token/": /"123456/",n//"delay_seconds/": 0/n}")
如果有人能解释我的错误在哪里,我会很高兴,提前谢谢
电视警报的原始命令: 开长: { "message_type": "机器人", “bot_id”:123456, "email_token": "123456", “延迟_秒”:0 }
对于关闭位置: { “行动”:“close_at_market_price”, "message_type": "机器人", “bot_id”:123456, "email_token": "123456", “延迟_秒”:0 }
【问题讨论】:
标签: python pine-script tradingview-api