SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run it on a real account
What is the name of the Expert Advisor? Did you download it from kodobase? I need to see how the author has implemented it in the function
//+------------------------------------------------------------------+// Permission to trade in this day |//+------------------------------------------------------------------+bool TradingDay(int hmin, int hmax) // Определение времени и дня разрешения торговли
{
bool dtrade = false;
switch(DayOfWeek())
{
case1: // Mondayif(Monday == 1)
dtrade = true;
break;
case2: // Tuesdayif(Tuesday == 1)
dtrade = true;
break;
case3: // Wednesdayif(Wednesday == 1)
dtrade = true;
break;
case4: // Thursdayif(Thursday == 1)
dtrade = true;
break;
case5: // Fridayif(Friday == 1)
dtrade = true;
break;
default: //
dtrade = false;
break;
}
if(dtrade && !(Hour() >= hmin && Hour() <= hmax))
dtrade = true;
return dtrade;
}
//+------------------------------------------------------------------+
We are missing something - to add the condition to the ontik
SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run it on a real account
This one and time will work - I changed the function
I just recently found out about them. I don't know, it's a mega handy thing. What do you suggest? Putting everything into functions? If that would solve the problem.
I have two global objects (bar, db_last) of one class Bar, first is initialized with parameters of each new bar (usual bar on chart), and second saves a bar corresponding to all conditions. As a matter of fact, in another local object of class Order all calculations are made from the parameters db_last to open an order. Parameters db_last and bar are used in many places, but only for reading, initialization and assignment occur in one place, in OnTick(), so unexpected changes in objects should not be.
I just recently found out about them. I don't know, it's a mega handy thing. What do you suggest? Putting everything into functions? If that would solve the problem.
I have two global objects (bar, db_last) of one class Bar, first is initialized with parameters of each new bar (usual bar on chart), and second saves a bar corresponding to all conditions. As a matter of fact, in another local object of class Order all calculations are made from the parameters db_last to open an order. Parameters db_last and bar are used in many places, but only for reading, initialization and assignment happen in one place, in OnTick (), so unexpected changes in objects should not occur.
I would try it - it does not cost money).
But there are errors, moreover, errors with simple normalization
Can you send me the file in a private message? I'll have a look at it.
What is the name of the Expert? Did you download it from kodobase? I need to see how the author has implemented it in the function
I missed something - to add the condition to the ontik
SanAlex, I attached the downloaded version in this message - it has Puria + trailing stop + Breakeven level + watchdog trading. I would test trading by the clock, I just haven't got around to it yet)
SanAlex, attached the version I downloaded in this post - it's Puria + trailing stop + breakeven level + clock trading. I would test trading by the clock, I just haven't got around to it yet).
- I missed your target, what did you want to change in it?
What additions I wanted to make:
1. To make so, that the opening of a deal andcheck for all indicator conditions(crossing a fast (5) two slow (75) (85) and the MACD bar opening in the same direction with a fast (5) ) was performed only at opening price of a new candle(the very first tick of each 30 minute candle);
Create conditions for "zeroing" of indicators. For example,for a fast moving (5) If it is higher than slow - then it is a signal to buy. If it then goes downwards and either touches one of them, or is between the slow moving (75) and (85)- then the signal from the fast moving indicator"zeros out" as it were, and will remain in this"zero" position as long as it touches or remains between the slow ones. If after that the fast one crosses both slow ones to one side(including if it goes back to the side it came from before touching the slow ones)-then it will be a signal of this indicator. With MACD the situation is similar- OnlyMACD=0 will be considered as "zeroing"(if on the first candle the MACD, for example, opened with 0.0043, and on the second candle with -0.0010, it means that the MACD on the second candle has"zeroed" and has given a new signal). However, there is a time whenthe fast (5) and the MACD should be kind of "on equal footing" - if (5) doesn't change its position relative to the slow, and the MACD has opened on the previous candle in the wrong zone (no entry), and on the next one - in the same zone as the fast, then all conditions have converged and an entry to the order should be made. Note that all this should be only on the opening prices of the candles - only on this one tick;
And the last, to make theExpert Advisor wait for 4 consecutive candle openings:
1. 1st open price - (5) above (75) and (85) + MACD bar opened above 0-1 out of 4 confirmations; 2.The opening price of the 2nd candle - (5) over (75) and (85) + MACD bar opened above 0-2 out of 4 confirmations is; 3. The opening price of the 3rd candle - (5) over (75) and (85) + MACD bar opened above 0-3 out of 4 confirmations is; 4.Opening price of the 4th candle - (5) over (75) and (85) + MACD bar opened above 0-4 out of 4 confirmations yes-Open buy trade on the same candle (4th).
The same situation with orders tosell, only in the other direction indicators should open. And there is an important point-if at, say, any stage of the 1 st candle to the 4th,the indicators change their position(for example, on the 3rd opening candle, the MACD bar opens either below 0, or = 0)-then everything resets, because the signals were not checked on the opening of 4-th candle in a row.
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.
SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run it on a real account
What is the name of the Expert Advisor? Did you download it from kodobase? I need to see how the author has implemented it in the function
We are missing something - to add the condition to the ontik
What is the name of the Expert? Did you download it from kodobase? I need to see how the author has implemented it in the function
There is something missing - to add a condition to the ontik
Sasha, the timing work has not been included. Just added some features to plug in during development)
I'm going to redo it in my own way.
SanAlex, yes, looked at the tester for this year's current one, all ok) The results are good, in the near future I will try to run it on a real account
This one and time will work - I changed the function
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
The Time function in mt4 and in mt5 works
Don't you want to get rid of classes?
I just recently found out about them. I don't know, it's a mega handy thing. What do you suggest? Putting everything into functions? If that would solve the problem.
I have two global objects (bar, db_last) of one class Bar, first is initialized with parameters of each new bar (usual bar on chart), and second saves a bar corresponding to all conditions. As a matter of fact, in another local object of class Order all calculations are made from the parameters db_last to open an order. Parameters db_last and bar are used in many places, but only for reading, initialization and assignment occur in one place, in OnTick(), so unexpected changes in objects should not be.
I just recently found out about them. I don't know, it's a mega handy thing. What do you suggest? Putting everything into functions? If that would solve the problem.
I have two global objects (bar, db_last) of one class Bar, first is initialized with parameters of each new bar (usual bar on chart), and second saves a bar corresponding to all conditions. As a matter of fact, in another local object of class Order all calculations are made from the parameters db_last to open an order. Parameters db_last and bar are used in many places, but only for reading, initialization and assignment happen in one place, in OnTick (), so unexpected changes in objects should not occur.
I would try it - it does not cost money).
But there are errors, moreover, errors with simple normalization
Can you send me the file in a private message? I'll have a look at it.What is the name of the Expert? Did you download it from kodobase? I need to see how the author has implemented it in the function
I missed something - to add the condition to the ontik
SanAlex, I attached the downloaded version in this message - it has Puria + trailing stop + Breakeven level + watchdog trading. I would test trading by the clock, I just haven't got around to it yet)
The lack of history affects the indicator reading at the beginning of the test
MakarFX, I also thought of that, so it should work as it should
SanAlex, attached the version I downloaded in this post - it's Puria + trailing stop + breakeven level + clock trading. I would test trading by the clock, I just haven't got around to it yet).
Found this in kodobase https://www.mql5.com/ru/code/12654
- I missed your target, what did you want to change in it?
Found this in kodobase https://www.mql5.com/ru/code/12654
- I missed your target, what did you want to change in it?
What additions I wanted to make:
1. 1st open price - (5) above (75) and (85) + MACD bar opened above 0- 1 out of 4 confirmations;
2.The opening price of the 2nd candle - (5) over (75) and (85) + MACD bar opened above 0- 2 out of 4 confirmations is;
3. The opening price of the 3rd candle - (5) over (75) and (85) + MACD bar opened above 0- 3 out of 4 confirmations is;
4.Opening price of the 4th candle - (5) over (75) and (85) + MACD bar opened above 0- 4 out of 4 confirmations yes- Open buy trade on the same candle (4th).