Add number of days to look back to the getting of the orders; use in 1DTE trade

This commit is contained in:
2024-08-29 15:50:22 -05:00
parent d9c479af18
commit 51b4d17cd7
2 changed files with 16 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ longSymbolC=$(jq -r '.symbol' < temp/longLegC.json)
log "Long Symbol: _${longSymbolC}_ Strike: _${longStrikeC}_ Bid: _${longBidC}_ Ask: _${longAskC}_" info
#Check if this order has already been submitted.
./getOrders.sh | (grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} || true) > temp/existingOrders.${myPID}
./getOrders.sh -daysBack 1 | (grep '\(WORKING\|FILLED\),'${longSymbolC:0:12} || true) > temp/existingOrders.${myPID}
if [[ $(wc -l < temp/existingOrders.${myPID}) -eq 0 ]];then
log "Not Yet traded, continuing" info