Errors, bugs, questions - page 2176

 

Problem. I use standard CTrade::SellStop class

When adding an order, I send expiration = TimeCurrent()+3600; (I have checked time - it is correct)

An order is not deleted.

Something else may need to be added, since this is a standard class.

Thank you in advance.

 
Anton Ohmat:

Problem. I am using standard CTrade::SellStop class

When adding an order, I pass expiration = TimeCurrent()+3600;

The order is not deleted.

Maybe, something else should be added, since this is a standard class.

Thanks in advance

What do you pass in

type_time=ORDER_TIME_GTC

[in] Type of order expiration time from enumeration ENUM_ORDER_TYPE_TIME.

?

 
Vladimir Karputov:

What do you pass in

type_time=ORDER_TIME_GTC

[in] Type of order expiration time from enumeration ENUM_ORDER_TYPE_TIME.

?

Dope. THANK YOU
 
not posting screenshots from the terminal to the website...
 
Vladimir Pastushak:
not posting screenshots from the terminal to the website...

Fixed.

 
Alexander:

Corrected.

Thank you!

 

I'm encountering this display on custom characters

the last digit (in the example Digits == 1) is not visible. Changing the size of the window does not affect the display.

Is it possible to fix this in today's build?

 
I can't find an answer to the question, how can I use 6 variables of int type (year, month, day, hour, minute) to write the time value corresponding to the given parameters into a variable of datetime type? Then I need to find the index of the candle that opened at that time, but that's not a problem for me. If anyone has a link where you can find the answer, please, I'll figure it out on my own.
 
Maxim Khrolenko:
I can't find an answer to the question, how can I use 6 variables of int type (year, month, day, hour, minute) to write the time value corresponding to the given parameters into a variable of datetime type? Then I need to find the index of the candle that opened at that time, but that's not a problem for me. If you have a link where you can find the answer, please, let me know and I will try to do it myself.

Fill in MqlDateTime structure and get full date and time from it.

Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура даты
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура даты
  • www.mql5.com
Порядковый номер в году day_of_year в високосном году, начиная с марта, будет отличаться от порядкового номера соответствующего дня в невисокосном году.
 
Maxim Khrolenko:
I can't find an answer to the question, how to write a time value corresponding to the given parameters into a variable of datetime type based on 6 variables of int type (year, month, day, hour, minute)? Then I need to find the index of the candle that opened at that time, but that's not a problem for me. If anyone has a link where you can find the answer, please, I'll figure it out on my own.

StringToTime

int year = 2018, month = 4, date = 15, hour = 13, minute = 23;
datetime myTime = StringToTime(IntegerToString(year) + "." + IntegerToString(month) + "." + IntegerToString(date) + " " + IntegerToString(hour) + ":" + IntegerToString(minute));