Defender1 and Defender2 have an exit, in a traditional sense. That is, they normally enter a position, exit, and then waits for the next entry. The rest of the strategies are always in the market, either long and short. Note that JBT only supports market orders. However, it should be fairly straightforward to accomplish the effect of a stop order with a market order. Since the onBookSnapshot() method of the strategy is invoked every second, you can track the loss in there and have your strategy close its current position when the loss exceeds a certain amount of certain number of points. Same thing applies to trailing stop and limit orders.
In regards to the use of "classic" strategies, JBT has a good optimizer, and as many people (including myself) have discovered, adding a stop loss to a strategy almost never improves the strategy. This is, of course, in direct contradiction with all the recommendations made by all the trading gurus, courses, and papers, so it's really up to you to verify the claims. On Jun 1, 7:25 pm, Keith <[email protected]> wrote: > Hi, > > It was mentioned somewhere in the discussions that classic strategy > model has price targets and stop loss embedded in it. The current > version does not have a strategy called "classic" and at first glance, > I could not find it in any of the 7 example strategies. Is position > management done in other classes, if yes, which classes should I > study? > > Thanks. > > Keith -- 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.
