I'm using the following piece of code to figure out the date and time of the last completed bar, and then convert the values to the appropriate formats to be used in statements like arrow drawing. It appears to be working fine. Is there a better way?
date_last_bar = JulianTodate(LastCalcJDate); // YYYMMdd
time_last_bar = StrToNum(FormatTime("HHmmss", LastCalcSSTime/(24.0*60.0*60.0))); // HHmmss
Arw_New_self_s(date_last_bar, time_last_bar, high+offset, True);
date and time of last compleed bar
Questions about MultiCharts and user contributed studies.
4 posts • Page 1 of 1