Keith Watford:
You make accountBalance to equal AccountBalance()
then check whether they are not equal.
That doesn't make sense.
Thanks a lot Keith, I wrote ' accountBalance = AccountBalance();' at the wrong place, now it's working fine
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good day,
I want to be notified of any change in account balance so I made a function that is called on every tick and checks if there is any difference in account balance between consecutive ticks.
The function is then suppose to send a push notification on mobile device but no notification is sent when I open random trades and close them so I cause a decrease in the account balance.
See the code below. All variables are type double, and I have tested the push ID in tools>options>notifications to be working fine, even with the default trade notifications
What am I doing wrong? or is there another simpler alternative? I do not want the default trade notifications because I am only interested in the change in account balance, at least for now
Thanks in advance for your help