Page 1 of 2

Cross instrument trading pair

Posted: Mon Jul 29, 2019 9:11 am
by SuperDriveGuy
Hi,
  Whilst trading the cross instrument trading pair, the api plugin escape seems to be using the data of the "minor" instrument.

  These plugins need to enabled on a instrument basis, so If one enables it on the "major" instrument, it does NOT get applied to the "minor" one. if one enables this api on the "minor" instrument, this works, but uses the data of the "minor" instrument.

The expected behaviour would be that "in a cross instrument trading pair, the api would move the limit orders on the "minor" instrument based on the data from the "major" instrument.

   Please advice.


Thanks

Re: Cross instrument trading pair

Posted: Wed Jul 31, 2019 3:08 pm
by Andry API support
Hi SuperDriveGuy,
we'll check it out

Re: Cross instrument trading pair

Posted: Wed Aug 07, 2019 10:03 am
by SuperDriveGuy
Hi AndreyR,
    Did you manage to see the issue I was highlighting?
Thanks

Re: Cross instrument trading pair

Posted: Fri Aug 09, 2019 9:42 am
by Andry API support
Hi SuperDriveGuy,
although the issue exists I am not sure if it will be fixed soon because there are higher priority issues. if it's blocking you, you may want to fix it yourself. Start from this class
https://github.com/BookmapAPI/DemoStrat ... ategy.java

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 9:20 am
by SuperDriveGuy
Hi AndreyR,
  Thanks for the feedback.

  I am aware of the strategies use and their code, what I don't know is  "How to use the data from one instrument, to place trades on another instrument".

  If you can point me towards a code snippet or example, it will be much appreciated!

Thanks

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 9:26 am
by SuperDriveGuy
    I am aware that this strategy has no idea about cross instrument trading, and that was my question. Since it is available in a cross-instrument trading context, it seems odd that its not applied. The reason for raising this support ticket was to find out how to go about making it "cross-instrument" aware, if you will. Since I can trade cross-instrument, where I am clicking on the "major" instrument", but the trades are being placed in the "minor" instrument. there must be some  code or api I can call. Any help is much appreciated. Thanks

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 2:58 pm
by Andry API support
Hi SuperDriveGuy,
I can prevent using 'minor' instrument's data by unticking the 'Enabled for [minor instrument]' box in the 'Enable' section of the Escape strategy for the 'minor' instrument tab (activating Escape strategy for a cross-trading pair ticks both boxes in by default in my case).
Let me know if that partially solves the issue for you.

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 7:45 pm
by SuperDriveGuy
Thanks AndreyR,

  Much appreciated. I have "unchecked" the "enable" for the minor instrument. I will confirm, how I get along.

Regards

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 8:10 pm
by SuperDriveGuy
Hi AndreyR,
  I tried this on replay and it does NOT move/cancel the order for the "minor" instrument. I tried the same replay(same date/time) for the "major" and it works fine ie moves/cancels the order.

  In your example you should confirm whether the order was placed in the "major" or "minor" instrument. I also noticed in your example, cross pair trading in NOT enabled i.e. the "cross pair trading" has not been "START"ed.
Thanks

Re: Cross instrument trading pair

Posted: Tue Aug 13, 2019 8:57 pm
by Andry API support
I also noticed in your example, cross pair trading in NOT enabled
That's because there was the 'minor' MESU9 instrument tab active.
EDITED: sorry for a misconception from my side
Thank you for your remarks.