Also do I get it right that the Buying Power is calculated by using the net balance which already has the P&L of an open trade included and then it substracts the initial margin of the position when it was opened and adds/substracts the P&L again
No, the buying power in RightEdge is the amount of cash in your account, also referred to as the account balance or the current capital. Your buying power decreases when you open a position. Unless there is trading activity, the buying power does not change, regardless of what happens to the open P&L. When you close a position, the buying power will go back up, unless the position has lost more than the entry cost / margin requirement of the position.
So from RightEdge's point of view, the margin isn't an amount of cash that you need to keep in your account while the position is open. The margin leaves your account when you open a position, and is added back to your account when you close the position, together with any profit or loss. So:
Buying Power = Gross Balance
Current Equity = Initial Margin of Trade + Open Trade P&L
Total Account Value = Buying Power + Current Equity
Does that help clarify things?