getting closing balance value (year closing)

This is the code to retrieve the value of opening balance

periodEnd = fromDate -1;

ledgerBalance = new LedgerBalanceSum_CurrentMST(periodStart,
periodEnd,
dimensionCriteriaEmpty,
NoYes::No,
NoYes::Yes,
NoYes::Yes,
OperationsTax::Current,
DebCredProposal::None,
NoYes::Yes,
NoYes::Yes);

I want to take the value of the closing years, Anyone have a solution?