def get_position_size(insert, risk_per_unit):
    """Returns number of items you can buy with the given insert at the
    given risk.

    Example:
    If you have an max insert to 10$ which you can afford to loose and
    the risk per unit (calculated from the current unit price and its
    stop loss price) is 1$ you can buy 10 units.

    :insert: Max amount of money you set at risk to loose.
    :risk_per_unit: Amount the buy/sell price can raise/fall per unit.
    :returns: Number of units you can buy.
    """
    return insert / risk_per_unit
