Good afternoon all. Dear programmers, please help me insert a line with the possibility to specify a sound file, for each Alert3.Lv1;2;3, to trigger a different sound that you specify.
Good afternoon all. Dear programmers, please help me to insert a string with the possibility to indicate a sound file for Alert3.Lv1;2;3 to trigger a different sound.
Good afternoon all. Dear programmers, please help me insert a string with the sound file for Alert3.Lv1;2;3 to trigger a different sound.
Trying to learn how to work with graphic panels and create my own.
I created 2 rectangles, 1 main rectangle, which coordinates all objects of the panel should be oriented to, when moving it.
I made such a condition in ChartEvent and now when I move the main rectangle, the second one moves only after 2-3 seconds, how to fix it? I also tried CHARTEVENT_MOUSE_MOVE in the condition, same effect
inputstring ds;//Параметры заднего фона панелиinputint x_offset_anchor=100;
inputint y_offset_anchor=100;
int anchor_width=150;
int anchor_height=20;
int back_height=100;
inputcolor anchor_color=clrBlue, back_color=clrAquamarine, clrBorder=clrAliceBlue;
inputstring ds2;////+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+intOnInit()
{
//--- indicator buffers mapping
RectLabelCreate(0,"Back_panel_anchor_point",0,x_offset_anchor,y_offset_anchor,anchor_width,anchor_height,anchor_color,BORDER_SUNKEN,CORNER_LEFT_UPPER,clrBorder,STYLE_SOLID,2,false,true,true,0);
RectLabelCreate(0,"Back_panel",0,x_offset_anchor,y_offset_anchor+anchor_height,anchor_width,back_height,back_color,BORDER_SUNKEN,CORNER_LEFT_UPPER,clrBorder,STYLE_SOLID,1,false,false,true,0);
ChartSetInteger(0,CHART_EVENT_MOUSE_MOVE,true);
//---return(INIT_SUCCEEDED);
}
voidOnDeinit(constint reason){
ObjectsDeleteAll(0,-1,-1);
}
//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime &time[],
constdouble &open[],
constdouble &high[],
constdouble &low[],
constdouble &close[],
constlong &tick_volume[],
constlong &volume[],
constint &spread[])
{
//---//--- return value of prev_calculated for next callreturn(rates_total);
}
//+------------------------------------------------------------------+//| ChartEvent function |//+------------------------------------------------------------------+voidOnChartEvent(constint id,
constlong &lparam,
constdouble &dparam,
conststring &sparam)
{
if(id == CHARTEVENT_OBJECT_DRAG && sparam == "Back_panel_anchor_point")
{
ObjectDelete(0,"Back_panel");
RectLabelCreate(0,"Back_panel",0,ObjectGetInteger(0,"Back_panel_anchor_point", OBJPROP_XDISTANCE),ObjectGetInteger(0,"Back_panel_anchor_point", OBJPROP_YDISTANCE)+anchor_height,anchor_width,back_height,back_color,BORDER_SUNKEN,CORNER_LEFT_UPPER,clrBorder,STYLE_SOLID,1,false,false,true,0);
}
}
//+------------------------------------------------------------------+//+------------------------------------------------------------------+ //| Создает прямоугольную метку | //+------------------------------------------------------------------+ bool RectLabelCreate(constlong chart_ID=0, // ID графика conststring name="RectLabel", // имя метки constint sub_window=0, // номер подокна constint x=0, // координата по оси X constint y=0, // координата по оси Y constint width=50, // ширина constint height=18, // высота constcolor back_clr=C'236,233,216', // цвет фона constENUM_BORDER_TYPE border=BORDER_SUNKEN, // тип границы constENUM_BASE_CORNER corner=CORNER_LEFT_UPPER, // угол графика для привязки constcolor clr=clrRed, // цвет плоской границы (Flat) constENUM_LINE_STYLE style=STYLE_SOLID, // стиль плоской границы constint line_width=1, // толщина плоской границы constbool back=false, // на заднем плане constbool selection=false, // выделить для перемещений constbool hidden=true, // скрыт в списке объектов constlong z_order=0) // приоритет на нажатие мышью
{
//--- сбросим значение ошибки ResetLastError();
//--- создадим прямоугольную метку if(!ObjectCreate(chart_ID,name,OBJ_RECTANGLE_LABEL,sub_window,0,0))
{
Print(__FUNCTION__,
": не удалось создать прямоугольную метку! Код ошибки = ",GetLastError());
return(false);
}
//--- установим координаты метки ObjectSetInteger(chart_ID,name,OBJPROP_XDISTANCE,x);
ObjectSetInteger(chart_ID,name,OBJPROP_YDISTANCE,y);
//--- установим размеры метки ObjectSetInteger(chart_ID,name,OBJPROP_XSIZE,width);
ObjectSetInteger(chart_ID,name,OBJPROP_YSIZE,height);
//--- установим цвет фона ObjectSetInteger(chart_ID,name,OBJPROP_BGCOLOR,back_clr);
//--- установим тип границы ObjectSetInteger(chart_ID,name,OBJPROP_BORDER_TYPE,border);
//--- установим угол графика, относительно которого будут определяться координаты точки ObjectSetInteger(chart_ID,name,OBJPROP_CORNER,corner);
//--- установим цвет плоской рамки (в режиме Flat) ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
//--- установим стиль линии плоской рамки ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
//--- установим толщину плоской границы ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,line_width);
//--- отобразим на переднем (false) или заднем (true) плане ObjectSetInteger(chart_ID,name,OBJPROP_BACK,back);
//--- включим (true) или отключим (false) режим перемещения метки мышью ObjectSetInteger(chart_ID,name,OBJPROP_SELECTABLE,selection);
ObjectSetInteger(chart_ID,name,OBJPROP_SELECTED,selection);
//--- скроем (true) или отобразим (false) имя графического объекта в списке объектов ObjectSetInteger(chart_ID,name,OBJPROP_HIDDEN,hidden);
//--- установим приоритет на получение события нажатия мыши на графике ObjectSetInteger(chart_ID,name,OBJPROP_ZORDER,z_order);
//--- успешное выполнение return(true);
}
Trying to learn how to work with graphic panels and create my own.
I've created 2 rectangles, 1 main rectangle, which coordinates all panel objects should be oriented to when moving it.
I have made such a condition in ChartEvent, and now when I move the main rectangle, the second moves only after 2-3 seconds, how to do it? also tried CHARTEVENT_MOUSE_MOVE in the condition, same effect
Repost from another thread. Maybe I'll shake someone up and get some help:
<The local experts remind me of my classmate (oh, how long ago it was) - he knew all the rules, all the formulas, but when to apply which, he could not immediately think, and went through almost everything, so that he never kept up with the allotted time. It's the same here: they know a lot, but they don't see the solution, they just work by "gut feeling". At the institute, we were taught to solve a problem without numbers and formulas, and only then will you clearly know which formulas to apply. Newcomers to MKL4 do not understand the subtleties of the language, and that is where they need help (not in the sense of "read a textbook"). But no one canshow you the pitfalls ofopening/closing positions. Maybe they do not know? So they let my question slide...>.
I appreciate your sarcasm, just not in a good way. What should I start doing? If I knew where to start, where to start and where to end, I probably wouldn't be interested in help from the more experienced sitters on this forum. I just think a person versed in this kind of activity, that is programming, it wouldn't be a problem for me to put some strings in some specific places, so that I could indicate a certain sound file in indicator. And you offer me to "start", with what basics should I start to master this great and inscrutable art of coding, so that I would know where correctly I need to put these same strings? Here's what I mean....
I appreciated your sarcasm, just not on merit. What should I start doing? If I knew where to start, where to start and where to end, I probably would not have shown interest in help from more experienced members of this forum. I just think a person versed in this kind of activity, that is programming, it wouldn't be a problem for me to put some strings in some specific places, so that I could indicate a certain audio file in indicator. And you suggest me to "start", with what basics should I start to master this great and inscrutable art of coding, so that I would know where correctly I need to put these same strings? Here's what I mean....
The indicators don't work, only alert, only 1 sound.
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.
Good afternoon all. Dear programmers, please help me insert a line with the possibility to specify a sound file, for each Alert3.Lv1;2;3, to trigger a different sound that you specify.
Good afternoon all. Dear programmers, please help me to insert a string with the possibility to indicate a sound file for Alert3.Lv1;2;3 to trigger a different sound.
Good afternoon all. Dear programmers, please help me insert a string with the sound file for Alert3.Lv1;2;3 to trigger a different sound.
Start making, and you will get help.
Start making, and you will get help.
Start making and you will get help.
Help, the skates aren't slipping.
Trying to learn how to work with graphic panels and create my own.
I created 2 rectangles, 1 main rectangle, which coordinates all objects of the panel should be oriented to, when moving it.
I made such a condition in ChartEvent and now when I move the main rectangle, the second one moves only after 2-3 seconds, how to fix it?
I also tried CHARTEVENT_MOUSE_MOVE in the condition, same effect
Help, the skates aren't slipping.
Trying to learn how to work with graphic panels and create my own.
I've created 2 rectangles, 1 main rectangle, which coordinates all panel objects should be oriented to when moving it.
I have made such a condition in ChartEvent, and now when I move the main rectangle, the second moves only after 2-3 seconds, how to do it?
also tried CHARTEVENT_MOUSE_MOVE in the condition, same effect
After creating an object and its moving I need to do ChartRedraw()
After creating an object and moving it, you have to do ChartRedraw()
Yes, that's better. And so it's impossible to make it glide smoothly, right?
upd added condition to redraw only if this main rectangle is selected and it's ok now, thanks for the help!)
Repost from another thread. Maybe I'll shake someone up and get some help:
<The local experts remind me of my classmate (oh, how long ago it was) - he knew all the rules, all the formulas, but when to apply which, he could not immediately think, and went through almost everything, so that he never kept up with the allotted time. It's the same here: they know a lot, but they don't see the solution, they just work by "gut feeling". At the institute, we were taught to solve a problem without numbers and formulas, and only then will you clearly know which formulas to apply. Newcomers to MKL4 do not understand the subtleties of the language, and that is where they need help (not in the sense of "read a textbook"). But no one canshow you the pitfalls ofopening/closing positions. Maybe they do not know? So they let my question slide...>.
Greetings, help to write the current price into a file.
Take a lookhere.
Start doing and you will get help.
Start doing and you will get help.
Start doing, and you'll get help.
I appreciate your sarcasm, just not in a good way. What should I start doing? If I knew where to start, where to start and where to end, I probably wouldn't be interested in help from the more experienced sitters on this forum. I just think a person versed in this kind of activity, that is programming, it wouldn't be a problem for me to put some strings in some specific places, so that I could indicate a certain sound file in indicator. And you offer me to "start", with what basics should I start to master this great and inscrutable art of coding, so that I would know where correctly I need to put these same strings? Here's what I mean....
I appreciated your sarcasm, just not on merit. What should I start doing? If I knew where to start, where to start and where to end, I probably would not have shown interest in help from more experienced members of this forum. I just think a person versed in this kind of activity, that is programming, it wouldn't be a problem for me to put some strings in some specific places, so that I could indicate a certain audio file in indicator. And you suggest me to "start", with what basics should I start to master this great and inscrutable art of coding, so that I would know where correctly I need to put these same strings? Here's what I mean....
Seehere.
Thank you, the values there are from a file and one time and I have a task that stretches over time.
Record the current price and time at the beginning of each day for 30 minutes, every 120 seconds.
Do not overwrite previous entries.