Reputation: 1
I have a strategy trigger to place order. but I am stuggling how to add the 10% draw down stop loss on whatever my entry price. please help . I am working on bybit exchange.
I know how to add stop loss price on my order, but because my algo doesn't know the entry price before the order place. So what is the logic of that? is that I need to edit my order?
Also TP please.
I am using pycharm.
Thank you
import ccxt
exchange = ccxt.bybit({
'apiKey': '',
'secret': '',
'options': {'defaultPositionMode': True }
})
markets = exchange.load_markets()
symbol = 'BTCUSDT'
market = exchange.market(symbol)
bet_size = 0.001
order = exchange.create_order(symbol, 'market', 'buy', bet_size, None,
params={'position_idx': 1,'stopLoss': })
Upvotes: 0
Views: 232