removed debug flag since it created another thread. tacci tua. updating trailing stop on every state
This commit is contained in:
parent
4211f9ede0
commit
2d5214d34d
11
main.py
11
main.py
@ -94,13 +94,8 @@ async def on_close_position(event: Event, _):
|
||||
await bot.close_position(event.metadata.position_id)
|
||||
|
||||
|
||||
@btc_eh.on_position_state(PositionState.PROFIT)
|
||||
async def on_state_min_profit(pw: PositionWrapper, ss: SymbolStatus):
|
||||
await strategy.update_stop_percentage(pw, ss)
|
||||
|
||||
|
||||
@btc_eh.on_position_state(PositionState.MINIMUM_PROFIT)
|
||||
async def on_state_min_profit(pw: PositionWrapper, ss: SymbolStatus):
|
||||
@btc_eh.on_any_position_state()
|
||||
async def on_any_state(pw: PositionWrapper, ss: SymbolStatus):
|
||||
await strategy.update_stop_percentage(pw, ss)
|
||||
|
||||
|
||||
@ -125,4 +120,4 @@ def on_any_event(event: Event, _):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
socketio.run(app, debug=True)
|
||||
socketio.run(app)
|
||||
|
Loading…
Reference in New Issue
Block a user