accoount balance history

To add comments, please log in or register
Daniel Bouchard
55
Daniel Bouchard  

how to get the account balance of the last 10 trades?


thank you

GrumpyDuckMan
839
GrumpyDuckMan  

Hello friend,

View/Terminal/Account History. Right click. then custom period

Daniel Bouchard
55
Daniel Bouchard  

thank you for your answer.  Now how can I get that information in metaeditor?  I know accountbalance() but its only the current balance can I get the past history of my accountbalance() for the last 10 trades?


thank you.

GrumpyDuckMan
839
GrumpyDuckMan  

Hello friend,

I'm not sure I understand correctly, you know your balance and equity before the first order is placed, right?

AccountBalance()
AccountEquity()
AccountProfit()

So record[] balance before the first order is made. After you place the first order record the equity[] and repeat the process.

Sorry not sure if that helped, or total waste of time.

Adiasa
175
Adiasa  
Daniel Bouchard:

thank you for your answer.  Now how can I get that information in metaeditor?  I know accountbalance() but its only the current balance can I get the past history of my accountbalance() for the last 10 trades?


thank you.

I think you can't have for AccountBalance() for history trades. The solution might be every you put an order, put your balance in comment. Then to check your "AccountBalance()" history, just read the their OrderComment()
Daniel Bouchard
55
Daniel Bouchard  
GrumpyDuckMan:

Hello friend,

I'm not sure I understand correctly, you know your balance and equity before the first order is placed, right?

So record[] balance before the first order is made. After you place the first order record the equity[] and repeat the process.

Sorry not sure if that helped, or total waste of time.

thanks,  how do you record AccountBalance()?
Daniel Bouchard
55
Daniel Bouchard  
Adiasa:
I think you can't have for AccountBalance() for history trades. The solution might be every you put an order, put your balance in comment. Then to check your "AccountBalance()" history, just read the their OrderComment()

how do youput your account balance in the comment?

Adiasa
175
Adiasa  
Daniel Bouchard:

how do youput your account balance in the comment?

string  symbol = "EURUSD";
int     cmd = OP_BUY;
double  lot = 0.1;
double  price = MarketInfo(symbol, MODE_ASK);
int     slippage = 5;
double  stoploss = 0; // determine your sl
double  takeprofit = 0; // determine your tp
string  comment = DoubleToString(AccountBalance(),2);
int     magic = 0; // determine your magic number

OrderSend(symbol, cmd, lot, price slippage, stoploss, takeprofit, comment, magic);

with this code ( please try it ) you will have your current balance on comment

Daniel Bouchard
55
Daniel Bouchard  
Adiasa:

with this code ( please try it ) you will have your current balance on comment

ok now account balance should be stored in comment? now can I have the account balance of the last 10 trades  with ordercomment(10)?
Adiasa
175
Adiasa  
Daniel Bouchard:
ok now account balance should be stored in comment? now can I have the account balance of the last 10 trades  with ordercomment(10)?
I think so. But orderComment() is string, and the balance should be in double, so you have to use StringToDouble()
Daniel Bouchard
55
Daniel Bouchard  
so doubletostring(1) now means the accountbalance at the end of the last trade?
12
To add comments, please log in or register