I have some incomplete "multi-instrument-strategy" code that works in a very rough kind of way, but needs a complete redo because I use hashmaps EVERYWHERE, which sucks up a lot of time and memory. I'm not releasing it public yet (it's not super useful as it stands), but it exists on my "backburner" and I might be interested in partnering up with some more "cooks".
2009/8/14 HF Dave <[email protected]> > > > You can use this to get price and position of the other leg in JST: > > double otherInstrumentPrice = otherStrategy.getLastPriceBar().getClose(); > int otherInstrumentPos = otherStrategy.getPositionManager().getPosition(); > > > Eugene, is it also possible to modify the other legs variable remotely? > For example open a position in current strategy and then open a hedge in > the > second leg strategy by setting its position variable? > > As of now, my hedge leg is watching positions the main leg takes and hedge > it > on its own. This may sometimes lead to 1 interval long delays between > opening > the main and the hedge leg. It is still better that encoding a copy > of "logic" into the hedge leg's code because it cause position > discrepancies. > > Btw, how to get a strategy ID? I suppose they get numbers on JST startup > (from > up to down) so I use a hard coded number now. > > Dave > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JBookTrader" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jbooktrader?hl=en -~----------~----~----~----~------~----~------~--~---
