Get Profit
- remove comment
- calculate profit in pips
- To show comment
Hi can somebody tell me how to calculate profit for all orders in the history ?
thanks for your reply sir but can you give me some example to calculate the net profit .
thanks for your reply sir but can you give me some example to calculate the net profit .
double Calculateallnettoprofit() { double profits; for (int ioht=OrdersHistoryTotal() -1; ioht >= 0; ioht--) { OrderSelect(ioht, SELECT_BY_POS, MODE_HISTORY); if(OrderType() == OP_BUY || OrderType() == OP_SELL) { profits += OrderProfit() + OrderCommission() + OrderSwap(); } } return (profits); }
Terminal ==> Account History
Colom Profit ==> (select) All History
sir if we have a special symbols and digits like 3, 5 then how can i do that
if you wanna write a program and you don't know the basics you can't
you have to learn the basics and practise with simple programs first
but if you can read the code and understand what that code does line for line
then you can make a different logic for how it has to trade and try to make that change
if you wanna write a program and you don't know the basics you can't
you have to learn the basics and practise with simple programs first
but if you can read the code and understand what that code does line for line
then you can make a different logic for how it has to trade and try to make that change
thanks for your sir i will doing that sir can you tell me that the net profit is coming is in pips or i have to convert it