Fix account in autotrader; don't include the strike price in checking for existing order.

This commit is contained in:
2024-08-22 12:22:04 -05:00
parent ea050ab12a
commit 917703386d

View File

@@ -41,14 +41,16 @@ systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
echo "${msg}"
#Check if this order has already been submitted.
./getOrders.sh | (grep '\(WORKING\|FILLED\),\('${longSymbol}'\|'${shortSymbol}'\)' || true) > temp/existingOrders.${myPID}
./getOrders.sh | (grep '\(WORKING\|FILLED\),'${longSymbol:0:12} || true) > temp/existingOrders.${myPID}
if [[ $(wc -l < temp/existingOrders.${myPID} -eq 0 ]];then
if [[ $(wc -l < temp/existingOrders.${myPID}) -eq 0 ]];then
msg="Not Yet traded, continuing"
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
echo ${msg}
else
msg="Already traded, exiting"
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
echo ${msg}
exit 0
fi