if(Balance==Equity) or if (Balance!=Equity) means ?

 

what does if(Balance==Equity) means?and what did it will to our program.

 
Balance equals Equity when there are no open trades on any chart.
 
William Roeder:
Balance equals Equity when there are no open trades on any chart.

You can have open orders and open positions when balance == equity. 

 
nicholi shen: You can have open orders and open positions when balance == equity. 

Only theoretically — not actually. Don't confuse the younglings.

 
William Roeder:

Only theoretically — not actually. Don't confuse the younglings.

As a matter of fact -- very actually. As soon as the sum of all open positions is breakeven then balance will equal equity. If only one position is on then this could occur rather frequently. It's a terrible way to check for a state of no positions and it should never be used nor encouraged. 

 
nicholi shen:

As a matter of fact -- very actually. As soon as the sum of all open positions is breakeven then balance will equal equity. If only one position is on then this could occur rather frequently. It's a terrible way to check for a state of no positions and it should never be used nor encouraged. 

If it's rather frequent, can you post a screenshot of the MTx terminal with at least one open position and balance equal to equity?

 
William Roeder:

Only theoretically — not actually. Don't confuse the younglings.

Thanks .but also i need to know the meaning of {if(Equity==!Balance)}

and where we can use this phrase 

?

 
Drazen Penic:

If it's rather frequent, can you post a screenshot of the MTx terminal with at least one open position and balance equal to equity?

Piece of cake.


 
Mohammad Hoseini:

Thanks .but also i need to know the meaning of {if(Equity==!Balance)}

and where we can use this phrase 

?

That is broken syntax. What you originally posted was a conditional check to see if your account equity is equal to your account balance. It's of no use, don't use it. 

 
nicholi shen:

That is broken syntax. What you originally posted was a conditional check to see if your account equity is equal to your account balance. It's of no use, don't use it. 

Thanks a lot

 
Equity is simply Balance + Profit of All open trades (including swap and commission) 
So if u dont have any ipen trades balance==Equity 
However if we have open trades Balance==Equity can happe, but very unlikely, however if it happens at that moment it will be like you have no open positions. 


Balance!=Equity 
Bslance is not equal to Equity 
Reason: