Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 812

 
Igor Makanu:

If there is a need to write in a third-party software, MQL supports the connection of .dll

I.e. these dlls perform many functions that are not in mql, c++ mql supports? Is it true that dlls are faster than the mql4 shell itself?

 
There is a well-known indicator of sessions with four their arrangement in the form of lines in the basement and in the window of the chart with squares and made less these squares removed the sides, and left only the horizontal passage of the sessions and there are on these lines more readings of the price, but because the price movement in sessions transition occurs immediately from one line to another, and the price touches two sessions simultaneously one on another. I need help to move these prices apart a bit, otherwise the picture is not very visible. The code to output the price for all sessions e.g. the bottom pass-through:
objname = session + " Session Low";
ObjectCreate(objname, OBJ_TREND, 0, time1, price1, time2, price1);
ObjectSet(objname, OBJPROP_COLOR, session_color);
ObjectSet(objname, OBJPROP_BACK, true);
ObjectSet(objname, OBJPROP_WIDTH, Session_rectangle_line_width);
ObjectSet(objname, OBJPROP_RAY, 0);
objname = session + " Session Low label";
ObjectCreate(objname, OBJ_TEXT, 0, time2 - 1800, price1);
ObjectSet(objname, OBJPROP_BACK, false);
ObjectSetText(objname, DoubleToStr(price1, Digits), font_size + 2, "Tahoma", font_color);
And each session is printed as follows:
// Chicago
datetime ChicagoSessionBeginUTC = TimeTableToUTC(day, ChicagoBegins, ChicagoDSTStarts, ChicagoDSTEnds);
datetime ChicagoSessionBegin = UTCToLocalTime(ChicagoSessionBeginUTC, Broker_standard_time_zone, Broker_DST_start, Broker_DST_end);
datetime ChicagoSessionEnd = ChicagoSessionBegin + (ChicagoEnds - ChicagoBegins);
OHLC(ChicagoSessionBegin, ChicagoSessionEnd);
PlaceRectangle("Chicago " + idstring, "Chicago", ChicagoSessionBeginUTC - ChicagoSessionBegin, ChicagoSessionBegin, low, ChicagoSessionEnd, high, ChicagoColor, ChicagoBackColor, 1);

Please help add a price slider in the last code very please programmers to be able to see the price better.


 

QUOTES QUOTES QUESTION (if you're in the wrong place, feel free to redirect)

I have a quote in Ducascopy:

Tick csv

Minute csv

Minute hst

Question: Why do I need tick quotes if I have minute quotes?

Thank you!

 
Roni Iron:

Question: Why do I need tick quotes when I have minute quotes?

Tick quotes will most accurately show the price fluctuations, considering that the price can change hundreds of times in a minute, it is very rare to find complete tick quotes. Maybe they even have all the Bid and Ask spreads, I would also like to find them to accurately test the robot in a real market situation with all the requotes gaps etc. in order to adjust its details. If we have tick quotes and take into account the aforementioned facts we can adjust the robot to real events directly on the history, which cannot be done on a 1-minute chart. Let others share their opinions on this subject. What symbols do you have these quotes for and what platform and over what time period?

 
Seric29:

If you are not sure what to do with the ticks, you should ask your broker what they think about them.

If you are going to trade with a broker, you may use ticks from any broker but it does not make sense to use ticks from any other broker

Every broker has its own quotes provider, often there are several of them, plus the algorithms of quote smoothing

as in general - if you need real ticks, then transfer your TS to MQL5 - there is testing by real ticks, you will save time when testing

 

Greetings. Is there any way to "save" a comment to an order when partially closing?

At a partial close, the log shows a full close and the opening of a new one with the volume as the difference between the last and the close, with the comment "from ticket closed" and the modification function does not allow to change the comment to overwrite it

 
Andrey Sokolov:

Greetings. Is there any way to "save" a comment to an order when partially closing?

At a partial close, the log shows a full close and the opening of a new one with the volume as the difference between the last and the close, with "from ticket closed" in the comment and the modification function does not allow to change the comment to overwrite it

Maybe try opening the opposite closing volume and apply OrderCloseBy?

 
koctja:
All have long known indicator of the sessions is with their four locations in the form of lines in the basement and in the chart window with squares and made them less these squares have removed the sides, and left only the horizontal passage of the sessions and there are on these lines is still a price reading, but because the price movement of the sessions transition occurs immediately from one line to another, and the price touches the two sessions simultaneously one on another. I need help to move these prices apart a bit, otherwise the picture is not very visible.

Turn the text by 30-40 degrees. Then the labels will remain readable, but they will overlap less often

add "multiplication" - when the mouse pointer is inside the session, highlight the price in size and colour

 

Why does the PlaySound() function return true but no sound is played? And it works during initialization, but not in the code

 
Good evening, can you give me a hint? I am reading FileOpen from a text .csv file. There are three values in each line of the file, they are instrument, date (in descending order) and price. I want to get the price comment for the latest date (this is the first line), but the file is always read to the end and I get the oldest price comment (from the last line). How can I get the price value from the first line into the comment without any workarounds (and I don't know the date from the first line)?
Reason: