Everybody knows. IN MT4. There is a strategy tester. It is possible to push the enumeration of parameters, through optimization.
The question is as follows.
Can we shove this optimization, search of parameters, into the Expert Advisor? If the Expert Advisor optimizes parameters from time to time, it selects those that are profitable and works with them? Say, every 7 days the Expert Advisor optimizes for 7 days. And selected parameters on the profitability. And them owls, already working further 7 days?
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
Everybody knows. IN MT4. There is a strategy tester. It is possible to push the enumeration of parameters, through optimization.
The question is as follows.
Can we shove this optimization, search of parameters, into the Expert Advisor? If the Expert Advisor optimizes parameters from time to time, it selects those that are profitable and works with them? Say, every 7 days the Expert Advisor optimizes for 7 days. And selected parameters on the profitability. And them owls, already working further 7 days?
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
В статье описана и представлена библиотека функций, позволяющая проводить оптимизацию входных параметров советника, запуская оптимизацию непосредственно из советника.
And visually goes over(under) 0 bar, no, check the box in properties, beam.
The line is a trend line. Changed properties to a ray. It did not help. Ideally, I want the price to be displayed regardless of the position of the zero bar (top, bottom).
The line is trending. Changed the properties to a ray. It did not help. Ideally the price should be displayed regardless of the position of the zero bar (top, bottom).
This code doesn't work either.
int start() {
double pr=ObjectGetValueByShift("line",0);
If (Bid==pr){
Alert (pr);}
return(0);}
Did you type the line name correctly?
Try this script, and show what it says in the logs.
voidOnStart()
{
double pr;
int obj_total=ObjectsTotal();
string name;
int i;
for(i=0;i<obj_total;i++)
{
name=ObjectName(i);
if(ObjectType(name)!=OBJ_TREND) continue;
PrintFormat("Объект %d: Имя объекта - %s",i,name);
pr=ObjectGetValueByShift(name,0);
PrintFormat("Объект %d: Цена - %.5f",i,pr);
}
}
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points on every tick, but nothing worked)
To clarify, 3 separate lines. I would not link to mql4 primer. Just share the working code
В чем различия между тремя режимами тестирования в MetaTrader 5 и на что обратить внимание? Как происходит тестирование эксперта, торгующего одновременно на нескольких инструментах? Когда и как вычисляются значения индикаторов при тестировании и как обрабатываются события? Как синхронизировать бары с разных инструментов при тестировании в режиме "Только цены открытия"? Статья призвана дать ответы на эти и многие другие вопросы.
In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar.
This will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT programming.
I hope that other experienced participants of our forum will join the discussion of this issue and the branch will be interesting for everybody.
Here is the task. To the iCustom Expert Advisor, we will call the data of the indicators that stand on the higher timeframes. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the working code
В чем различия между тремя режимами тестирования в MetaTrader 5 и на что обратить внимание? Как происходит тестирование эксперта, торгующего одновременно на нескольких инструментах? Когда и как вычисляются значения индикаторов при тестировании и как обрабатываются события? Как синхронизировать бары с разных инструментов при тестировании в режиме "Только цены открытия"? Статья призвана дать ответы на эти и многие другие вопросы.
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the code that works.
The function
//+----------------------------------------------------------------------------+//| Автор : Ким Игорь В. aka KimIV, http://www.kimiv.ru |//+----------------------------------------------------------------------------+//| Версия : 30.03.2008 |//| Описание : Установка объекта OBJ_HLINE горизонтальная линия |//+----------------------------------------------------------------------------+//| Параметры: |//| cl - цвет линии |//| nm - наименование ("" - время открытия текущего бара) |//| p1 - ценовой уровень (0 - Bid) |//| st - стиль линии (0 - простая линия) |//| wd - ширина линии (1 - по умолчанию) |//+----------------------------------------------------------------------------+void SetHLine(color cl, string nm="", double p1=0, int st=0, int wd=1) {
if (nm=="") nm=DoubleToStr(Time[0], 0);
if (p1<=0) p1=Bid;
if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_HLINE, 0, 0,0);
ObjectSet(nm, OBJPROP_PRICE1, p1);
ObjectSet(nm, OBJPROP_COLOR , cl);
ObjectSet(nm, OBJPROP_STYLE , st);
ObjectSet(nm, OBJPROP_WIDTH , wd);
}
Alexey Viktorov: This is not the problem of Stop Loss but of the open price of the pending order. If the price of the pending order is incorrect, the error is 130.
I've tried to place the pending order within double spread of the price. Only then the error disappears. I don't understand if this is correct?
For example, BUYSTOP order is set at 60 points of Bida. TakeProfit also does not allow to be set less by the value of spread.
I do not understand why it is so. It does not work on the real account but works in the demo mode.
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.
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
Want to hear the answer, someone who understands this. Let's say the amount of work. The severity of the work. etcetera. What it's all about.
Here's the article https://www.mql5.com/ru/articles/1467 ...
Do you havea Trend line?
And visually goes over(under) 0 bar, no, check the box in properties, beam.
The line is a trend line. Changed properties to a ray. It did not help. Ideally, I want the price to be displayed regardless of the position of the zero bar (top, bottom).
This code doesn't work either.
int start() {
double pr=ObjectGetValueByShift("line",0);
If (Bid==pr){
Alert (pr);}
return(0);}
Good afternoon everyone!
Question, on insta when trying to send an order, it says that the stops are wrong.
Here is the line itself:
OrderSend(Symbol(),OP_BUYSTOP,Lots,HiP,3,0,0,NULL,111,0,clrBlue);
Stop Loss and Take Points have 0. If I set a number in Stop Loss, everything is normal.
I don't need Stop Loss. What should I do?
The line is trending. Changed the properties to a ray. It did not help. Ideally the price should be displayed regardless of the position of the zero bar (top, bottom).
This code doesn't work either.
int start() {
double pr=ObjectGetValueByShift("line",0);
If (Bid==pr){
Alert (pr);}
return(0);}
Did you type the line name correctly?
Try this script, and show what it says in the logs.
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points on every tick, but nothing worked)
To clarify, 3 separate lines. I would not link to mql4 primer. Just share the working code
In this thread I want to begin to help those who really want to understand and learn programming in the new MQL4 and want to easily switch to MQL5 - the languages are very similar.
This will be a good place to discuss tasks, algorithms of their solution and any other questions concerning MT programming.
I hope that other experienced participants of our forum will join the discussion of this issue and the branch will be interesting for everybody.
Here is the task. To the iCustom Expert Advisor, we will call the data of the indicators that stand on the higher timeframes. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the working code
We have a task. Data from the indicators on the higher timeframes is called into the iCustom Expert Advisor. Let's call their support and resistance lines.
Suppose the three figures x1 x2 x3. Please help me to write code that draws lines with these three figures directly in EA.
I tried ObjCreate (I want them to be drawn on a chart as points onevery tick, but nothing worked)
To clarify, 3 separate lines. Please do not refer to mql4 tutorial. Just share the code that works.
The function
Place it outside void OnTick() function
And this is inside void OnTick()
Please help - I can't understand why I get zero when calculating the VesMass array in i>0 values ?
This is not the problem of Stop Loss but of the open price of the pending order. If the price of the pending order is incorrect, the error is 130.
I've tried to place the pending order within double spread of the price. Only then the error disappears. I don't understand if this is correct?
For example, BUYSTOP order is set at 60 points of Bida. TakeProfit also does not allow to be set less by the value of spread.
I do not understand why it is so. It does not work on the real account but works in the demo mode.