tailwind #9
6
main.py
6
main.py
@ -88,9 +88,11 @@ def on_new_tick(event: Event, status: SymbolStatus):
|
||||
def pos_to_json(pw: PositionWrapper):
|
||||
return {
|
||||
"id": pw.position.id,
|
||||
"base_price": pw.position.base_price,
|
||||
"state": str(pw.state()),
|
||||
"symbol": pw.position.symbol,
|
||||
"profit_loss": pw.position.profit_loss,
|
||||
"profit_loss_percentage": pw.position.profit_loss_percentage
|
||||
"profit_loss": pw.net_profit_loss(),
|
||||
"profit_loss_percentage": pw.net_profit_loss_percentage()
|
||||
}
|
||||
|
||||
tick = event.tick
|
||||
|
Loading…
Reference in New Issue
Block a user