This is what the manual says about WinTotal
"Sum of profits of all trades won so far. When oversampling or phantom trades are used, WinLong or WinShort can be higher than WinTotal."
Sounds to me like that will never be less than zero
Ok I see:
I've changed it to
if (WinValTotal <= 0*PIP)
I'll test it when the market opens.
Thanks for your assistance so far.