N must be integer in N-second bars, was: How to create timestamp candle

Hello Guys, good afternoon.

i am try to create timestamp in seconds of 130.833333333333.

so i am first try Preferences>Intraday>Customs time intervals. in this setting only allow 130 seconds. but not allow milliseconds.
so i am try another option DataBase Settings>Intraday Settings>Per-database Settings>Time Shifts.
i put TimeShift -0.0363425925925926. but i am getting error.


i don't know this is correct way for timestamp candle.



OpeninM = O;
HighinM = H;
LowinM = L;
CloseinM = C;


OpeninM = TimeFrameCompress(OpeninM, tfrm, compressOpen );
HighinM = TimeFrameCompress(HighinM, tfrm, compressHigh);
LowinM = TimeFrameCompress(LowinM, tfrm, compressLow);
CloseinM = TimeFrameCompress(CloseinM, tfrm, compressLast);

OpeninM = TimeFrameExpand(OpeninM, tfrm, expandFirst);
HighinM = TimeFrameExpand(HighinM, tfrm, expandLast);
LowinM = TimeFrameExpand(LowinM, tfrm, expandLast);
CloseinM = TimeFrameExpand(CloseinM, tfrm, expandLast);

PlotOHLC(OpeninM,HighinM,LowinM,CloseinM,"Candle",IIf( CloseinM > OpeninM, colorGreen, colorRed ),styleCandle|styleOwnScale);
Title = EncodeColor( colorViolet )+ "Open " + OpeninM + "High " + HighinM + "Low " + LowinM + "Close " + CloseinM ;

any one please guide me.

This is all wrong. Speaking about N-seconds interval only integer N-second intervals can be used and N must be in range of 1..59.
Above that you can use N-minute intervals, and again N must be integer (such as 2 minute, 3-minute)

1 Like