Fix account in autotrader; don't include the strike price in checking for existing order.
This commit is contained in:
@@ -41,14 +41,16 @@ systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
|
|||||||
echo "${msg}"
|
echo "${msg}"
|
||||||
|
|
||||||
#Check if this order has already been submitted.
|
#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"
|
msg="Not Yet traded, continuing"
|
||||||
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
|
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
|
||||||
|
echo ${msg}
|
||||||
else
|
else
|
||||||
msg="Already traded, exiting"
|
msg="Already traded, exiting"
|
||||||
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
|
systemd-cat -t "`basename $0` $1" -p info <<< ${msg}
|
||||||
|
echo ${msg}
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user