Execute Price

The parameter that determines the price of the orders being placed.

execute_price [decimal | formula -> [decimal]]

The price value for each order in the grid. It accepts both integer and decimal inputs and allows the use of formulas as values. If-else logic is supported. Use the buy or sell side to configure buy and sell orders within a single grid.

Always positive value. Can’t be zero.

Supports the use of the iterable parameter order_pos to facilitate the placement of multiple orders.

execute_volume can't be used in execute_price .

Example:

The order will be placed at a price of 2345.95.

"execute_price": "2345.95"


The order will be executed at the current market price.

"execute_price": "ticker()"

ticker()

The order will be placed at the first market bid price.

"execute_price": "orderbook().bid[0].price"

orderbook().bid[0].price

The order will be executed at the first ask price.

"execute_price": " orderbook().ask[0].price"

orderbook().ask[0].price

The order will be placed at the arithmetic average of the bid and ask prices for Bybit's ETH-USDT pair.

"execute_price": "(orderbook('ETH-USDT','bybit').bid[0].price + orderbook('EVER-USDT','bybit').ask[0].price) / 2"

(orderbook('ETH-USDT','bybit').bid[0].price + orderbook('EVER-USDT','bybit').ask[0].price) / 2

The order will be executed at the current market price if the starting total base matches the current total base. Otherwise, it will be placed at the fair price, determined by the ratio of the differences between the starting and current balances of the base and counter tokens.

"execute_price": "ticker() if group_balance('base').current.total == group_balance('base').start.total else (group_balance('counter').start.total -group_balance('counter').current.total)/(group_balance('base').current.total -group_balance('base').start.total)"

ticker() if group_balance('counter').current.total == group_balance('counter').start.total else (group_balance('base').start.total-group_balance('base').current.total)/(group_balance('counter').current.total-group_balance('counter').start.total)

The orders will be placed at the price of the first market ask for sell orders and the first market bid for buy orders, adjusted by ±0.5%, respectively. Subsequent orders will be placed at increments of 0.5% of the price for each additional order.

"execute_price": "( orderbook().bid[0].price if side==’buy’ else orderbook().ask[0].price) * (1 + 0.005 *order_pos)"

(orderbook().bid[0].price if side==’buy’ else orderbook().ask[0].price) * (1 + 0.005 * order_pos)

Orders will be placed at the price level where the RSI is anticipated to reach 60 on 15-minute candlesticks.

"execute_price": "rsi_to_price(candles(’m15’), rsi_expected=60)"

rsi_to_price(candles(’m15’), rsi_expected=60)

Place an order at the average closing price of the most recent 100 fifteen-minute candlesticks.

"execute_price": "mean([candle.close for candle in candles('m15')])"

mean([candle.close for candle in candles('m15')])

Last updated