The math is killing me!

 

I'm trying to port trading methods to MT4 for semi-automation. I am having trouble figuring out the math behind having it figure out lot size ( especially for the EURJPY). Basically, I don't want to risk any more than 10% on any basket of trades. Each basket can hold a possible of two trades, the first being a third of what's available in that basket (first trade opens, when that trade is profitable a trade double that size is opened in the same direction). I don't need all the answers, mind you, just a starting point on how to figure out lot size based on available equity. Can anyone help?


OuyNG