public void Should_contain_risk_one_percent_smaller() { var moneyManagement = new MoneyManagement(1, 2000); double lot = moneyManagement.CalculateLotSize(200); Assert.AreEqual(0.1, lot); }
internal void CreatedMagicBoxFromPreviousCandle() { double asianSessionHigh = AsianSessionHigh; double asianSessionLow = AsianSessionLow; double slPoints = (asianSessionHigh - asianSessionLow) / Point + 2 * range; var moneyManagement = new MoneyManagement(2, Balance); double lotSize = moneyManagement.CalculateLotSize(slPoints); double tpPoints = Math.Max(1000 * Point, 2 * slPoints * Point); //var tpPoints = 200 * Point; // risk reward ratio = 2 * slPoints _buyOrder = PendingBuy(Symbol, lotSize, asianSessionHigh + range * Point, asianSessionLow - range * Point, asianSessionHigh + tpPoints); _sellOrder = PendingSell(Symbol, lotSize, asianSessionLow - range * Point, asianSessionHigh + range * Point, asianSessionLow - tpPoints); this.ObjectsDeleteAll(); }