Interesting. I missed that this exists.
Thus, when running into this problem, I introduced code into JBT for 
recognizing the rejected orders and if an order is rejected the strategy is 
disabled.  (Only the single strategy as different strategies with different 
base instruments may have different margin requirements). 
When a position is closed, the disabled strategies are reenabled. 
This is a bit more fine-grained approach. 
If there  is interest, I can share this code. 

However, I think one would be able to give an amount of money that should 
remain as non-margined capital in the account, after a given trade would be 
executed. But this seems to be far from trivial.

Klaus

Am Freitag, 19. April 2013 14:52:39 UTC+2 schrieb Eugene Kononov:
>
> Yes, this should be improved. The best thing for now is to avoid running 
> too many strategies if you are close to margin call.
>
>
> On Fri, Apr 19, 2013 at 4:18 AM, Borg Alexander 
> <[email protected]<javascript:>
> > wrote:
>
>> In ProtfolioManager.java, there are two adjustable settings:
>>  
>> *
>>
>> MAX_SHORT_STRATEGIES = 4
>>
>> MAX_LONG_STRATEGIES = 4
>> *
>>
>> With these settings, you can avoid order rejections because of margin 
>> requirements not met.
>>
>> Yesterday I had the condition of 4 active long positions and the fifth 
>> long strategy kicked in with 'Position set to 1' but did send an order 
>> submission because of the above settings. This is how it should be.
>>
>> The condition 'Position set to 1' for the fifth strategy is set on hold 
>> by JBookTrader until on of the 4 active positions is closed. When that 
>> happens, an oder for the fifth strategy is generated although at that time 
>> the condition to enter a position for that fifth strategy is most probably 
>> no longer valid. Exactly that happened to me yesterday, where the fifth 
>> strategy kicked in way too late when the third strategy closed its position 
>> and freed one slot.
>>
>> It can be handled this way but I would suggest such 
>> conditions be simply ignored instead of set on hold.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "JBookTrader" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/jbooktrader?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jbooktrader?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to