Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1054

 
LRA:

I wish it were like this! Set a problem and solve it yourself!!! Yes, everyone should know about "Drawing a Rectangle" xD.

How do you do it programmatically in an EA?
 
zasuka How to do it in your EA?

In life, it is difficult to isolate and simplify a sub-task from the task at hand. If you want a new telly, it is difficult to reduce the task to getting a piece of paper that says MONEY. While in programming one can and must select, simplify, solve, complicate and replace. The task can be solved like this. The base price is set. If the current price (Bid or Ask, it does not matter yet) is higher than the base price, then a blue rectangle, half an hour wide and 100 points high, is drawn down from the base price (or current?). If below - down. Will it do? Shall we do it?

 
LRA:

In life, it is difficult to isolate and simplify a sub-task from the task at hand. If you want a new telly, it is difficult to reduce the task to getting a piece of paper that says MONEY. While in programming one can and must select, simplify, solve, complicate and replace. The task can be solved like this. The base price is set. If the current price (Bid or Ask, it does not matter yet) is higher than the base price, then a blue rectangle, half an hour wide and 100 points high, is drawn down from the base price (or from the current one?). If below - down. Will it do? Shall we do it?



I'm not going to answer you anymore... You just like to talk!
 
zasuka:
I'm not going to answer you anymore... You just like to reason!
And you just wait for a solution? Then you should not be a programmer - only a freeloader...
 
artmedia70:
Are you just waiting for a ready-made solution? Then you should not be a programmer - only a freeloader...
agree with you absolutely)
 
artmedia70:
And you just wait for the ready solution? Then you shouldn't be a programmer - only a freeloader...

I'm not going to program in MQL. Let's talk less and get down to business: What do we have?

A brown channel as two lines (object v and n) and a white one(w).

http://joxi.ru/BA06N3zC4j0gmy

ObjectDelete("v");

ObjectCreate("v",OBJ_HLINE,0,0,Buf0[0]);

ObjectSet("v",OBJPROP_COLOR,DarkOrange);

ObjectSet("v",OBJPROP_WIDTH,1);

ObjectSet("v",OBJPROP_STYLE,0);


ObjectDelete("n");

ObjectCreate("n",OBJ_HLINE,0,0,Buf1[0]);

ObjectSet("n",OBJPROP_COLOR,DarkOrange);

ObjectSet("n",OBJPROP_WIDTH,1);

ObjectSet("n",OBJPROP_STYLE,0);

ObjectDelete("w");

ObjectCreate("w",OBJ_HLINE,0,0,Buf0[0]);

ObjectSet("w",OBJPROP_COLOR,White);

ObjectSet("w",OBJPROP_WIDTH,2);

ObjectSet("w",OBJPROP_STYLE,0);

So how to make it so that when the white line exceeds the boundary of v or n would be drawn Rectangle ? Something started digging but did not understand. Necessary somehow pull the price value of these lines (v, n, w). If w>v then draw Rectangle above v. If w<n then draw Rectangle below n. Like this)

ObjectCreate("RECT", OBJ_RECTANGLE, 0, (Time[16]),Low[4],time,price);

ObjectSet("RECT",OBJPROP_COLOR, Navy);

 
zasuka:

I'm not going to program in MQL. Let's talk less and get down to business: What do we have?

A brown channel as two lines (object v and n) and a white one(w).

http://joxi.ru/BA06N3zC4j0gmy

ObjectDelete("v");

ObjectCreate("v",OBJ_HLINE,0,0,Buf0[0]);

ObjectSet("v",OBJPROP_COLOR,DarkOrange);

ObjectSet("v",OBJPROP_WIDTH,1);

ObjectSet("v",OBJPROP_STYLE,0);


ObjectDelete("n");

ObjectCreate("n",OBJ_HLINE,0,0,Buf1[0]);

ObjectSet("n",OBJPROP_COLOR,DarkOrange);

ObjectSet("n",OBJPROP_WIDTH,1);

ObjectSet("n",OBJPROP_STYLE,0);

ObjectDelete("w");

ObjectCreate("w",OBJ_HLINE,0,0,Buf0[0]);

ObjectSet("w",OBJPROP_COLOR,White);

ObjectSet("w",OBJPROP_WIDTH,2);

ObjectSet("w",OBJPROP_STYLE,0);

So how to make it so that when the white line exceeds the boundary of v or n would be drawn Rectangle ? Something started digging but did not understand. Necessary somehow pull the price value of these lines (v, n, w). If w>v then draw Rectangle above v. If w<n then draw Rectangle below n. Like this)

ObjectCreate("RECT", OBJ_RECTANGLE, 0, (Time[16]),Low[4],time,price);

ObjectSet("RECT",OBJPROP_COLOR, Navy);

I would advise you to contact here: https://www.mql5.com/ru/job
 

I think I've got the Rectangle figured out. Here's what I need: how do I find out the last time and date in the window? Thanks in advance for the answer.

 

Guys! I can't figure out how to write the function.... the task is to find a bar on the chart, which equals the last two bars for a certain period, and if it is not equal, then do nothing.... stopped at this

if(iHigh(NULL,PERIOD_CURRENT,20)==(H==H1))

where H is current bar

where H1 is the previous bar

At the same time, if we remove the iHigh function, the indicator shows where on the chart H==H1 is.

Help please, the fourth day is gone.

 
kocunyc89:

Guys! I can't figure out how to write the function.... the task is to find a bar on the chart, which equals the last two bars for a certain period, and if it is not equal, then do nothing.... stopped at this

if(iHigh(NULL,PERIOD_CURRENT,20)==(H==H1))

where H is current bar

where H1 is the previous bar

At the same time, if we remove the iHigh function, the indicator shows where on the chart H==H1 is.

Help please, the fourth day is gone.

iTime() to help you
Reason: