Support Board
Date/Time: Sat, 23 Nov 2024 00:17:21 +0000
Post From: Clock code?
[2013-04-20 14:14:41] |
ganz - Posts: 1048 |
hi i've not seen the countdown clock code so this is just my exmpl #include "sierrachart.h" SCDLLName("clock_b1") SCSFExport scsf_clock_b1(SCStudyGraphRef sc) { if (sc.SetDefaults) { sc.GraphName = "clock_b1"; sc.GraphRegion = 0; sc.StudyDescription = "clock >> beta 1 << @ganz "; sc.FreeDLL = 1; sc.AutoLoop = 1; return; } sc.UpdateAlways = 1; int Hour, Minute, Second; SCDateTime SysTime = sc.CurrentSystemDateTime; SCString TimeStr; TimeStr.Format("%i:%02i:%02i ", SysTime.GetHour(), SysTime.GetMinute(), SysTime.GetSecond()); s_UseTool Tool; Tool.Clear(); Tool.ChartNumber = sc.ChartNumber; Tool.Region = sc.GraphRegion; Tool.DrawingType = DRAWING_TEXT; Tool.ReverseTextColor = 0; Tool.BeginIndex = sc.Index; Tool.BeginValue = sc.BaseDataIn[SC_HIGH][sc.Index]; Tool.Color = COLOR_YELLOW; Tool.FontFace = "Arial"; Tool.FontSize = 10; Tool.FontBold = true; Tool.Text = TimeStr ; Tool.AddMethod = UTAM_ADD_OR_ADJUST; Tool.LineNumber = 55115511; Tool.TextAlignment = DT_VCENTER ; sc.UseTool(Tool); } gd lck Date Time Of Last Edit: 2013-04-20 14:20:03
|