function preMain(){ setPriceStudy(true); setShowTitleParameters(false); setComputeOnClose(); setStudyTitle("1 second data feed"); setShowCursorLabel(false); } function main(){ if(isLastBarOnChart()) setGlobalValue ("mydata", new int_data(0)); } function int_data(n){ this.year = getYear(n); this.month = getMonth(n); this.day = getDay(n); this.hour = getHour(n); this.minute = getMinute(n); this.second = getSecond(n); myDate = new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second); //debugPrintln("sec chart " + myDate + "\n") var txtFlags = Text.ONTOP | Text.RELATIVETOLEFT | Text.RELATIVETOBOTTOM; var mon = (this.month); drawTextAbsolute(5, 110, "Date is " + myDate, Color.blue, null, txtFlags, null, 12, "mydatea"); drawTextAbsolute(5, 90, "Year is " + this.year, Color.blue, null, txtFlags, null, 12, "year"); drawTextAbsolute(5, 75, "Month is " + mon, Color.blue, null, txtFlags, null, 12, "month"); drawTextAbsolute(5, 60, "Day is " + this.day, Color.blue, null, txtFlags, null, 12, "day"); drawTextAbsolute(5, 45, "Hour is " + this.hour, Color.blue, null, txtFlags, null, 12, "hour"); drawTextAbsolute(5, 30, "Minute is " + this.minute, Color.blue, null, txtFlags, null, 12, "minute"); drawTextAbsolute(5, 15, "Second is " + this.second, Color.blue, null, txtFlags, null, 12, "second"); }