Balance


Summary

Returns the balance of the current account.

Syntax

public double Balance{ get; }

Example 1

double balancebefore;
double balanceafter;
protected override void OnStart()
{
   // store the balance upon start up of the robot
   balancebefore = Account.Balance;
}
protected override void OnStop()
{
    // Store the balance upon stop of the robot.
    balanceafter = Account.Balance;
    // print the difference
	Print("The difference of balancebefore and balanceafter is: {0}", balancebefore-balanceafter);
}

Example 2

if ( Account.Balance < 0 )
    Stop();