Hello! 2021.03.01_19:49 GMT+3. Wanted to improve the results of my trading system. But iOpen() and iClose() didn't seem to work. In the strategy tester, I checked the Expert Advisor, among 175 trades, only 81 of them seem to be closed by the conditions described in the code above. This code does not work. What can we do to make it work? How about asking MetaQuotes programmers? Now I'll look through the strategy tester's logs and post how rarely these functions work. Found it. 20210228.log . Time 13:53:02.192, open #155, iCloseB()=1.3434. Attached is the log file. Now I hope someone can tell me what to do with these iClose() and iOpen() functions to make them work. Because the trading system is not efficient enough. That's all for now. 2021.03.01_20:12 GMT+3.
It happens on mt5 that on a certain timeframe it's time for a new bar to appear (and the quotes seem to be coming), but it's still not there. What is it? Specifics of pricing?
Hello again! 2021.03.01_20:24 GMT+3. I wrote in this forum thread on page 1304 that my version 4 tester is slow. And Vitaly Muzichenko misunderstood me. I am writing the time when I finished writing the comment. And I am not rushing anyone. Although there were no answers to my question, I found the answer by accident. What am I doing with the strategy tester now? I check the "optimize" checkbox before testing the Expert Advisor. I optimize it. Although, I do not need optimization at the moment. I optimize it in approximately one second. Then I clear the checkbox "optimize". I check how the Expert Advisor works. Then the strategy tester works quickly. It is not forty minutes or an hour. I felt obliged to write this. Maybe it will be of use to anyone. I am writing my Expert Advisor in the fourth version of the terminal because my broker has ruble accounts in version 4 of the terminal and not in version 5. I don't want to mess with US dollar: it has a huge national debt ceiling and my broker translates my dollars into my roubles at non-market rate. that's all for now. 20:39 GMT+3.
Николай Никитюк: Hello! 2021.03.01_19:49 GMT+3. Wanted to improve the results of my trading system. But it seems that iOpen() and iClose() functions do not work. In the strategy tester, I checked the Expert Advisor, among 175 trades, only 81 of them seem to be closed by the conditions described in the code above. This code does not work. What can we do to make it work? How about asking MetaQuotes programmers? Now I'll look through the strategy tester logs and post how rarely these functions work. Found it. 20210228.log . Time 13:53:02.192, open #155, iCloseB()=1.3434. Attached is the log file. Now I hope someone can tell me what to do with these iClose() and iOpen() functions to make them work. Because the trading system is not efficient enough. That's all for now. 2021.03.01_20:12 GMT+3.
The code seems fine, but I'm confused by the slippage...very small, put more slippage and check
Николай Никитюк: Hello! 2021.03.01_19:49 GMT+3. Wanted to improve the results of my trading system. But it seems that iOpen() and iClose() functions do not work. In the strategy tester, I have tested the Expert Advisor, among 175 trades, only 81 of them seem to be closed by the conditions described in the code above. This code does not work. What can we do to make it work? How about asking MetaQuotes programmers? Now I'll look through the strategy tester's logs and post how rarely these functions work. Found it. 20210228.log . Time 13:53:02.192, open #155, iCloseB()=1.3434. Attached is the log file. Now I hope someone can tell me what to do with these iClose() and iOpen() functions to make them work. Because the trading system is not efficient enough. That's all for now. 2021.03.01_20:12 GMT+3.
Try to rewrite it that way, because it's the same thing.
Close[0]=Open[0]
и Close[0]=High [0] и Close[0]=Low[0]
Therefore, if you need immediate, real-time data, you'd better use
double Bidd=NormalizeDouble(Bid,Digits); если цена сверху или
double Askk=NormalizeDouble(Askk,Digits); если цена снизу МА
double MA_lo=NormalizeDouble(MA_lo,Digits);
It's better to normalize all prices, which will be compared in the condition, so you won't be surprised :)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Question on
What would be the index of the initial M1 bar if I were to draw a trend line on the past H1?
And by the start and end time of the line it is not clear how to find it.
Sorry, if I am not explaining it clearly.
It is difficult for me.
Besides indices there is also time...
Question on
What would be the index of the initial M1 bar if I were to draw a trend line on the past H1?
And by the start and end time of the line it is not clear how to find it.
Sorry, if I am not explaining it clearly.
It is difficult for me.
H1 has a bar open time - it is iTime()
To understand the index of a bar with this time on M1 there is iBarShift()
It remains to know the minimum and maximum bar at M1 using iHighest() and iLowest()
Hello! 2021.03.01_19:49 GMT+3. Wanted to improve the results of my trading system. But it seems that iOpen() and iClose() functions do not work. In the strategy tester, I checked the Expert Advisor, among 175 trades, only 81 of them seem to be closed by the conditions described in the code above. This code does not work. What can we do to make it work? How about asking MetaQuotes programmers? Now I'll look through the strategy tester logs and post how rarely these functions work. Found it. 20210228.log . Time 13:53:02.192, open #155, iCloseB()=1.3434. Attached is the log file. Now I hope someone can tell me what to do with these iClose() and iOpen() functions to make them work. Because the trading system is not efficient enough. That's all for now. 2021.03.01_20:12 GMT+3.
The code seems fine, but I'm confused by the slippage...very small, put more slippage and check
Good heavens! Did I want something? Did I ask for anything? Who do you think I am?
Hello! 2021.03.01_19:49 GMT+3. Wanted to improve the results of my trading system. But it seems that iOpen() and iClose() functions do not work. In the strategy tester, I have tested the Expert Advisor, among 175 trades, only 81 of them seem to be closed by the conditions described in the code above. This code does not work. What can we do to make it work? How about asking MetaQuotes programmers? Now I'll look through the strategy tester's logs and post how rarely these functions work. Found it. 20210228.log . Time 13:53:02.192, open #155, iCloseB()=1.3434. Attached is the log file. Now I hope someone can tell me what to do with these iClose() and iOpen() functions to make them work. Because the trading system is not efficient enough. That's all for now. 2021.03.01_20:12 GMT+3.
Try to rewrite it that way, because it's the same thing.
Or, that's how I write it.
Hi all!
Here's the problem:
Price crosses the MA down or up.
I need to memorise it in order to use it later in calculating the number of points passed.
This is how I understand it:
double FixPrice; // variable
bool Fix=false; // marker
if ( Fix==false) {
if ( Close[0] > MA_lo ) FixPrice = Close[0];
} // measure until the price crosses the MA
if ( Close[0] < MA_lo ) Fix=true;
if ( Fix==true) FixPrice_L = FixPrice ;
And here is the next hitch - the price is not memorized!
This is how you want it to be memorised.
But keep in mind that at the opening of a candle.
Therefore, if you need immediate, real-time data, you'd better use
It's better to normalize all prices, which will be compared in the condition, so you won't be surprised :)
Чтобы перевернуть ФИБО поменяй местами р1 и р2
С алертом я не помогу(
To reverse FIBO, swap p1 and p2
I can't help with the alerts(
Hi, thanks, got two different solutions, yours is the easiest....