Price Label
Posted by Yousef Ibrahim, Last modified by Diana Alkouni on 07 September 2020 01:35 PM

'###########################################################
' Script Name: Price Label
' Author: Ehab Kanai
' Descreption: This Client Script will create a price label on the chart
' Website: http://www.hybridsolutions.com
' Date: March, 22nd, 2012
'###########################################################

Dim objID
Dim SymbolName 
Dim askValue


''' <summary>
''' The main function is the entry point for any Script program
''' </summary>
Public Sub main()
fontSize=8
objID="Pricelabel1"
XPos=10
YPos=10


SymbolName=ChartSymbol(0)
SymbolSelect CSTR(SymbolName),CBool(True)
SymbolInfoDouble CSTR(SymbolName) ,2,askValue

if not AddPricelabel (0,0,CDbl(askValue),CSTR(objID)) then 
AlertMessage ErrorDescription(GetLastError())
end if

End Sub

''' <summary>
''' The function is generated when a new tick is received fro any symbol
''' </summary>

 
Public sub OnTick(SymbolName)

if not SymbolInfoDouble( CSTR(SymbolName) ,2,askValue) then 
AlertMessage ErrorDescription(GetLastError())
End if

SetPricelabel 0,CSTR(objID),PRICE_LABEL_POSITION,CDbl(askValue)

End Sub


 See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions