From f0c33032467a094a217cea0419a99404e20c19c7 Mon Sep 17 00:00:00 2001 From: olli Date: Wed, 4 Dec 2024 15:22:31 +0100 Subject: [PATCH] fix score, example trade balance inn % from complete balance, small fixes - thanks to andrius for hint(s) --- .../example_manage_positions.strategy.sh | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 strategies/example_manage_positions.strategy.sh diff --git a/strategies/example_manage_positions.strategy.sh b/strategies/example_manage_positions.strategy.sh new file mode 100644 index 0000000..afcbe88 --- /dev/null +++ b/strategies/example_manage_positions.strategy.sh @@ -0,0 +1,30 @@ +# Example strategy for managing open positions + +g_echo_note "EXAMPLE Strategy for managing open positions" + +##### WARNING! This strategy is only intended as an example and should not be used with real trades. Please develop your own strategy ###### + +# if you want to use this remove the next line with return 0 +#return 0 + +# get vars with positions +get_position_array + +# go through trading symbols +for symbol in ${f_symbols_array_trade[@]} +do + echo "==== XXXXX $symbol" +done + +##### WARNING! This strategy is only intended as an example and should not be used with real trades. Please develop your own strategy ###### +# if you want to use ist remove the next line with return 0 +#return 0 + + +# create stoploss order +#print(exchange.createOrder(symbol='XRP/USDT:USDT', type='Stop', side='sell', amount='0', price='None', params={'posSide': 'Long', 'stopPx':0.5})) +#print(exchange.createOrder(symbol='XRP/USDT:USDT', type='Stop', amount='0', side='sell', price='None', params={'posSide': 'Long', 'stopPx': 0.5})) + +# edit stoploss +#print(exchange.editOrder(id='debc0df8-10c7-4cfd-95f7-b4de9cc60332', symbol='XRP/USDT:USDT', type='Stop', side='sell', amount='101', params={'stopLossPrice': 0.48})) +