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 -~----------~----~----~----~------~----~------~--~---
