Friday, April 19, 2013



Updates to model removed Trade and replace with TradePosition. So new model is:
Contract oneToMany TradePosition oneToMany TradeOrder
Tradestrategy oneToMany TradeOrder.
Note
1/ There can only ever be one TradePosition open at a time for a Contract.
2/ A TradePosition is created when at least one TradeOrder becomes filled/partially filled. The TradeOrder that caused the TradePosition to be created is marked as the opening TradeOrder.
3/ A TradePosition is closed when the totaly open quantity i.e. buy quantity - sell quantity equals zero. At this point the net value represents the P/L for the position.

Thursday, April 18, 2013

2.11_06 version out tomorrow new data model see below. Removed Trade table replaced with TradePosition so Tradestrategy creates oneToManat TradeOrder a TradeOrder may have One TradePosition that is for One Contract