v10
Updated:
makeWebhookJson(webhookKey, orderRef, direction, qty, entryLimit, entryStop, exitLimit, exitStop, contract, ticker, lastTradeDateOrContractMonth, exchange, multiplier, clientId)
Creates a Webhook message for Tbot on Tradingboat
Parameters:
webhookKey (simple string): the unique key to the Flask (TVWB) server - // Use format like WebhookReceived:123456
orderRef (simple string): this will be used to create the order reference ID, together with timeframe and clientID
direction (simple string): the same as the strategy's direction - strategy.entrylong, strategy.entryshort, strategy.exitlong, strategy.exitshort, strategy.close, strategy.close_all
qty (float): default value is -1e10 indicating all contracts/units
entryLimit (float): this is same to strategy.entry()'s limit parameter
entryStop (float): this is same to strategy.entry()'s stop parameter
exitLimit (float): this is the same to strategy.exit()'s limit parameter
exitStop (float): this is the same to strategy.exit()'s stop parameter
contract (simple string): this will be translated to secType in ib_insync. stock, forex, crypto and future(s)
ticker (simple string): The TradingView ticker symbol for the asset; defaults to the current chart's ticker if not specified.
lastTradeDateOrContractMonth (simple string): The contract's last trading day or contract month for ib_insync, mainly for futures. Should be in the format YYYYMM or YYYYMMDD.
exchange (simple string): Destination exchange for ib_insync, primarily for futures.
multiplier (simple string): The futures contract multiplier is the amount multiplying the price per point to determine total value.
clientId (int): this is for IB Gateway/TWS's clientID which should start with 1
Returns: JSON as a series string