Adjust price for 1DTE and fix wrong days out value in auto-trader for SPY
This commit is contained in:
@@ -74,7 +74,7 @@ priceOffset=0.00 # try to get a little better price
|
|||||||
# 2) Round to the Coloses full number
|
# 2) Round to the Coloses full number
|
||||||
# 3) Divide by 20
|
# 3) Divide by 20
|
||||||
priceOpen=$(echo "scale=2; exact=((${shortBidC}+${shortAskC})/2) + ((${shortBidP}+${shortAskP})/2) - ((${longBidC}+${longAskC})/2) - ((${longBidP}+${longAskP})/2) + ${priceOffset}; scale=0; round5=exact*20/1; scale=2; round5/20" | bc)
|
priceOpen=$(echo "scale=2; exact=((${shortBidC}+${shortAskC})/2) + ((${shortBidP}+${shortAskP})/2) - ((${longBidC}+${longAskC})/2) - ((${longBidP}+${longAskP})/2) + ${priceOffset}; scale=0; round5=exact*20/1; scale=2; round5/20" | bc)
|
||||||
priceOpen=4.85 # All nice calculating a price, but I want those to be filled and reasonably, they will (hopefully) be filled at 485
|
priceOpen=4.80 # All nice calculating a price, but I want those to be filled and reasonably, they will (hopefully) be filled at 475
|
||||||
|
|
||||||
orderJson=$(jq -c <<-EOM
|
orderJson=$(jq -c <<-EOM
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ IFS=$'\0'
|
|||||||
. helpers.sh
|
. helpers.sh
|
||||||
|
|
||||||
daysOutMin=87
|
daysOutMin=87
|
||||||
daysOutMax=95
|
daysOutMax=91
|
||||||
deltaMin=0.35
|
deltaMin=0.35
|
||||||
deltaMax=0.40
|
deltaMax=0.40
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user