[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 225
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
It seems to me, on the contrary, that it is good when, for example, you test an EA on H1, but the ticks are modelled from M1. The sensitivity and consequently the accuracy of testing increases. But everything depends on the Expert Advisor and on what it is composed of, of course.
As for the tester grails, everyone must find the principles of their construction to distinguish between illusion and truth in the code and in the results of testing. I know there are many articles and topics dedicated to "Strategy Tester", but still, you can't touch everything. You might miss or fail to understand something while reading them. Personal experience is also necessary.
It seems to me, on the contrary, that it is good when, for example, you test an EA on H1, but the ticks are modelled from M1. The sensitivity and therefore the accuracy of testing increases. But it all depends on the EA and on what it is made of, of course.
As for the tester grails, everyone should independently come to the principles of their construction in order to distinguish illusion from truth in the code and in the results of testing. I know there are many articles and topics dedicated to "Strategy Tester", but still, you can't touch everything. You might miss or fail to understand something while reading them. Personal experience is also necessary.
... Blah, blah, blah... :-)))
Guys, look at my question at the beginning of page 221. Can you give us a hint?
Help fix the function
I'm trying to write a function that determines the closing price of the last order (by the time closest to the current time)
I write it like this:
But
do
uble PriceCloseLastPos(string smb = "", int cmd = -1, int mMin = -1, int mMax = -1) {
int ticketDateTime=0;
int orderTicket=-1;
double closePrice = 0;
int ordTotal = OrdersTotal();
if (smb == "0") smb = Symbol();
for (int i = 0; i < ordTotal; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) {
if (OrderSymbol() == smb || smb == "") {
if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
if (cmd < OP_BUY || OrderType() == cmd) {
if (mMin < 0 || (OrderMagicNumber() >= mMin && OrderMagicNumber() <= mMax)) {
if (ticketDateTime < OrderCloseTime()) {
ticketDateTime = OrderCloseTime();
orderTicket = OrderTicket();
closePrice = OrderClosePrice();
}
}
}
}
}
}
}
if(orderTicket > -1) OrderSelect(orderTicket, SELECT_BY_TICKET, MODE_HISTORY );
return(closePrice);
}
But for some reason, the function returns the data of the very first order which was opened in the tester.
Actually this is my intermediate goal. I wanted to write a function that would give the last closing price of a partial order (not for the whole lot volume). But I don't know how to go about it...
... Blah, blah, blah... :-)))
Guys, look at my question at the beginning of page 221. Can you tell me...
On this one:
Can you guys tell me why when I run tests on different TFs, the test results are different, charts are also naturally different, opening price tests
?
Because time and entry/exit prices will be different. Because the TFs are different.
This one:
?
Because entry/exit times and prices will be different. Because the TFs are different.
The point is that the timeframe of the indicator calculation is explicitly stated... So, do not give a shit about the testing period used, the main thing that it was not more than the timeframe for calculating indyuki, ie if the indyuki are calculated on M30, in the tester, as I understand it, must be one result when testing on the TF M1 or M5 or M15 or M30 ... Of course at opening prices... Or am I wrong about something here? After all, the most important thing here is that the testing TF should not be larger than the TF used to calculate indicator values, i.e. in this case no larger than M30... Isn't it so?
The point is that the timeframe of indicator calculation is specified explicitly... So, do not give a shit about the testing period used, the main thing that it was not more than the timeframe for calculating indyuki, ie if the indyuki are calculated on M30, in the tester, as I understand it, must be one result when testing on the TF M1 or M5 or M15 or M30 ... of course at opening prices...
Yeah, right, half of the values there are calculated on the 0th bar.
Yeah, right, it calculates half of the values on the 0 bar.
And it's also based on the opening price... Price is an opener, because in the tester ALL price values of TFs are modelled from M1 - isn't that right? Any advice...
Yeah, right, half of the values there are calculated on the 0th bar.
Although, everything seems to be calculated on Open.
Run and analyse entry/exit point times.