Hi, If I understand the flow correctly - you decide on a trade in your onBookSnapshot() function inside your Strategy class. in that point you set the position member with a desired number. a little after that trade() function of PositionManager take the position member and decide of the quantity to trade (buy or sell)
int quantity = newPosition - position; 1. position means how many lots you'd like to buy? or is it the exact amount in $ of the position (I haven't seen in the code any reference to actual amount..) 2. If I want to do nothing in a snapshot cycle (not to trade) - just don't use setPosition() function ? (to get quantity=0 ?) - I saw that if I do setPosition(0) - it opens me more positions (quantity = 0 - position != 0 ....) - so I guess the right way is don't use the setPosition() function? Thanks -- 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.
