added fibonacci variables fpr strategies; documentation of variables for strategies

This commit is contained in:
olli 2023-09-06 19:57:26 +02:00
parent 45333c7261
commit 58cdcc5324
2 changed files with 101 additions and 1 deletions

View File

@ -207,6 +207,96 @@ A Binance or OneTrading.com (ex BitpandaPro) account must exist and the API must
The access data is stored in the file .binance-secrets in the project directory in the variables API_SECRET and API_KEY.
The access rights to this file should be set to the minimum necessary for security reasons.
# Strategies
You can put your own code into the strateghies it will be sourced by the bot.
You can use available variables to set and read things.
## Variables to set
You can simply use the following varaibles to define things:
```
local GOOD_MARKET_PERFORMANCE_INDEX
local BUY_RSI5_SIGNAL_UNTIL
local BUY_RSI14_SIGNAL_UNTIL
local BUY_RSI21_SIGNAL_UNTIL
local BUY_RSI60_SIGNAL_UNTIL
local BUY_RSI120_SIGNAL_UNTIL
local BUY_RSI240_SIGNAL_UNTIL
local BUY_RSI420_SIGNAL_UNTIL
local BUY_RSI720_SIGNAL_UNTIL
local BUY_RSI5_SIGNAL_FROM
local BUY_RSI14_SIGNAL_FROM
local BUY_RSI21_SIGNAL_FROM
local BUY_RSI60_SIGNAL_FROM
local BUY_RSI120_SIGNAL_FROM
local BUY_RSI240_SIGNAL_FROM
local BUY_RSI420_SIGNAL_FROM
local BUY_RSI720_SIGNAL_FROM
local BUY_MACD_RELATION_FROM
local BUY_MACD_RELATION_TO
local BUY_MIN_PRICE_CHANGE_LAST_1_DAY
local BUY_MIN_PRICE_CHANGE_LAST_7_DAY
local BUY_MIN_PRICE_CHANGE_LAST_14_DAY
local BUY_MIN_PRICE_CHANGE_LAST_30_DAY
local BUY_MINGROWTH_PERIOD
local BUY_MINGROWTH
```
## Variables with current values from the CSV files
```
# date from current timeframe
${f_date}
# current price
${f_price}
# price change percentage from timeframe before
${f_price_change}
# EMA
${f_ema12}
${f_ema26}
# MACD with EMA 12/16/9
${f_macd_histogram}
${f_macd_signal_relation}
${f_macd_histogram_relation}
${f_macd_histogram_signal}
# RSI from last ?? timeframes
${f_rsi5}
${f_rsi14}
${f_rsi21}
${f_rsi720}
${f_rsi60}
${f_rsi120}
${f_rsi240}
${f_rsi420}
# Price change from coungecko
${f_price_change_1_day}
${f_price_change_7_day}
${f_price_change_14_day}
${f_price_change_30_day}
${f_price_change_1_year}
# Market Capitalization change from coingecko.com
${f_marketcap_change_1_day}
# Current Fibonacci value from last ?? timeframes
${f_fibo60}
${f_fibo168}
${f_fibo672}
${f_fibo8064}
```
# Future ideas/featrues
- Crypto preferences (While/Blacklist for certain currencies)
- Overview trades/profits/losses for tax declaration

View File

@ -21,6 +21,9 @@ function get_vars_from_csv {
get_var_from_line price 2
get_var_from_line price_change 3
get_var_from_line ema12 4
get_var_from_line ema26 5
get_var_from_line macd_histogram 8
get_var_from_line macd_signal_relation 9
f_macd_histogram_relation=$(echo "${f_macd_signal_relation}" | cut -d\| -f1)
@ -40,7 +43,14 @@ function get_vars_from_csv {
get_var_from_line price_change_7_day 19
get_var_from_line price_change_14_day 20
get_var_from_line price_change_30_day 21
get_var_from_line price_change_1_year 22
get_var_from_line marketcap_change_1_day 23
get_var_from_line fibo60 24
get_var_from_line fibo168 25
get_var_from_line fibo672 26
get_var_from_line fibo8064 27
}
function get_var_from_line {