How does the persistency feature work and what is supported?

Jesse supports persistency. What persistency means, in this case, is that you can stop Jesse, and start it at a later time without losing your positions and orders.

You can also disable the persistency feature in the settings:

settings-persistency

By disabling the persistency feature, Jesse will close any open position or order both at the start and termination of each live trading session.

For Jesse to be able to continue a new session after previously terminating it, Jesse depends on the exchange to fetch the positions, orders, etc. That means any data that was used in your strategy but isn't available in the exchange will be lost.

To make things clearer, here are a couple of examples of known cases which are not supported:

  • Unsupported order types: Existing STOP-LIMIT orders, or any other order types that Jesse doesn't support (Jesse uses STOP-MARKET orders). So if you try to manually submit a STOP-LIMIT order, as a way to force it into Jesse, it won't work.
  • Simultaneous buy and sell ENTRY orders: you cannot submit both buy and sell entry orders. Because Jesse only supports entering long or short positions at a time.
  • Queued limit orders: queued orders are not supported because they aren't really submitted to the exchange.
  • Stop order cancellation at FTX: Unfortunately, FTX doesn't offer Websocket streams for stop orders which is unbelievable! As a result, if you are running a live session with Jesse, and then submit/cancel a stop order manually on the exchange, Jesse won't pick up on that because FTX isn't streaming it at all 😕. (stop orders are supported when Jesse submits the order itself by itself because then their REST API is used).
  • Using custom variables: If you used a custom-defined variable in your strategy, or even use Jesse's built-in self.vars property, the data in it is lost after stopping the session. Although, I will probably improve the self.vars property to be stored somewhere so you can use it in a way that is supported for the persistency feature. But there will be no way at all to do that if you're using a custom-defined variable in your strategy class.
Last updated: 2 years ago