Due to substantial generation and demand fluctuations in standalone green microgrids, energy management strategies are becoming essential for the power sharing and voltage regulation purposes. The classical energy management strategies employ the maximum power point tracking (MPPT) algorithms and rely on batteries in case of possible excess or deficit of energy. However, in order to realize constant current-constant voltage (IU) charging regime and increase the life span of batteries, energy management strategies require being more flexible with the power curtailment feature. In this paper, a coordinated and multivariable energy management strategy is proposed that employs a wind turbine and a photovoltaic array of a standalone DC microgrid as controllable generators by adjusting the pitch angle and the switching duty cycles. The proposed strategy is developed as an online nonlinear model predictive control (NMPC) algorithm. Applying to a sample standalone dc microgrid, the developed controller realizes the IU regime for charging the battery bank. The variable load demands are also shared accurately between generators in proportion to their ratings. Moreover, the DC bus voltage is regulated within a predefined range, as a design parameter.