diff --git a/dabo/calc-levels.sh b/dabo/calc-levels.sh new file mode 100755 index 0000000..8bcb652 --- /dev/null +++ b/dabo/calc-levels.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +. /dabo/dabo-prep.sh + +rm -f asset-histories/*.history.*.csv.levels-calculating +sleep 12 + +while true +do + # Reload Config + . ../../dabo-bot.conf + . ../../dabo-bot.override.conf + # get levels + get_levels_all + rm -f asset-histories/*.history.*.csv.levels-calculating + sleep 900 +done + diff --git a/dabo/dabo-bot.conf b/dabo/dabo-bot.conf index ec149fb..39767ea 100755 --- a/dabo/dabo-bot.conf +++ b/dabo/dabo-bot.conf @@ -19,8 +19,8 @@ TRANSFER_CURRENCY="USD" # Only use currencies under the first X currencies sorted by market capitalization LARGEST_MARKETCAP="250" -# Blacklist Currencies -BLACKLIST="^USDT${CURRENCY}|^DAI${CURRENCY}|^BUSD${CURRENCY}|^USDC${CURRENCY}|^USDP${CURRENCY}|^TUSD${CURRENCY}|^USDD${CURRENCY}|^GUSD${CURRENCY}|^FEI${CURRENCY}|^USTC${CURRENCY}|^FRAX${CURRENCY}|^USDJ${CURRENCY}|^LUSD${CURRENCY}|^EURS${CURRENCY}|^TRIBE${CURRENCY}|^BNB${CURRENCY}|^FDUSD${CURRENCY}" +# symbols that should be traded +SYMBOLS="ETH SOL" ## Signal Group for Notifications SIGNAL_GROUP="Krypto-Bot" diff --git a/dabo/fetch-ohlcv-candles-indicators.sh b/dabo/fetch-ohlcv-candles-indicators.sh index 74f73d3..45c1c87 100755 --- a/dabo/fetch-ohlcv-candles-indicators.sh +++ b/dabo/fetch-ohlcv-candles-indicators.sh @@ -2,6 +2,10 @@ . /dabo/dabo-prep.sh +interval=$1 +[ -z "$interval" ] && return 1 +seconds=$2 + while true do # Reload Config @@ -10,7 +14,12 @@ do # Timestamp export f_timestamp=$(g_date_print) # get orders - get_ohlcv-candles - sleep 10 + get_ohlcv-candles $interval + [ -n "$seconds" ] && sleeptime=$(( ( ($seconds - $(TZ=UTC printf "%(%s)T") % $seconds) % $seconds + 2 ))) + #[[ $interval = 4h ]] && + [ "$interval" = "1d" ] && sleeptime=$(($(TZ=UTC date +%s -d "tomorrow 0:00") - $(date +%s) +2 )) + [ "$interval" = "1w" ] && sleeptime=$(($(TZ=UTC date +%s -d "next monday 0:00") - $(date +%s) +2 )) + g_echo_note "Waiting $sleeptime seconds until next run" + sleep $sleeptime done diff --git a/dabo/fetch-symbols_ticker.sh b/dabo/fetch-symbols_ticker.sh index f2393f4..6f23ed4 100755 --- a/dabo/fetch-symbols_ticker.sh +++ b/dabo/fetch-symbols_ticker.sh @@ -2,9 +2,6 @@ . /dabo/dabo-prep.sh -# Headline -export csv_headline="Date and Time,Price,Change,EMA12,EMA26,MACD,EMA9 (Sig.),Histogram,MACD Sig.,RSI5,RSI14,RSI21,RSI720,RSI60,RSI120,RSI240,RSI420,Coingecko Change 24h,Coingecko Change 7d,Coingecko Change 14d,Coingecko Change 30d,Coingecko Change 1y,Coingecko MarketCap Change 24h,RANGE DATE,LOWEST IN RANGE,HIGHEST IN RANGE,PIVOT POINT,SUPPORT1,RESIST1,GOLDEN POCKET SUPPORT,GOLDEN POCKET RESIST,GOLDEN POCKET 65 SUPPORT,GOLDEN POCKET 65 RESIST,SUPPORT3,RESIST3,EMA50,EMA100,EMA200,EMA800,Coingecko Price" - while true do # Reload Config @@ -14,6 +11,6 @@ do export f_timestamp=$(g_date_print) # get assets get_symbols_ticker refetchonly || g_echo_warn "Error while refetching tickers from ${STOCK_EXCHANGE}" - sleep 2 + sleep 3 done diff --git a/dabo/functions/get_indicators.sh b/dabo/functions/get_indicators.sh index 144946e..45eb6f5 100644 --- a/dabo/functions/get_indicators.sh +++ b/dabo/functions/get_indicators.sh @@ -10,7 +10,7 @@ function get_indicators_all { # find all hitory files get_symbols_ticker - for f_symbol in "${f_symbols_array[@]}" + for f_symbol in "${f_symbols_array_trade[@]}" do f_symbol=${f_symbol%%:*} f_symbol=${f_symbol//\/} diff --git a/dabo/functions/get_levels.sh b/dabo/functions/get_levels.sh index 4822761..78a5d95 100644 --- a/dabo/functions/get_levels.sh +++ b/dabo/functions/get_levels.sh @@ -3,30 +3,42 @@ function get_levels_all { g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@" - local f_histfile f_level f_symbol + local f_levelsfile f_level f_symbol f_symbol_in_array f_price get_symbols_ticker - for f_symbol in "${f_symbols_array[@]}" + for f_symbol in "${f_symbols_array_trade[@]}" do f_symbol=${f_symbol%%:*} f_symbol=${f_symbol//\/} - for f_histfile in "asset-histories/${f_symbol}.history.1d.csv" "asset-histories/${f_symbol}.history.4h.csv" "asset-histories/${f_symbol}.history.15m.csv" + # check for data files + for f_levelsfile in "asset-histories/${f_symbol}.history.1d.csv" "asset-histories/${f_symbol}.history.4h.csv" "asset-histories/${f_symbol}.history.15m.csv" do - [ -s "$f_histfile" ] || continue 2 + [ -s "$f_levelsfile" ] || continue 2 done - f_histfile="asset-histories/${f_symbol}.history.csv" - printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_histfile}.levels-calculating" - g_echo_note "Estimating relevant levels of $f_symbol" - mapfile -t f_prices < <(cut -d, -f3,4,5 "asset-histories/${f_symbol}.history.1d.csv" "asset-histories/${f_symbol}.history.4h.csv" "asset-histories/${f_symbol}.history.15m.csv" | sed 's/,/\n/g' | sort -rnu) - get_levels && printf '%(%Y-%m-%d %H:%M:%S)T' - rm -f "${f_histfile}.levels-calculating" - for f_level in "$g_levels[@]" + # define target file + f_levelsfile="asset-histories/${f_symbol}.history.csv" + printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_levelsfile}.levels-calculating" + g_echo_note "Estimating relevant levels of $f_symbol" + + # get current price to reduce the range, save cpu-power and time + f_symbol_in_array=${f_symbol/ /} + f_price=${f_tickers_array[$f_symbol_in_array]} + + # get relevant data max 30000 (+-15000) prices from current price + mapfile -t f_prices < <((cut -d, -f3,4,5 "asset-histories/${f_symbol}.history.1d.csv" "asset-histories/${f_symbol}.history.4h.csv" "asset-histories/${f_symbol}.history.15m.csv" ; echo $f_price) | sed 's/,/\n/g' | sort -rnu | grep -C 15000 "^${f_price}$") + + # calculate levels + get_levels && printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_levelsfile}.levels-calculated" + rm -f "${f_levelsfile}.levels-calculating" + + # write new levels file + for f_level in "${f_levels[@]}" do echo $f_level - done >"${f_histfile}.levels.new" - mv "${f_histfile}.levels.new" "${f_histfile}.levels" + done >"${f_levelsfile}.levels.new" + mv "${f_levelsfile}.levels.new" "${f_levelsfile}.levels" done } @@ -34,13 +46,13 @@ function get_levels_all { function get_levels { - # estimates the relevant levels from price list from array f_prices and put then in arra f_levels + # estimates the relevant levels from price list from array f_prices and put then in array f_levels # - needs array $f_prices with prices sorted from low to high and no duplicates (sort -nru) to analyze g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@" # if there is not enough or no price data - [ -z "$f_prices[100]" ] && return 1 + [ -z "${f_prices[100]}" ] && return 1 # reset old levels var unset f_levels @@ -56,11 +68,14 @@ function get_levels { # calc threshold (avarage of percentual price difference) local f_price_range_percentage=${g_percentage_diff_result//-/} - g_calc "$f_price_range_percentage / $f_number_of_prices" + g_calc "$f_price_range_percentage / $f_number_of_prices" || return 1 local f_threshold=$g_calc_result # calc threshold in range (1/100 of percentual range) - g_calc "$f_price_range_percentage / 100" + g_calc "$f_price_range_percentage / 100" || return 1 local f_threshold_in_range=$g_calc_result + + #echo "$f_threshold_in_range - $f_threshold - $f_price_range_percentage" + #return 0 # how much occurencies / same prices have so show up for a defined level - percentage from number of prices local f_min_occurrences=3 @@ -107,7 +122,7 @@ function get_levels { then g_calc "($f_level_prices)/$f_level_count" f_levels+=("$g_calc_result") - #echo "ending relevant level $g_calc_result after $f_level_count times" + g_echo_note "adding significant level at $g_calc_result after reaching $f_level_count times" fi f_level_prices="" f_level_count="" @@ -117,5 +132,3 @@ function get_levels { done } - - diff --git a/dabo/functions/get_ohlcv-candle.sh b/dabo/functions/get_ohlcv-candle.sh index e627284..9bf9913 100644 --- a/dabo/functions/get_ohlcv-candle.sh +++ b/dabo/functions/get_ohlcv-candle.sh @@ -2,12 +2,12 @@ function get_ohlcv-candles { g_echo_note "RUNNING FUNCTION ${FUNCNAME} $@" - local f_asset f_histfile f_histfile_week f_symbol f_timeframe + local f_asset f_histfile f_symbol f_timeframe local f_timeframes="1w 1d 4h 1h 15m 5m" + [ -n $1 ] && f_timeframes=$1 get_symbols_ticker - - for f_symbol in "${f_symbols_array[@]}" + for f_symbol in BTC/$CURRENCY "${f_symbols_array_trade[@]}" do # fetch only single symbols (for debugging) #[ "$f_symbol" = "BTC/USDT:USDT" ] || continue @@ -17,7 +17,7 @@ function get_ohlcv-candles { f_asset="${f_symbol//:*}" f_asset="${f_asset///}" f_histfile="asset-histories/$f_asset.history.$f_timeframe.csv" - f_histfile_week="asset-histories/$f_asset.history.1w.csv" + #f_histfile_week="asset-histories/$f_asset.history.1w.csv" if [ -s "${f_histfile}.indicators-calculating" ] then @@ -27,10 +27,10 @@ function get_ohlcv-candles { # get data printf '%(%Y-%m-%d %H:%M:%S)T' >"${f_histfile}.fetching" - get_ohlcv-candle "$f_symbol" $f_timeframe "${f_histfile}" "${f_histfile_week}" && printf '%(%Y-%m-%d %H:%M:%S)T' >>"$f_histfile.fetched" + get_ohlcv-candle "$f_symbol" $f_timeframe "${f_histfile}" && printf '%(%Y-%m-%d %H:%M:%S)T' >>"$f_histfile.fetched" # refresh latest indicators - get_indicators "${f_histfile}" 801 + get_indicators "${f_histfile}" 801 rm -f "${f_histfile}.fetching" @@ -45,7 +45,7 @@ function get_ohlcv-candle { local f_symbol="$1" local f_timeframe=$2 local f_histfile="$3" - local f_histfile_week="$4" + #local f_histfile_week="$4" local f_yahoo f_date f_unit_date f_data f_data_array f_data_unit f_open f_high f_low f_close f_volume @@ -62,7 +62,7 @@ function get_ohlcv-candle { if [ -z "$f_yahoo" ] then # find latest time which is not fetched already create f_since - get_ohlcv-candle-latest "$f_symbol" "$f_histfile" "$f_histfile_week" + get_ohlcv-candle-latest "$f_symbol" "$f_histfile" [ -z $f_since ] && break # from exchange @@ -106,16 +106,16 @@ function get_ohlcv-candle { # define field vars and convert exponential number (for example 9.881e-05) to "normal" notation f_open=${f_data_unit_ref[1]} - g_num_exponential2normal "$f_open" && f_open=$f_g_num_exponential2normal_result + g_num_exponential2normal "$f_open" && f_open=$g_num_exponential2normal_result f_high=${f_data_unit_ref[2]} - g_num_exponential2normal "$f_high" && f_high=$f_g_num_exponential2normal_result + g_num_exponential2normal "$f_high" && f_high=$g_num_exponential2normal_result f_low=${f_data_unit_ref[3]} - g_num_exponential2normal "$f_low" && f_low=$f_g_num_exponential2normal_result + g_num_exponential2normal "$f_low" && f_low=$g_num_exponential2normal_result f_close=${f_data_unit_ref[4]} - g_num_exponential2normal "$f_close" && f_close=$f_g_num_exponential2normal_result + g_num_exponential2normal "$f_close" && f_close=$g_num_exponential2normal_result f_volume=${f_data_unit_ref[5]} [ -n "$f_yahoo" ] && f_volume=${f_data_unit_ref[6]} - g_num_exponential2normal "$f_volume" && f_volume=$f_g_num_exponential2normal_result + g_num_exponential2normal "$f_volume" && f_volume=$g_num_exponential2normal_result # check date for valid date if ! [[ $f_unit_date =~ ^2[0-1][0-9][0-9]-[0-1][0-9]-[0-3][0-9]( [0-2][0-9]:[0-5][0-9]:[0-5][0-9])?$ ]] @@ -158,7 +158,7 @@ function get_ohlcv-candle-latest { local f_symbol="$1" local f_histfile="$2" - local f_histfile_week="$3" + #local f_histfile_week="$3" # find latest time which is not fetched already if [ -s "$f_histfile" ] diff --git a/dabo/functions/get_orders.sh b/dabo/functions/get_orders.sh index 137226d..ceb66a9 100644 --- a/dabo/functions/get_orders.sh +++ b/dabo/functions/get_orders.sh @@ -9,7 +9,7 @@ function get_orders { local f_symbols=() if [ -z "$f_symbol" ] then - for f_symbol in "${f_symbols_array[@]}" + for f_symbol in "${f_symbols_array_trade[@]}" do if [ -z "$LEVERAGE" ] then diff --git a/dabo/functions/get_positions.sh b/dabo/functions/get_positions.sh index 371244f..56f74cf 100644 --- a/dabo/functions/get_positions.sh +++ b/dabo/functions/get_positions.sh @@ -5,7 +5,7 @@ function get_positions { local f_symbol f_symbols # build python array of symbols - for f_symbol in "${f_symbols_array[@]}" + for f_symbol in "${f_symbols_array_trade[@]}" do if [ -z "$LEVERAGE" ] then diff --git a/dabo/functions/get_symbols_ticker.sh b/dabo/functions/get_symbols_ticker.sh index 50cb2f4..541d750 100644 --- a/dabo/functions/get_symbols_ticker.sh +++ b/dabo/functions/get_symbols_ticker.sh @@ -12,17 +12,17 @@ function get_symbols_ticker { if [ "$f_fetch" = "refetchonly" ] then # fetch from exchange - f_ccxt "print(${STOCK_EXCHANGE}.fetch_tickers())" && echo $f_ccxt_result >CCXT_TICKERS_RAW + f_ccxt "print(${STOCK_EXCHANGE}.fetch_tickers())" && echo $f_ccxt_result >CCXT_TICKERS_RAW-${STOCK_EXCHANGE} # parse relevant tokens local f_grep="${CURRENCY}," [ -n "$LEVERAGE" ] && f_grep="${CURRENCY}:${CURRENCY}," - [ -s CCXT_TICKERS_RAW ] && jq -r '.[] | .symbol + "," + (.last|tostring)' CCXT_TICKERS_RAW | grep "${f_grep}" >CCXT_TICKERS + [ -s CCXT_TICKERS_RAW-${STOCK_EXCHANGE} ] && jq -r '.[] | .symbol + "," + (.last|tostring)' CCXT_TICKERS_RAW-${STOCK_EXCHANGE} | grep "${f_grep}" >CCXT_TICKERS-${STOCK_EXCHANGE}.tmp - if [ -s CCXT_TICKERS ] + if [ -s CCXT_TICKERS-${STOCK_EXCHANGE}.tmp ] then - cut -d, -f1 CCXT_TICKERS >CCXT_SYMBOLS - cat CCXT_SYMBOLS >CCXT_SYMBOLS-$STOCK_EXCHANGE + cat CCXT_TICKERS-${STOCK_EXCHANGE}.tmp >CCXT_TICKERS-$STOCK_EXCHANGE + cut -d, -f1 CCXT_TICKERS-${STOCK_EXCHANGE}.tmp >CCXT_SYMBOLS-${STOCK_EXCHANGE} ## get symbols by volume from history files and check with CCXT_SYMBOLS-$STOCK_EXCHANGE [ -n "$LEVERAGE" ] && f_naming="${CURRENCY}:${CURRENCY}" @@ -41,18 +41,59 @@ function get_symbols_ticker { sed -i "\#${f_remove_symbol}#d" CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume done + # write file with symbols that should be traded + rm -f CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade.tmp + for f_symbol in $SYMBOLS + do + grep "^$f_symbol/$CURRENCY" CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume >>CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade.tmp + done + [ -s CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade.tmp ] && mv CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade.tmp CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade + else return 1 fi + return 0 fi - g_array CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume f_symbols_array_ref + # create associative ticker array + if [ -s CCXT_TICKERS-$STOCK_EXCHANGE ] + then + g_array CCXT_TICKERS-$STOCK_EXCHANGE f_tickers_array_ref + local f_ticker f_symbol f_price + declare -Ag f_tickers_array + for f_ticker in "${f_tickers_array_ref[@]}" + do + f_symbol=${f_ticker%%:*} + f_symbol=${f_symbol//\/} + f_symbol=${f_symbol/ /} + f_price=${f_ticker/*,/} + g_num_exponential2normal $f_price && f_price=$g_num_exponential2normal_result + + # remove from symbol-list if price is invalid + if ! g_num_valid_number $f_price 2>/dev/null + then + f_remove_symbol=${f_ticker/,*/} + sed -i "\#${f_remove_symbol}#d" CCXT_SYMBOLS-${STOCK_EXCHANGE} CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume + continue + fi + f_tickers_array[$f_symbol]=$f_price + done + fi + + # create array with ccxt symbols sorted by volume + [ -s CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume ] && g_array CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume f_symbols_array_ref f_symbols_array=("${f_symbols_array_ref[@]}") + # create array with ccxt symbols sorted by volume which sould be traded + [ -s CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade ] && g_array CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume-trade f_symbols_array_trade_ref + f_symbols_array_trade=("${f_symbols_array_ref[@]}") + + + # create f_symbols var [ -s CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume ] && f_symbols=$(cat CCXT_SYMBOLS-${STOCK_EXCHANGE}-by-volume) f_symbols=${f_symbols//$'\n'/'+'} - + if [ -z "$f_symbols" ] then g_echo_warn "Could not get symbols list - empty" diff --git a/dabo/functions/get_transactions.sh b/dabo/functions/get_transactions.sh index 45ab72d..cca54ae 100644 --- a/dabo/functions/get_transactions.sh +++ b/dabo/functions/get_transactions.sh @@ -38,6 +38,7 @@ function get_transactions { #for f_symbol in $f_symbols for f_symbol in "${f_symbols_array[@]}" do + f_symbol=${f_symbol//,*} # binance does not allow derivate trading in many countries so ignore because of 400-Error [[ $f_symbol =~ : ]] && [[ $f_exchange = binance ]] && continue diff --git a/dabo/watch-assets.csv b/dabo/watch-assets.csv deleted file mode 100644 index 86afd13..0000000 --- a/dabo/watch-assets.csv +++ /dev/null @@ -1 +0,0 @@ -ASSET,ALERTS,BUYPRICE,BUYDATE,BUYQUANTITY,SELLPRICE,SELLDATE,SELLQUANTITY,COMMENT diff --git a/docker-compose.yml b/docker-compose.yml index d67b03d..411582a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro @@ -32,7 +32,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro @@ -45,7 +45,7 @@ services: cpus: '1' memory: 512M - dabo-ohlcv-candles-indicators: + dabo-ohlcv-candles-indicators-5m: build: context: . dockerfile: Dockerfile @@ -55,18 +55,103 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro - /etc/localtime:/etc/localtime:ro - entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh - deploy: - resources: - limits: - cpus: '1' - memory: 512M + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 5m 300 + + + dabo-ohlcv-candles-indicators-15m: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 15m 900 + + + dabo-ohlcv-candles-indicators-1h: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 1h 3600 + + + dabo-ohlcv-candles-indicators-4h: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 4h 3600 + + + dabo-ohlcv-candles-indicators-1d: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 1d + + + dabo-ohlcv-candles-indicators-1w: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/fetch-ohlcv-candles-indicators.sh 1w + dabo-calc-indicators-hist: build: @@ -78,7 +163,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro @@ -92,6 +177,29 @@ services: cpus: '1' memory: 1024M + dabo-calc-levels: + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + user: 10000:10000 + volumes: + - ./dabo:/dabo:ro + - ./strategies:/dabo/strategies:ro + - ./dabo-bot.conf:/dabo/dabo-bot.override.conf +# - ./watch-assets.csv:/dabo/watch-assets.csv + - ./data:/dabo/htdocs:rw + - ./home:/dabo/home:rw + - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro + - /usr/local/etc/notify.conf:/usr/local/etc/notify.conf:ro + - /etc/localtime:/etc/localtime:ro + entrypoint: /dabo/calc-levels.sh + deploy: + resources: + limits: + cpus: '1' + memory: 1024M + dabo-orders: build: context: . @@ -102,7 +210,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro @@ -125,7 +233,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro @@ -149,7 +257,7 @@ services: - ./dabo:/dabo:ro - ./strategies:/dabo/strategies:ro - ./dabo-bot.conf:/dabo/dabo-bot.override.conf - - ./watch-assets.csv:/dabo/watch-assets.csv +# - ./watch-assets.csv:/dabo/watch-assets.csv - ./data:/dabo/htdocs:rw - ./home:/dabo/home:rw - /usr/local/bin/notify.sh:/usr/local/bin/notify.sh:ro