It turned out to be not so simple. I added a number to the name, 3 (for example) lines are created, but they don't move anywhere:( It turns out that I have to do a closed loop and assign a new number each time, but here the situation is identical with assigning
The issue is this, there is a self-made graphical indicator, but the problem is the following, when a certain point comes, let us say the current time
if ((k>=15 && k<16) || (Hour()>=15)) // где k- по прошлым дням (для рисования не только в одном дне, но и по всей истоии)
It should draw an extremum at an old trading session (it's convenient to determine where the trade is now), but the catch is that the indicator doesn't draw the chart, only if you switch timeframe back and forth ...
Here is a piece of drawing code
if (Close[iHighest(NULL,0,MODE_CLOSE,8*p_t,i-15*p_t)]> Open[iHighest(NULL,0,MODE_OPEN,8*p_t,i-15*p_t)]) {
Fox_RM: Function code for drawing lines. Thank you so much to everyone who responded.
void flatline(string nm,datetime t1,double p1,datetime t2,double p2,color clr, int W){
ObjectDelete(nm);// это не обязательно.ObjectCreate(nm, OBJ_TREND, 0,0,0,0,0);
ObjectSet(nm, OBJPROP_PRICE1,p1);
ObjectSet(nm, OBJPROP_TIME1,t1);
ObjectSet(nm, OBJPROP_PRICE2,p2);
ObjectSet(nm, OBJPROP_TIME2,t2);
ObjectSet(nm, OBJPROP_COLOR, clr);
ObjectSet(nm, OBJPROP_STYLE,0);
ObjectSet(nm, OBJPROP_RAY,false);
ObjectSet(nm, OBJPROP_WIDTH,W);
ObjectSet(nm, OBJPROP_BACK, true);
WindowRedraw();// если обновлять на каждом тике, лучше поставить в самом конце стартаreturn;
}
Can you tell me why I get an integer without a comma in vverh/(Konec/100) expression? After the decimal point, the digits should be up to the 4th digit, but it just comes out as an integer. =(
Alert ("number of zero bars = ", nul, " - ", DoubleToStr(nul/(Konec/100),2), " % " ); this expression does not work too.
Can you tell me why I get an integer without a comma in vverh/(Konec/100) expression? There should be digits after the decimal point up to the 4th digit, but it just comes out as an integer. =(
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.
It turned out to be not so simple. I added a number to the name, 3 (for example) lines are created, but they don't move anywhere:( It turns out that I have to do a closed loop and assign a new number each time, but here the situation is identical with assigning
time line name. It's just awful...
Look at this indicator
indicate at the beginning of the programme
Guys help,
The issue is this, there is a self-made graphical indicator, but the problem is the following, when a certain point comes, let us say the current time
if ((k>=15 && k<16) || (Hour()>=15)) // где k- по прошлым дням (для рисования не только в одном дне, но и по всей истоии)
It should draw an extremum at an old trading session (it's convenient to determine where the trade is now), but the catch is that the indicator doesn't draw the chart, only if you switch timeframe back and forth ...
Here is a piece of drawing code
if (Close[iHighest(NULL,0,MODE_CLOSE,8*p_t,i-15*p_t)]> Open[iHighest(NULL,0,MODE_OPEN,8*p_t,i-15*p_t)])
{
max_eu=Close[iHighest(NULL,0,MODE_CLOSE,8*p_t,i-15*p_t)];
Name="max2";
ObjectCreate(Name,OBJ_TREND,0,Time[iHighest(NULL,0,MODE_OPEN,8*p_t,i-15*p_t)],max_eu,Time[i]+l,max_eu);
ObjectSet(Name, OBJPROP_COLOR, Navy);
ObjectSet(Name,OBJPROP_RAY,false);
ObjectSet(Name, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1 | OBJ_PERIOD_M30| OBJ_PERIOD_M15 | OBJ_PERIOD_M5);
ObjectSet(Name, OBJPROP_WIDTH, 1);
Label="надпись2";
ObjectCreate(Label,OBJ_TEXT,0,Time[i]+l,max_eu);
ObjectSetText(Label,"Max Европа ", 8, "Arial", Navy);
ObjectSet(Label, OBJPROP_TIMEFRAMES, OBJ_PERIOD_H1 | OBJ_PERIOD_M30| OBJ_PERIOD_M15 | OBJ_PERIOD_M5);
WindowRedraw();
}
I'm confused...
DOCTORS:
homemade
I'm confused...
it's the right thing to do
To unravel, you can put Print() after if(...) and see if the condition is even includedTell me if there are similar programmes to collect statistics?
}Function code for drawing lines. Thank you so much to everyone who responded.
Alert ("number of bull bars = ", vverh, " - ", vverh/(Konec/100), " % " );
Can you tell me why I get an integer without a comma in vverh/(Konec/100) expression? After the decimal point, the digits should be up to the 4th digit, but it just comes out as an integer. =(
Alert ("number of zero bars = ", nul, " - ", DoubleToStr(nul/(Konec/100),2), " % " ); this expression does not work too.
Alert ("number of bull bars = ", vverh, " - ", vverh/(Konec/100), " % " );
Can you tell me why I get an integer without a comma in vverh/(Konec/100) expression? There should be digits after the decimal point up to the 4th digit, but it just comes out as an integer. =(