[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 854

 
Infinity:

This does not work whatever I have done )) now I get an error of wrong parameter )) if I set it as D'23' then error '23' - date literal string is incomplete

1. Declare a variable X of datetime type, initialize it with the current date/time.

2. Increase X until it reaches 23 hours.

3. Use X in the order opening operation.

dateime X=TimeCurrent();
while(TimeHour(X)!=23|| TimeMinute(X)!=0) X++;

OrderSend(.......,X,....);
 
Infinity:

Now I get an error of wrong parameter) if I set it as D'23' then the error '23' - date literal string is incomplete


Didn't notice it at first:

In OrderSend - 11 parameters, after the comment and before the expiry date there is a magik - missing parameter

https://docs.mql4.com/ru/trading/OrderSend

 
alsu:

1. Declare a variable X of datetime type, initialize it with the current date/time.

2. Increase X until it reaches 23 hours.

3. Use X in the order opening operation.

You can use Hour().

 
alsu:

1. Declare a variable X of datetime type, initialize it with the current date/time.

2. Increase X until it reaches 23 hours.

3. Use X in the order opening operation.



Thank you so much... everything now works as it should, by the way the last version also worked, .... it kept failing to work and getting an error,... but after I installed the magician, it all worked right away )
 

Good day to all and have a nice week.

Mr. programmers, maybe there is a script or an Expert Advisor that would change the time frame on the open windows of mt4, with a certain periodicity, not critical - once every minute or five minutes, to update the graphical representation of indicators, and immediately return back. I.e. periodically just pull the picture to liven things up.

 
RekkeR:

Good day to all and have a nice week.

Mr. programmers, maybe there is a script or an Expert Advisor that would change the time frame on the open windows of mt4, with a certain periodicity, not critical - once every minute or five minutes, to update the graphical representation of indicators, and immediately return back. I.e. periodically just pull the picture to liven things up.


look at https://www.mql5.com/ru/code/9099

I think it can be modified to suit your needs

 
Sayod:
Sorry, maybe not on topic, need help. From me a big thanks, (and SET EA with settings + $ 2) to someone who adds to the code of the EA martingale function, so that after the 3rd triggered stop loss increases the lot by one unit until the take profit (example: 0.01, 0.01, 0.01, 0.02, 0.02, 0.03) help, please ...


I don't want to bother, so now it's like this: if on stop, then lot x2, if on take, then start lot

the MARTIN setting switches this function off

 

A suggestion, please: there is datetime time1=D'2010.09.20 00:00';(time is 00:00) and you need to get the date and time of the previous day. Of course, you can manually enter the second value

datetime time2=D'2010.09.19 00:00'; but I need it to be calculated from first time1.

 
Alexandr24:

Please advise: there is a datetime value time1=D'2010.09.20 00:00';(time 00:00) and now you need to get the date and time of the previous day. You can of course enter the second value manually

datetime time2=D'2010.09.19 00:00'; but you need it to be calculated from time1.

time (datetime) in seconds. You may use the formula:

time1 - [hour]*60*60

 
IgorM:


I don't want to bother, so now it's like this: if on stop, then lot x2, if on take, then start lot

the MARTIN setting switches this function off

Thanks, pretty close to the target, but can we do as I said?)
Reason: