Questions about the lot library from codebase

To add comments, please log in or register
Raphael Schwietering
9031
Raphael Schwietering  

Hello,

i have a question. I found that lot calculation in https://www.mql5.com/en/code/viewcode/7749/105580/lot_lib.mqh


Can someone explain me this?


lot = _AccountBalance * 0.01 / iATR( Symbol(), Period(), 20, 1 ) / lotcost * 4 * Point;

is this the same as i tried to use in my ea?


int margin=(int) MarketInfo(_Symbol,MODE_MARGINREQUIRED);

lot = AccountBalance() * 0.10 / iATR( Symbol(), Period(),20, 1 ) / margin * 4 * _Point; 

Whats here the * 0.10 ? 10% from AccountBalance i think!?

What the *4*_Point? For What is this 4 standing?

To add comments, please log in or register