Look for an error in the function - it doesn't return the up arrow condition.
Thanks toAleksey Vyazmikin, but the problem is more serious. When the robot finds a pattern, it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
Thanks toAleksey Vyazmikin, but there's a bigger problem. When the robot finds a pattern it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
The problem is in the function in the first place - I have not added the code for a reason. The function is matched and it draws the arrows. I have launched the Expert Advisor in the visualizer.
The Expert Advisor will not draw arrows on every tick - just check for a new candle.
Thanks toAleksey Vyazmikin, but there's a bigger problem. When the robot finds a pattern it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
If you want to get help from as many people as possible, you should upload the code, not the file. Not everyone wants to download the file, and then you have to open it and then delete it.
In order to get as many people as possible to help you, you need to post the code, not the file. Not everyone wants to download the file, and then you have to open it and then delete it, so it's a pain in the ass.
Hello everyone) I am on the account of the VPN server, I wrote the address of the server to which my account belongs, but here writes that nothing is found, what to do, please help, thank you.
It didn't work. The Expert Advisor drew 7679 objects, and interestingly enough, with odd numbering
I do not understand what is wrong with the Doji function. Why the up arrows are not drawn
You have a problem with searching for a pattern. Try to find the right code in the kodobase, there are a lot of them and the problem will resolve itself
You have a pattern search problem, try to find the correct code in kodobase, there are many of them and the problem will solve itself
Solved the problem with rendering a large number of objects. I have installed check on new bar. I have got the following code:
//+------------------------------------------------------------------+//| 111.mq4 |//| Copyright 2017,UriyGlushko |//| https://www.mql5.com |//+------------------------------------------------------------------+#property copyright"Copyright 2017,UriyGlushko"#property link"https://www.mql5.com"#property version"1.00"#property strictexternstring Rodot = "Параметры робота";
externdouble Lots = 0.2;
externint StopLoss = 20;
externint TakeProfit = 80;
externint Magic = 999999;
externint Slippage = 3; // Проскальзываниеexternbool UseDojiCandles = true; // Использование патерна Доджиexternint TimeFrame = PERIOD_H4;
int DojiCandle = 0;
bool New_Bar = false;
//+------------------------------------------------------------------+//| Expert initialization function |//+------------------------------------------------------------------+intOnInit()
{
if (Digits == 3 || Digits ==5 )
{
TakeProfit *= 10;
StopLoss *= 10;
Slippage *= 10;
}
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Expert deinitialization function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)
{
}
//+------------------------------------------------------------------+//| Expert tick function |//+------------------------------------------------------------------+voidOnTick()
{
Fun_New_Bar();
if(UseDojiCandles = true && Doji() == 1 && New_Bar == true)
{
if(!ObjectCreate(ChartID(),"Doji_"+IntegerToString(DojiCandle),OBJ_ARROW_UP,0,Time[0],Low[1]-300*_Point))
{
Print("Не удалось создать метку вверх");
}
}
DojiCandle ++;
if(UseDojiCandles = true && Doji() == -1 && New_Bar == true)
{
if(!ObjectCreate(ChartID(),"Doji_"+IntegerToString(DojiCandle),OBJ_ARROW_DOWN,0,Time[0],High[1]+300*_Point))
{
Print("Не удалось создать метку вниз");
}
}
DojiCandle ++;
}
//+------------------------------------------------------------------+// Поиск всех объектов//+------------------------------------------------------------------+//+------------------------------------------------------------------+// Функция паттерна Доджи//+------------------------------------------------------------------+int Doji()
{
//Параметры Дожиdouble Open1 = iOpen(Symbol(), PERIOD_H4,1);
double Close1 = iClose(Symbol(), PERIOD_H4,1);
double High1 = iHigh(Symbol(), PERIOD_H4,1);
double Low1 = iLow(Symbol(), PERIOD_H4,1);
//Параметры предыдущей свечиdouble Open2 = iOpen(Symbol(), PERIOD_H4,2);
double Close2 = iClose(Symbol(), PERIOD_H4,2);
double High2 = iHigh(Symbol(), PERIOD_H4,2);
double Low2 = iLow(Symbol(), PERIOD_H4,2);
//Параметры индикатора волотильности ATR для нахожденя относительно большой свечи перед Доджиdouble ATR = iATR(Symbol(),PERIOD_H4,14,1);
//Математическое описание патерна Дожиif(Close1 < High1 -0.3*(High1-Low1) &&
Open1 < High1 -0.3*(High1-Low1) &&
Close1 > Low1 -0.7*(High1-Low1) &&
Open1 > Low1 -0.7*(High1-Low1) &&
MathAbs((Close1-Open1) < 0.2*(High1-Low1))&&
MathAbs((Close2-Open2) > 0.7*ATR))
{
if((Close2 - Open2) > 0)
{
Print ("Down"); return(-1);// Условие для продаж
}
if((Close2 - Open2) < 0)
{
Print ("Up"); return(1);// Условие для покупок
}
}
return(0);
}
//+------------------------------------------------------------------+// Функция определения нового бара//+------------------------------------------------------------------+void Fun_New_Bar() // Ф-ия обнаружения ..
{ // .. нового бара staticdatetime New_Time=0; // Время текущего бара
New_Bar=false; // Нового бара нет if(New_Time!=Time[0]) // Сравниваем время
{
New_Time=Time[0]; // Теперь время такое
New_Bar=true; // Поймался новый бар
}
}
The only thing is that the serial number of the arrow in the object properties goes not 1 2 3 ... and so on, but 1 850427 1083295 ..... I take it the counter doesn't work correctly?
My question is, how to check for a new bar on H4. So, I want the robot to look for the patterns on H4, while the chart may be of any TF?
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.
Look for an error in the function - it doesn't return the up arrow condition.
Thanks toAleksey Vyazmikin, but the problem is more serious. When the robot finds a pattern, it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
Thanks toAleksey Vyazmikin, but there's a bigger problem. When the robot finds a pattern it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
The problem is in the function in the first place - I have not added the code for a reason. The function is matched and it draws the arrows. I have launched the Expert Advisor in the visualizer.
The Expert Advisor will not draw arrows on every tick - just check for a new candle.
Thanks toAleksey Vyazmikin, but there's a bigger problem. When the robot finds a pattern it sets a huge number of arrows at one coordinate. The terminal hangs. How to fix it. Have you tried to run my Expert Advisor on your terminal?
If you want to get help from as many people as possible, you should upload the code, not the file. Not everyone wants to download the file, and then you have to open it and then delete it.
So, when a new candle appears, the ObjectCreate function must be switched off, am I right?
In order to get as many people as possible to help you, you need to post the code, not the file. Not everyone wants to download the file, and then you have to open it and then delete it, so it's a pain in the ass.
Roger that, laying out the code.
Try it this way:
Hello everyone) I am on the account of the VPN server, I wrote the address of the server to which my account belongs, but here writes that nothing is found, what to do, please help, thank you.
Try it this way:
It didn't work. The Expert Advisor drew 7679 objects, and interestingly enough, with odd numbering
I do not understand what is wrong with the Doji function. Why the up arrows are not drawn
It didn't work. The Expert Advisor drew 7679 objects, and interestingly enough, with odd numbering
I do not understand what is wrong with the Doji function. Why the up arrows are not drawn
You have a problem with searching for a pattern. Try to find the right code in the kodobase, there are a lot of them and the problem will resolve itself
You have a pattern search problem, try to find the correct code in kodobase, there are many of them and the problem will solve itself
Solved the problem with rendering a large number of objects. I have installed check on new bar. I have got the following code:
The only thing is that the serial number of the arrow in the object properties goes not 1 2 3 ... and so on, but 1 850427 1083295 ..... I take it the counter doesn't work correctly?
My question is, how to check for a new bar on H4. So, I want the robot to look for the patterns on H4, while the chart may be of any TF?