Update docs to also work for postgres
This commit is contained in:
parent
9005cd25b8
commit
5ab8cc56a4
@ -653,7 +653,7 @@ The following example queries for the current pair and trades from today, howeve
|
|||||||
if self.config['runmode'].value in ('live', 'dry_run'):
|
if self.config['runmode'].value in ('live', 'dry_run'):
|
||||||
trades = Trade.get_trades([Trade.pair == metadata['pair'],
|
trades = Trade.get_trades([Trade.pair == metadata['pair'],
|
||||||
Trade.open_date > datetime.utcnow() - timedelta(days=1),
|
Trade.open_date > datetime.utcnow() - timedelta(days=1),
|
||||||
Trade.is_open == False,
|
Trade.is_open.is_(False),
|
||||||
]).order_by(Trade.close_date).all()
|
]).order_by(Trade.close_date).all()
|
||||||
# Summarize profit for this pair.
|
# Summarize profit for this pair.
|
||||||
curdayprofit = sum(trade.close_profit for trade in trades)
|
curdayprofit = sum(trade.close_profit for trade in trades)
|
||||||
@ -719,7 +719,7 @@ if self.config['runmode'].value in ('live', 'dry_run'):
|
|||||||
# fetch closed trades for the last 2 days
|
# fetch closed trades for the last 2 days
|
||||||
trades = Trade.get_trades([Trade.pair == metadata['pair'],
|
trades = Trade.get_trades([Trade.pair == metadata['pair'],
|
||||||
Trade.open_date > datetime.utcnow() - timedelta(days=2),
|
Trade.open_date > datetime.utcnow() - timedelta(days=2),
|
||||||
Trade.is_open == False,
|
Trade.is_open.is_(False),
|
||||||
]).all()
|
]).all()
|
||||||
# Analyze the conditions you'd like to lock the pair .... will probably be different for every strategy
|
# Analyze the conditions you'd like to lock the pair .... will probably be different for every strategy
|
||||||
sumprofit = sum(trade.close_profit for trade in trades)
|
sumprofit = sum(trade.close_profit for trade in trades)
|
||||||
|
Loading…
Reference in New Issue
Block a user