[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 538

 

I want to draw a horizontal segment in the indicator from the given value ExtMapBuffer1[i]

sideways by the value of b

(period if 1 hour b=24, if 30 min b=48, i.e. number of bars in one day)

ObjectCreate("highLine",OBJ_TREND,0,Time[i],ExtMapBuffer1[i],Time[i]+b,ExtMapBuffer1[i]);

But alas, it doesn't draw...

 
DOCTORS:

I want to draw a horizontal segment in the indicator from the given value ExtMapBuffer1[i]

sideways by the value of b

(period if 1 hour b=24, if 30 min b=48, i.e. number of bars in one day)

ObjectCreate("highLine",OBJ_TREND,0,Time[i],ExtMapBuffer1[i],Time[i]+b,ExtMapBuffer1[i]);

But alas, it doesn't draw...

time in seconds
 
DOCTORS:

I want to draw a horizontal segment in the indicator from the given value ExtMapBuffer1[i]

sideways by the value of b

(period if 1 hour b=24, if 30 min b=48, i.e. number of bars in one day)

ObjectCreate("highLine",OBJ_TREND,0,Time[i],ExtMapBuffer1[i],Time[i]+b,ExtMapBuffer1[i]);

But alas, it doesn't draw...

b=48*Period()*60;//and
ObjectCreate("highLine",OBJ_TREND,0,Time[i],ExtMapBuffer1[i],Time[i-b],ExtMapBuffer1[i]);

 
costy_:



Thanks, but now the problem is just a ray instead of a segment...i.e. from the first point it goes sideways, clearly the problem is with the second coordinate, but I haven't figured it out yet.
 
DOCTORS:

Thanks, but now the problem is just a ray instead of a segment...i.e. it goes away from the first point, clearly the problem is with the second coordinate, but haven't figured it out yet.
ObjectSet("highLine",OBJPROP_RAY,false);

https://docs.mql4.com/ru/objects/objectset

https://docs.mql4.com/ru/constants/objects/properties

OBJPROP_RAY10boolGets/sets the ray property flag for objects like OBJ_TREND and similar

 

costy_:





Thank you so much! Phew... my first turkey :)

Now the question is, what function should I prescribe so that it deletes all of its graphics after removing an indicator?

 

Hi all!

my robot does WindowScreenShot("shots\\")

currents question:

>>> how to mail this .gif file from the folder?

Thanks in advance!

 

Question for connoisseurs:

Why do the Bid and Ask internally not correspond to what is shown on the chart?

I put Bid and Ask values in the commentary, which I take off in two different ways.

 
Hello! Help me find a simple Expert Advisor! The first position was opened based on the last candle close, and all subsequent positions are opened depending on the close of the last transaction. If a Buy position was closed with a stop loss the next one will be open with a Sell position with the specified stop loss and take profit, which will be the same for both BUY and SELL positions and vice versa, and so on and so forth, constantly will work one transaction. It is important that transactions are opened with and closed at the same time!
 
Professionals, a word of advice. In Delphi there is such a concept as IncHour, etc. The task is to add any period of time to any date variable and not to get an error. For example, to the date of position opening + 9 hours 30 minutes, and then check if the time has passed. Is there something like that in mql4?