Hi Mike,
Thanks your answer. I can see where I was thrown off.
The user settings confirm my observation that the stop is working on the balance DD is correct, as stated in the user guide:
Draw-down %
The % value of your account balance before the robot hard-stops and closes all your winning and losing positions.
Account balance £1000
5% Drawdown stop
When all open trades, both winning and losing, cause a 5% of balance drawdown or £50
The robot stops, and all open trades close
The final balance is £950
My confusion arose by the fact that in my Smart Grid parameters, the panel heading for these settings is entitled "Equity Drawdown Stop", not "Drawdown Stop" which is the term used in the online user guide. The word "Equity" made me think the calc should be based on account equity, vs account balance. If the heading had been titled "Balance Drawdown Stop" it would have made more sense to me.
In thinking further about this, I think if I wrote similar code, I would use the lesser of acct balance and acct equity to do the calc. This it seems to me would be the more conservative calc.