[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 434
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
Is it possible to calculate the minimum equity using historical data on orders?
.
Understand one thing - what is specified in "historical orderdata "??? You are interested in closing price, whether it is profit or loss for the selected order...? so what of it? The order history does not show the amount of the account drawdown in equity (the current loss) when the order has been in the market, i.e. the loss at its closing may amount to, say, 500 units of the currency but it would be shown in the order history while the equity could have decreased to -1000 units of the currency when the order was in the market. Please note: The Strategy Tester calculates losses on equity.
The answer to your question: you cannot.
Good day!
Professionals help - I'm not going anywhere without you!
I have already addressed this issue, but have not found the error, I really wanted to understand it myself, I racked my brains for a few days, but so far not much experience.
The previous discussion ended with the idea that perhaps the reason is in the code of those indicators I am trying to use.
I have written an indicator (it is my first steps) that displays breakdown of ME_Proboy_F5
The problem is..... The indicator is not re-drawing when new bars are formed and it is reset to zero on the last bar after the receipt of a tick. It is re-drawn if you change the tf or display the properties.
The indicator requests data from other indicators, all except one ME_Proboy_F_5 (I place its code too) works fine. I cannot find any error in the second indicator as well. The indicator is redrawn, but it is slow, i.e. it is displayed correctly at the second restart (change the FF or display properties).
I would be very grateful for help.
Proboy_Order_F5 - this is the main indicator, about which I ask
ME_Proboy_F5 - the second one, which is doubtful
I'm sorry to keep pestering you with my question, but I really want to get to the bottom of it.
Applying the function limit=MathMin(Bars-1, Bars-counterd_bars-1) did not solve the problem, but I took the recommendations, worked on the programming style, I hope it worked, got rid of unnecessary variables.
See above for the essence of the problem
One thing you should understand - what is specified in "historical order data"??? Are you interested in closing price, profit or loss for the selected order...? So what of it? The order history does not show the amount of the account drawdown in equity (current loss) when the order has been in the market, i.e. the loss at its closing may amount to, say, 500 units of the currency but it would be shown in the order history while the equity could have decreased to -1000 units of the currency when the order was in the market. Please note: The strategy tester calculates the loss on equity.
The answer to your question: you cannot.
However, there is an indicator https://c.mql5.com/mql4/forum/2010/11/Equity_v7.zip where equity is somehow calculated based on historical data. I have not figured out yet how to do it. Perhaps, equity can be calculated based on key points (order closes) but how does it look like in the form of a single formula?
Here is the code with the condition that orders should be deleted after the expiry of time, this is the condition
MyCurrentTime >= OrderExpiriation && OrderMagicNumber() == MagicNumber
So, why if we insert this condition into the first if operator, then the other operator located inside it does not consider this condition?
That is, this code doesn't work and deletes all pending orders at once.
And this code works and does not delete orders at once.
Here is the code with the condition that orders should be deleted after the expiry of time, this is the condition
So, why if we insert this condition into the first if operator, then the other operator located inside it does not consider this condition?
That is, this code doesn't work and deletes all pending orders at once.
And this code works and does not delete orders at once.
Both codes are not correct, so I analyze your code and I don't know what is correct/wrong.
Let's take the simplest example. You have 2 orders that need to be removed.
1) for(int counter=0;counter<OrdersTotal();counter++)
the beginning of a good 0 is less than two and the first order is safely removed, but then
2)
counter = 1, but there is only one order left! It means that the condition (1<1) is not fulfilled, and the loop terminates...
Note that both codes are uncorrected, so I don't know what works right/wrong for you.
Let's take the simplest example. You have 2 orders, both need to be deleted.
1) for(int counter=0;counter<OrdersTotal();counter++)
The good 0 is less than two and the first order has been successfully deleted, but then
2)
counter = 1, but there is only one order left! It means that the condition (1<1) is not fulfilled and the loop terminates...
No, but that's the thing, at this point it deletes ALL the orders, cleanly. The problem is that it deletes them immediately.
Good afternoon!
I have written an indicator (these are my first steps) that clearly shows the breakdown of ME_Proboy_F5
Good first steps, Olga Alexandrovna. 330 lines of code
However, there is an indicator https://c.mql5.com/mql4/forum/2010/11/Equity_v7.zip where equity is somehow calculated based on historical data. I have not understood the method yet. Perhaps, equity can be calculated based on the key moments (order closes) but what does it look like in the form of a formula?
Familiarise yourself with the concepts of EQUITY and BALANCE and what their differences are.
This indicator shows the equity line in real time, as the equity line is the current profit/loss on unclosed positions, "It is possible to really determine the equity by key points (order closures)" - not possible, so you will consider the change of the equity line on closed positions.
"The equity is somehow calculated on the basis of historical data" - no. This indicator calculates the equity line for the current moment - by open positions in the Market.
Good evening! I found this in S. Kovalev's tutorial. Kovalev, but in the MT4 terminal there's nothing but "woof! Please, advise, who knows where to borrow a set of sound signals for different operations, so that I don't have to keep looking at the computer all the time? Thanks for a possible hint!