'########################################################### ' Script Name: Moving Label ' Author: Ehab Kanani ' Descreption: This Client Script will create a moving label on your chart ' Website: http://www.hybridsolutions.com ' Date: March, 22nd, 2012 '###########################################################
Dim objID
Dim XPos
Dim YPos
Dim fontSize
Dim objColor
Public Sub Main()
fontSize=8
objID="label2"
XPos=50
YPos=50
CreateObjectLabel 0,0,CSTR(objID),CINT(XPos),CINT(YPos),"Welcome to VTL World"
IntervalTimer 1000
EnableTimer True
End Sub
Public Sub OnTimer()
fontSize=fontSize+1
ObjColor=RGBColor(200,10 * fontSize,10 * fontSize)
ObjectSetText 0,CSTR(objID),CINT(fontSize),,CLNG(objColor)
if fontSize=30 then
EnableTimer false
End if
End Sub
Public Sub OnTick(SymbolName)
End Sub
Public Sub OnInit()
'''TODO: initialization method
End Sub
Public Sub OnDeInit()
'''TODO: deinitialization method
End Sub
See Also
Back to VTL Client Script Index
|