Implementing STOPMARKET orders in a HEDGING environment. #1399
paulhwatson
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone. I'm looking for some advice. I am writing an adapter for the IG Index platform. It is a HEDGING system.
It recognises only two order types (MARKET, WORKING). Opening and closing market positions has been achieved. The IG MARKET order API has options for setting STOPS, LIMITS and TRAILINGS. My design problem is that I would like to implement STOPS with just one call to the API. I can use Nautilus MARKETORDER to create a position but I need to add a separate nautilus STOPORDER passing it the position previously created. This seems to be a little longwinded (2 API calls) but it keeps strategies separate from the adapter. The other option is to pass info as tags which doesn't seem great. It doesn't seem like the best fit for STOPMARKET orders as the adapter has to do some work to 'adapt it'.
I was wondering whether to implement a new order type for this situation. Any ideas...
Beta Was this translation helpful? Give feedback.
All reactions