UNIX TO CANDLE ID
-
How can you change time stored in a variable as unix to candle id
-
iBarShift(NULL,PERIOD_CURRENT,"time value",false);
-
@jstap I tried it but it still doesnt convert
https://fxdreema.com/shared/ONk6nsQhb -
Try replace D"your time" with StrToTime("your time")
-
Exactly I only used " " to show the section to replace with your time, ultimately that code is expecting seconds after 1970
-
@jstap Do you mean it cant be possible or...?
-
@sktsec okay i'll try that
-
No what I mean is: iBarShift(NULL,PERIOD_CURRENT,StrToTime(2024.03.11 08:58),false); Put that in a comment using text code input and look at what's returned, make sure the date time used is on the current screen
-
@jstap I've tried it but still it doesn't work.https://fxdreema.com/shared/RADijXQ1d.
-
@jstap Plus I want to convert the time when it is already stored in a variable as a UNIX value to candle ID
-
Remove ID= and put a value into UNIX
-
@jstap The UNIX variable shouldn't change but its time value is to be converted to a candle id in this case to a variable called ID where it should be 5 if succesfull.
-
You are doing nothing with it so it's 0
-
@jstap https://fxdreema.com/shared/OUqf0WcKd
For this example show how I can get the candle ID of UNIX time variable...kindly show in the example -
There is 2 examples in this, 1 to put in a variable, and 1 to draw line
https://fxdreema.com/shared/w1fd6JFnc -
@jstap This works thanks a lot