Advertisement
Guest User

Untitled

a guest
Aug 29th, 2019
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. double CalculateLotSize(double riskedPoints) {
  2. double riskedAmount = percentageRisk/AccountBalance();
  3. return riskedAmount/riskedPoints;
  4.  
  5. }
  6. void TakeTrade() {
  7.  
  8. double DiffInPoints = MathAbs(NormalizeDouble(entryPrice-stopLossPrice,Digits)/Point);
  9. double lotBasedOnAccountSize = CalculateLotSize(DiffInPoints);
  10. double lotSizeToUse = NormalizeLotsToTRADE(lotBasedOnAccountSize);
  11. Print("original lot size = ", lotBasedOnAccountSize);
  12. Print("normalized lot size to use = ", lotSizeToUse);
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement