This commit is contained in:
olli 2023-10-31 20:47:34 +01:00
parent 433dc36031
commit 0270b19bc0

View File

@ -51,7 +51,7 @@ function analyze {
echo "$(head -n1 ${file}),Market Perrormance,Score,Buy Score,Sell Score,InTrade,Inetrim Result" >analyze-${analyzedate}/chart-${tmpfile}
# Chart Part End
for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,')
for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,')
do
# Chart Part
f_sell_score=""
@ -121,7 +121,7 @@ function analyze {
complete_result=$(echo "$complete_result+$result" | bc -l | sed 's/^\./0./; s/^-\./-0./' | xargs printf "%.2f")
done
hodlresult=$(g_percentage-diff $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | head -n1 | cut -d, -f2) $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | tail -n1 | cut -d, -f2))
hodlresult=$(g_percentage-diff $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | head -n1 | cut -d, -f2) $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | tail -n1 | cut -d, -f2))
echo "COMPLETE:RESULT:$(basename "$file" | cut -d. -f1):: ${complete_result}% HODL:${hodlresult}% analyze-${analyzedate}/${tmpfile}.log $file" | perl -pe 's/ /\t/g; s/:/ /g' | tee -a ${g_tmp}/output-${tmpfile}
echo "=====================================" >>${g_tmp}/output-${tmpfile}
@ -158,7 +158,7 @@ for file in $@
do
echo "${file}" | egrep -q "BALANCE|-INDEX" && continue
lines=$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,' | wc -l)
lines=$(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,,' | wc -l)
if [ $lines -lt 150 ]
then
g_echo "Only $lines lines for given timeframe (${ANALYZE_TIME}) in $file - ignoring files with less then 150!"