Store the value using Global Variables. Retrieve it when needed.
dolar:
Hello Guys,
Do you know any solution which allows save to an array:
- an account balance (as balance1) before trade and
- an account balance (as balance2) after trade?
How to check AccountBalance() every time when OrdersHistoryTotal() changes?
Thanks.
Hello Guys,
Do you know any solution which allows save to an array:
- an account balance (as balance1) before trade and
- an account balance (as balance2) after trade?
How to check AccountBalance() every time when OrdersHistoryTotal() changes?
Thanks.
static int previousHistoryTotal=0; if(OrdersHistoryTotal()!=previousHistoryTotal) { // Check your account balance ... previousHistoryTotal=OrdersHistoryTotal(); }
using OrdersHistoryTotal can be a problem unless you make sure you selected to show all history
Its got even worst when there are brokers that truncate the order history.
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
Do you know any solution which allows save to an array:
- an account balance (as balance1) before trade and
- an account balance (as balance2) after trade?
How to check AccountBalance() every time when OrdersHistoryTotal() changes?
Thanks.