buy price fix
This commit is contained in:
parent
05f1f2ea94
commit
9f9b236c61
@ -21,7 +21,7 @@ function check_sell_conditions {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
f_TRADE_HIST_FILE_INTERIM=$(echo ${f_TRADE_HIST_FILE} | sed 's/-open\.history\.csv$/-interim.history.csv/')
|
f_TRADE_HIST_FILE_INTERIM=$(echo ${f_TRADE_HIST_FILE} | sed 's/-open\.history\.csv$/-interim.history.csv/')
|
||||||
local f_BUY_PRICE=$(grep ',BUY' $f_TRADE_HIST_FILE | tail -n1 | cut -d, -f5)
|
local f_BUY_PRICE=$(grep -i ',BUY,' $f_TRADE_HIST_FILE | tail -n1 | cut -d, -f5)
|
||||||
local f_BUY_PRICE_LAST_RATE_DIFF=$(g_percentage-diff ${f_BUY_PRICE} ${f_price})
|
local f_BUY_PRICE_LAST_RATE_DIFF=$(g_percentage-diff ${f_BUY_PRICE} ${f_price})
|
||||||
# Store for overview
|
# Store for overview
|
||||||
echo ${f_BUY_PRICE_LAST_RATE_DIFF} >DIFF_BUY_PRICE_${f_ASSET}
|
echo ${f_BUY_PRICE_LAST_RATE_DIFF} >DIFF_BUY_PRICE_${f_ASSET}
|
||||||
|
@ -192,7 +192,7 @@ function webpage {
|
|||||||
# local f_trade_date=${trade[3]}
|
# local f_trade_date=${trade[3]}
|
||||||
# local f_trade_currency=${trade[1]}
|
# local f_trade_currency=${trade[1]}
|
||||||
# local f_trade_sell_for=${trade[6]}
|
# local f_trade_sell_for=${trade[6]}
|
||||||
# local f_trade_buy_for=$(grep -B1 "^${f_trade_date},sell," "trade-histories/${f_trade_currency}.history.csv" | grep ",buy," | cut -d, -f4 | cut -d" " -f1)
|
# local f_trade_buy_for=$(grep -B1 "^${f_trade_date},sell," "trade-histories/${f_trade_currency}.history.csv" | grep -i ",buy," | cut -d, -f4 | cut -d" " -f1)
|
||||||
# local f_result=$(echo "scale=2; ${f_trade_sell_for}-$f_trade_buy_for" | bc -l | sed 's/^\./0./; s/^-\./-0./' | xargs printf "%.2f")
|
# local f_result=$(echo "scale=2; ${f_trade_sell_for}-$f_trade_buy_for" | bc -l | sed 's/^\./0./; s/^-\./-0./' | xargs printf "%.2f")
|
||||||
# local f_result_percentage=$(g_percentage-diff $f_trade_buy_for ${f_trade_sell_for})
|
# local f_result_percentage=$(g_percentage-diff $f_trade_buy_for ${f_trade_sell_for})
|
||||||
# f_trace_price="$f_trace_price ($f_result( ${f_result_percentage}%))"
|
# f_trace_price="$f_trace_price ($f_result( ${f_result_percentage}%))"
|
||||||
|
Loading…
Reference in New Issue
Block a user