Errors, bugs, questions - page 87

 
Interesting:

A common mistake many people make, I've been caught in it myself (the comparison is implemented differently in different languages)...

If memory serves me correctly, early builds had an error warning from the compiler.
 
Kos:
If memory serves me correctly, the compiler gave an error warning in early builds.
Maybe it did. Developers seem to be about to disable display of some not very important messages (maybe they already did)...
 

Greetings.

Could you please tell me how to download the history? I just installed the terminal and it has no data for any of the pairs from 01.02.2010 to 21.07.2010. When I run the Expert Advisor, the data for this period is loaded first, but now the history is not loaded.

 

How do I get this information (marked in red)?

I take it that the profit is requested like this

AccountInfoDouble(ACCOUNT_PROFIT);
or not? it just returns 0
 
gumgum:

How do I get this information (marked in red)?

I understand that the profit is requested as follows

or not? it just returns 0

This function returns the Size of the current profit in the account in the currency of the deposit , that is, if there are no open positions, then of course the result will be zero. What you want you need to calculate yourself, how to do this you can read in this articleCreating a databoard using classes from the Standard Library and the Google Chart API
 
gumgum:

How do I get this information (marked in red)?

I understand that the profit is requested as follows

or not? I just get 0

Very simply:

Option 1.

1. ask for an initial balance - Start Balance

2. Calculate the totals of all trading operations (in the history we go through all the trades) - Trade Balance.

3. Add the result of trading operations to the initial balance and obtain the final amount of balance - Balance.

According to your data it will look like this

Start Balance = $10,000.

Trade Balance = -$4,061.80

Balance = Start Balance + Trade Balance (take into account the sign)!

Option № 2

We subtract the Start Balance from the current funds, the dry balance gives us the result of the transactions...

 

What does that make

AccountInfoDouble(ACCOUNT_PROFIT)==AccountInfoDouble(ACCOUNT_EQUITY)-AccountInfoDouble(ACCOUNT_BALANCE)
 
gumgum:

What does that make

all right.
 
gumgum:

What does that make

That would be...
AccountInfoDouble(ACCOUNT_PROFIT)=AccountInfoDouble(ACCOUNT_EQUITY)-AccountInfoDouble(ACCOUNT_BALANCE)
 

It's a pity there's no depo and profit function just me

double pro=AccountInfoDouble(ACCOUNT_BALANCE)/10000.;

gives 1.#INF.

Servicedesk has already written...

Reason: