added chart
This commit is contained in:
parent
b5b15a0896
commit
2502ac780d
@ -48,7 +48,7 @@ function analyze {
|
||||
IFS=$'\n'
|
||||
|
||||
# Chart Part
|
||||
head -n1 ${file} >analyze-${analyzedate}/chart-${tmpfile}.csv
|
||||
head -n1 ${file} >analyze-${analyzedate}/chart-${tmpfile}
|
||||
# Chart Part End
|
||||
|
||||
for line in $(egrep "^${ANALYZE_TIME}" "$file" | grep -v ',,')
|
||||
@ -59,7 +59,7 @@ function analyze {
|
||||
f_market_performance=$(grep "^$time" data/botdata/MARKET_PERFORMANCE | tail -n1 | cut -d: -f4 | cut -d"%" -f1 | sed 's/ *//')
|
||||
echo "$line" >>${g_tmp}/${tmpfile}
|
||||
# Chart Part
|
||||
echo "$line,${f_market_performance},${f_score}" >>analyze-${analyzedate}/chart-${tmpfile}.csv
|
||||
echo "$line,${f_market_performance},${f_score}" >>analyze-${analyzedate}/chart-${tmpfile}
|
||||
# Chart Part End
|
||||
echo " ${line},${f_market_performance}" | perl -pe 's/([0-9].[0-9][0-9][0-9][0-9][0-9][0-9])[0-9]+/$1/g' | column -t -s, >>${g_tmp}/output-${tmpfile}
|
||||
if [ -f "${g_tmp}/open-${tmpfile}" ]
|
||||
@ -167,9 +167,10 @@ fi
|
||||
for file in $@
|
||||
do
|
||||
tmpfile=$(basename "${file}")
|
||||
g_echo "generating chart for $file"
|
||||
echo "<html>
|
||||
<head>
|
||||
if [ -s "analyze-${analyzedate}/chart-${tmpfile}" ]
|
||||
then
|
||||
g_echo "generating chart for $file from analyze-${analyzedate}/chart-${tmpfile}"
|
||||
echo "<html><head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
<link rel='stylesheet' type='text/css' href='../dabo/data/browser.css'>
|
||||
@ -179,13 +180,14 @@ do
|
||||
<body>
|
||||
<h1>analyze.sh ${ANALYZE_TIME}</h1>
|
||||
" >analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "Price, EMA, Levels" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 2,25,26,27,28,29,30,31,32,33,34,35,4,36,37,38,39 green,DarkSlateGrey,DarkSlateGrey,Gold,DarkOrange,DarkOrange,GoldenRod,GoldenRod,GoldenRod,GoldenRod,DarkOrange,DarkOrange,MidnightBlue,Indigo,DarkSlateBlue,DodgerBlue,DeepSkyBlue >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "MACD" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile}.csv 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "Price, EMA, Levels" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile} 500 2,25,26,27,28,29,30,31,32,33,34,35,4,36,37,38,39 green,DarkSlateGrey,DarkSlateGrey,Gold,DarkOrange,DarkOrange,GoldenRod,GoldenRod,GoldenRod,GoldenRod,DarkOrange,DarkOrange,MidnightBlue,Indigo,DarkSlateBlue,DodgerBlue,DeepSkyBlue >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "MACD" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile} 500 8,6,7 >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "RSIs" >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
genchart analyze-${analyzedate}/chart-${tmpfile} 500 10,11,12,14,15,16,17,13 >>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
echo "</body></html>">>analyze-${analyzedate}/chart-${tmpfile}.html
|
||||
fi
|
||||
done
|
||||
# Chart Part End
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user