Need your help with the code for the following rule
The EA choose the minimum of 2 lot sizes: the first lot size calculated using a risk factor of 2.5% (Lot size = (Free Margin * Risk Factor = 2.5%) / (SL * Point Value), the second lot size use the current count of executed orders-- example:
- EA Trading Start Date = 01/01/2009
- # of orders since 01/01/2009 = 6 orders (please note # of orders is based on group order not individual order): when the EA place the first order it will open a new order group (order group can be single order or many orders) until it close the order group.
- Current estimated lot size = 6 + 1 = 7 Lots