Correction in /source/com/jbooktrader/platform/strategy/Strategy.java

46 views
Skip to first unread message

andaluzo

unread,
Nov 9, 2011, 2:11:45 PM11/9/11
to JBookTrader
Hi,

we are developing some projects round jbooktrader and wanted to
mention

in /source/com/jbooktrader/platform/strategy/Strategy.java

Line 167

performanceManager.updatePositionValue(marketSnapshot.getPrice(),
positionManager.getCurrentPosition());

to change in

this.getPerformanceManager().updatePositionValue(marketSnapshot.getPrice(),
this.getPositionManager().getCurrentPosition());

this will help for object orientated coding and to implement (inject)
a own performance manger.

and also a big thank you for the existing development keep up with the
good work

andaluzo

unread,
Nov 9, 2011, 3:11:20 PM11/9/11
to JBookTrader
While digging deeper in /source/com/jbooktrader/platform/strategy/
Strategy.java

there are some more changes

// inject custom performance manager and position manager here
// see also /source/com/jbooktrader/platform/strategy/
Strategy.java
// lines 167ff
// the method "process" needs to make use of the getter for
position and performance manager
// ->
this.getPerformanceManager().updatePositionValue(marketSnapshot.getPrice(),
this.getPositionManager().getCurrentPosition());
// lines 156 ff
// -> this.getPositionManager().trade();
// lines 76 ff
// -> if (this.getPositionManager().getCurrentPosition() != 0)
{
// -> this.getPositionManager().trade();
// lines 68 ff
// -> this.getPositionManager().setTargetPosition(position);
Reply all
Reply to author
Forward
0 new messages