DislikedThanks for your response. This is exactly why I'm confused, since the indi is not working as you described here.
I attached 2 pics...you can see the M1 chart, the source chart, has its first candle as 9:31....but if you look at the second chart, an M47 chart created from this data, the first candle is at 9:13, and the second candle at 10:00.. neither of these candles are 47 minutes after 9:31. It is like the data is starting somewhere further back in time. See what I mean?Ignored
You're right. It turns out the bar start time is an even multiple of minutes as calculated from Jan 1, 1970.
That said... what does it matter really? The "47min" bar is not an even multiple of a day or a week, so no matter what the start time is of the 1st bar on your M1 chart is, it's going to be irregular and different for every day and week thereafter. If you desire to modify the program so that the bars do repeat on a predictable regular basis, then go for it.
FYI, here is a simple script which retrieves the time value (in sec) for any date. It proves that your M47 2nd bar at "2010.02.04 10:00" is an even multiple of 47minutes(*60sec) as compared to 1970.01.01 00:00:00.
Inserted Code
#property show_inputs // This key property for scripts brings up a popup window of the extern variables. extern string mytime = "2010.02.04 10:00"; extern int permult = 47; //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { datetime mytimesec = StrToTime(mytime); datetime timeshiftminutes = -1*MathMod(mytimesec,permult*60.0)/60.0; Alert("mytime: ",mytime," mytimesec: ",mytimesec, " timeshiftminutes: ",timeshiftminutes); return(0); }
I'm pretty much done with this topic of irregular PeriodMultipliers.