Python tda api尾部停止在放置时失败
总结: 当我从TDAAPI在python中放置一个拖尾停止顺序时,它给出了错误Python tda api尾部停止在放置时失败,python,algorithmic-trading,Python,Algorithmic Trading,总结: 当我从TDAAPI在python中放置一个拖尾停止顺序时,它给出了错误 "error": "trailingStopMethod is required when orderType is Trailing Stop." 当我创建一个保存的订单(通过将place\u order更改为create\u saved\u order)并手动放置它时,没有任何问题。在下面的调用中,我相信我通过执行set\u stop\u price\u link\u t
"error": "trailingStopMethod is required when orderType is Trailing Stop."
当我创建一个保存的订单(通过将place\u order更改为create\u saved\u order)并手动放置它时,没有任何问题。在下面的调用中,我相信我通过执行set\u stop\u price\u link\u type(StopPriceLinkType.VALUE)
指定了trailingstop方法,以指定我正在执行值偏移。以下是订购规格
from tda.orders.common import OrderType, StopPriceLinkType
from tda.orders.common import Duration, Session
trailStopResponse = client.place_order(config.account_id,
equity_sell_market(symbol,qty)
.set_duration(Duration.DAY)
.set_session(Session.NORMAL)
.set_order_type(OrderType.TRAILING_STOP)
.set_stop_price_offset(atrValFifteen/3) #trailing the market with our ATR val
.set_stop_price_link_type(StopPriceLinkType.VALUE) #-> means we're supplying a price as a stop value
.build()
)
让我知道我错过了什么,使这个电话工作时,由自己放置