[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 30
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
I saw Dimka again! He put a ribbon on the car. And now he's gassing, gassing, the light's blinking, but there's nothing on the speedometer! He's worried that he won't be able to drive to work tomorrow! What do you think?
Have you tried treatment?
Well, I would say that your EA is overoptimized... But if it was from 2004 to 2012 and then from 2009 to 2012, then most probably in the interval from 2004 to 2008 inclusively, some order got hung open, which successfully (or maybe unsuccessfully) closed at the end of testing.
May be, who solved it and is such solution possible in mt4. Not found. Need an EA or a script that monitors other EA's trading (EA trades on different pairs with the same magik). And after closing each order a check on reaching a profit on the magik (previously entered in the EA settings). At a profit higher or equal, the following EA should stop trading by the EA. In addition to this trading EA, there are other trades on the account. As found EA EquityLimits(_http://mtexperts.narod.ru/files/EquityLimits_EA.ex4) monitors the current difference between the account balance and funds and in case of reaching the specified limits, it closes all orders and disables all advisors (clicks the "Advisors" button on the toolbar). This point is not satisfied.
First of all, reaching the profit on magic... that's something new))) Well, if there are a lot of Expert Advisors, why not use global variables for each of them
help eh!!!!
how do i get the number of losing orders (closed in history) from the last 10 closed orders ???
there is a function but it only searches for one specific order
here:
double WW1(int stop,int mn=-1, string sy="", int op=-1 ) {
datetime t;
double ocp, osl;
int dg, i, j=-1, k=OrdersHistoryTotal() -1 ;<-- here we can change the serial number of the order from the end (-1 is the penultimate, if we remove -1 it's the last, etc.)etc.)
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
if (OrderSymbol()==sy || sy=="") {
if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
if (op<0 || OrderType()==op) {
if (mn<0 || OrderMagicNumber()==mn) {
if (t<OrderCloseTime()) {
t=OrderCloseTime();
j=i;
}
}
}
}
}
}
}
if (OrderSelect(j, SELECT_BY_POS, MODE_HISTORY)) {
double rr=OrderProfit();
}
return(rr);
}
using this function, of course I define loss or gain type
Does anybody have a function that reads the last 10 orders and gives the number of losing orders of them?
There is, of course, a suggestion to make this function a bool function type, to get true or false answers,
but then we will need 10 such functions with different numbers (from 1 to -9) and then we will get number of false and true
then who can advise how to receive number of falsities and falsities?
but this is a lot of operations and formulas, i consider it a perversion
May be, who solved it and is such solution possible in mt4. Not found. Need an EA or a script that monitors other EA's trading (EA trades on different pairs with the same magik). And after closing each order a check on reaching the magik profit (previously entered in the EA settings). If the profit is higher or equal, the following EA should stop trading by the EA. In addition to this EA, there are other trades on the account. As found EA EquityLimits(_http://mtexperts.narod.ru/files/EquityLimits_EA.ex4) monitors the current difference between the account balance and funds and in case of reaching the specified limits, it closes all orders and disables all EAs (by pressing the "EAs" button on the toolbar). This point is not satisfied.
help eh!!!!
How to get the number of losing orders (closed in the history) of the last 10 closed orders?
i use this function to define loss or gain type
maybe there is a function that reads the last 10 orders immediately and gives a number of losing orders of them?
}
When the code exceeds 1000 lines, you start writing compact )
also in MT4 the performance suffers, especially when running tests. The laconic version performs faster.
From what I hear the compiler removes all the "gaps" when compiling the code. Logically it should not care what option to write for performance, because in the output of the compiled file will be the same "without voids".
Isn't it so?