Add more hooks to active management
This commit is contained in:
@@ -53,7 +53,9 @@ def within_max_loss(strategy):
|
||||
|
||||
|
||||
def within_trends(strategy, symbol, direction):
|
||||
print("WITHIN TRENDS", symbol, direction)
|
||||
if strategy.trend_signals.exists():
|
||||
print("TREND SIGNALS EXIST")
|
||||
if strategy.trends is None:
|
||||
log.debug("Refusing to trade with no trend signals received")
|
||||
sendmsg(
|
||||
@@ -82,6 +84,9 @@ def within_trends(strategy, symbol, direction):
|
||||
else:
|
||||
log.debug(f"Trend check passed for {symbol} - {direction}")
|
||||
return True
|
||||
else:
|
||||
log.debug("No trend signals configured")
|
||||
return True
|
||||
|
||||
|
||||
def within_position_size(strategy):
|
||||
|
||||
Reference in New Issue
Block a user