closed trade chart cache

This commit is contained in:
olli 2023-10-22 16:03:20 +02:00
parent 82fbaedebe
commit 6a19752f55

View File

@ -223,13 +223,17 @@ function webpage {
local tradeintervals=$(cat ${interimfile} | wc -l) local tradeintervals=$(cat ${interimfile} | wc -l)
head -n1 asset-histories/${asset}.history.csv >${g_tmp}/trade.csv head -n1 asset-histories/${asset}.history.csv >${g_tmp}/trade.csv
grep -A ${tradeintervals} "${tradedatebuy}:" asset-histories/${asset}.history.csv >>${g_tmp}/trade.csv grep -A ${tradeintervals} "${tradedatebuy}:" asset-histories/${asset}.history.csv >>${g_tmp}/trade.csv
echo "Price, EMA, Levels" >>../index.html.tmp # cache old trade charts
genchart "${g_tmp}/trade.csv" ${tradeintervals} 2,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 >>../index.html.tmp if ! [ -s "${interimfile}.chart" ]
echo "MACD" >>../index.html.tmp then
genchart "${g_tmp}/trade.csv" ${tradeintervals} 8,6,7 >>../index.html.tmp echo "Price, EMA, Levels" >${interimfile}.chart
echo "RSIs" >>../index.html.tmp genchart "${g_tmp}/trade.csv" ${tradeintervals} 2,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 >>${interimfile}.chart
genchart "${g_tmp}/trade.csv" ${tradeintervals} 10,11,12,14,15,16,17,13 >>../index.html.tmp echo "MACD" >>${interimfile}.chart
genchart "${g_tmp}/trade.csv" ${tradeintervals} 8,6,7 >>${interimfile}.chart
echo "RSIs" >>${interimfile}.chart
genchart "${g_tmp}/trade.csv" ${tradeintervals} 10,11,12,14,15,16,17,13 >>${interimfile}.chart
fi
cat "${interimfile}.chart" >>../index.html.tmp
echo "</details></td></tr>" >>../index.html.tmp echo "</details></td></tr>" >>../index.html.tmp
else else
echo "</tr>" >>../index.html.tmp echo "</tr>" >>../index.html.tmp