>
>
> What I want to do is to make my strategy to be aware of current trade
> profit/loss?
>
>
There is no built-in functionality for this. However, it would be
straightforward to implement in the strategy:
double lastFillPrice = getPositionManager().getAvgFillPrice();
double currentPrice = this.getMarketBook().getSnapshot().getPrice();
Now that you have the last fill price and current price, you can figure out
the current trade P&L.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---