output if dontt sell while buy condition met
This commit is contained in:
parent
8d4b6a0b71
commit
191b90a694
@ -17,7 +17,7 @@ function check_sell_conditions {
|
||||
f_TRADE_HIST_FILE="$(ls -1tr trade-histories/trade-*${f_ASSET}-open.history.csv | tail -n1)"
|
||||
if ! [ -s "${f_TRADE_HIST_FILE}" ]
|
||||
then
|
||||
g_echo_note "SELL ${f_ASSET}: No trade history file (${f_TRADE_HIST_FILE}) found - ignoring"
|
||||
g_echo_note "${f_echo_prefix}No trade history file (${f_TRADE_HIST_FILE}) found - ignoring"
|
||||
return 0
|
||||
fi
|
||||
f_TRADE_HIST_FILE_INTERIM=$(echo ${f_TRADE_HIST_FILE} | sed 's/-open\.history\.csv$/-interim.history.csv/')
|
||||
@ -39,7 +39,11 @@ function check_sell_conditions {
|
||||
|
||||
|
||||
# Check for filled buy conditions - if filled don't sell
|
||||
check_buy_conditions ${f_ASSET_HIST_FILE} SELL || return 0
|
||||
if ! check_buy_conditions ${f_ASSET_HIST_FILE} SELL
|
||||
then
|
||||
g_echo_note "${f_echo_prefix}Buy-Conditions met - Dont Sell"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# run strategies
|
||||
local f_strategy_path=../../strategies
|
||||
|
Loading…
Reference in New Issue
Block a user