I set the lines to see where the EA will work, replaced the lines with a condition for placing and modifying orders and the EA worked. To be honest I am glad it worked. This is my first independent EA. I understood why the tester set only one line ))
I have another headache - explain how to write the KEY_TILDE key for selecting the Rectangular Label object, so that it can be selected and moved to another place on the chart, I can't figure it out. I have attached a screenshot with an example on Fork Neo indicator at the bottom. I have understood the mouse, but I cannot use keys.
intOnInit()
{
RectLabelCreate(0,"RectLabel",0,10,200,149,143,C'55,55,55',BORDER_SUNKEN,CORNER_LEFT_LOWER,C'55,55,55',STYLE_SOLID,1,false,false,true,0);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| ChartEvent function |//+------------------------------------------------------------------+voidOnChartEvent(constint id, // идентификатор событияconstlong& lparam, // параметр события типа longconstdouble& dparam, // параметр события типа doubleconststring& sparam) // параметр события типа string
{
if(id==CHARTEVENT_KEYDOWN)
{
switch(int(lparam))
{
case KEY_TILDE:
Print("Нажата KEY_TILDE");
break;
}
ChartRedraw();
}
}
I have another headache - explain how to write the KEY_TILDE key for selecting the Rectangular Label object, so that it can be selected and moved to another place on the chart, I can't figure it out. I have attached a screenshot with an example on Fork Neo indicator at the bottom. I have understood the mouse, but I cannot use keys.
Colleagues, I am in a strange situation. It works well in the tester, it is set so that a random order is opened instantly when it is added to the chart. This is optimal for GBPUSD. However, it does not open orders on the demo. I have a wide spread, no errors, but, again, orders have not been opened for a day, but I have traded good within the same day using downloaded ticks in the tester. All settings of MetaTrader are normal, faces are smiling and connection with broker's server is also normal. I have to look what is wrong with the code. Although, this code doesn't need any induks and parameters are valid by its conditions for skipping opening orders. I am puzzling.
Порт-моне тв: Dear Colleagues, I have finished my Expert Advisor. It works well in the Strategy Tester but has been configured in such a way that it opens a random order immediately when it is added to the chart. This is optimal for GBPUSD. However, it does not open orders on the demo. I have a wide spread, no errors, but, again, orders have not been opened for 24 hours, but I have traded good within the same day using downloaded ticks in the tester. All settings of MetaTrader are normal, faces are smiling and connection with broker's server is also normal. I have to look what is wrong with the code. Although, this code doesn't need any induks and parameters are valid by its conditions for skipping opening orders. I am puzzling.
There are a lot of bottlenecks. The code is poorly written - extremely sloppy data handling. Needs refactoring
the code was written "for my beloved self, for beer and while I remember it" :-)
honestly - i downloaded it, looked at it diagonally, i don't understand it...
----
Any code is documented/commented in case of sudden personal professional amnesia. That's when you forgot everything except the programming language.
No one will parse an unknown algorithm implemented in unknown ways. For free, at least. For money, they'll just rewrite it.
You're one of them. After two or three months of break you will not remember why there were so many variables in OnTick and what they were intended to read
the code was written "for my beloved self, for beer and while I remember it" :-)
honestly - i downloaded it, looked at it diagonally, i don't understand it...
----
Any code is documented/commented in case of sudden personal professional amnesia. That's when you forgot everything except the programming language.
No one is going to parse an unknown algorithm implemented in unknown ways. For free, at least. For money, they'll just rewrite it.
You're one of them. Taking a two-three month break you will not remember why there were so many variables in OnTick and what they were intended to read
There's a lot of unnecessary stuff in there, to test let's say different functions. It shouldn't interfere and hasn't in other EAs, which just work. I suspect I put a parenthesis in the wrong place or something.
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.
Check MA crossing not on 1 and 2 bars, but on 3 and 4. And if there is a crossover, check the AO values on 1 and 2 bars.
I have another headache - explain how to write the KEY_TILDE key for selecting the Rectangular Label object, so that it can be selected and moved to another place on the chart, I can't figure it out. I have attached a screenshot with an example on Fork Neo indicator at the bottom. I have understood the mouse, but I cannot use keys.
I have another headache - explain how to write the KEY_TILDE key for selecting the Rectangular Label object, so that it can be selected and moved to another place on the chart, I can't figure it out. I have attached a screenshot with an example on Fork Neo indicator at the bottom. I have understood the mouse, but I cannot use keys.
Dear Colleagues, I have finished my Expert Advisor. It works well in the Strategy Tester but has been configured in such a way that it opens a random order immediately when it is added to the chart. This is optimal for GBPUSD. However, it does not open orders on the demo. I have a wide spread, no errors, but, again, orders have not been opened for 24 hours, but I have traded good within the same day using downloaded ticks in the tester. All settings of MetaTrader are normal, faces are smiling and connection with broker's server is also normal. I have to look what is wrong with the code. Although, this code doesn't need any induks and parameters are valid by its conditions for skipping opening orders. I am puzzling.
There are a lot of bottlenecks. The code is poorly written - extremely sloppy data handling. Needs refactoring
There are a lot of bottlenecks. The code is poorly written - extremely sloppy data handling. It needs refactoring.
Your abstract evaluation does not reveal the cause.
what fucking bottlenecks...what the @@#$ refactor
the code was written "for my beloved self, for beer and while I remember it" :-)
honestly - i downloaded it, looked at it diagonally, i don't understand it...
----
Any code is documented/commented in case of sudden personal professional amnesia. That's when you forgot everything except the programming language.
No one will parse an unknown algorithm implemented in unknown ways. For free, at least. For money, they'll just rewrite it.
You're one of them. After two or three months of break you will not remember why there were so many variables in OnTick and what they were intended to read
what fucking bottlenecks...what the @@#$ refactor
the code was written "for my beloved self, for beer and while I remember it" :-)
honestly - i downloaded it, looked at it diagonally, i don't understand it...
----
Any code is documented/commented in case of sudden personal professional amnesia. That's when you forgot everything except the programming language.
No one is going to parse an unknown algorithm implemented in unknown ways. For free, at least. For money, they'll just rewrite it.
You're one of them. Taking a two-three month break you will not remember why there were so many variables in OnTick and what they were intended to read