ObjectSet
Posted by Mohammad Rahhal, Last modified by Fouad Faraj Allah on 04 July 2019 02:43 PM

Syntax

Public Function ObjectSet(chart_id As Long, name As String, prop_Id As Integer, prop_Value As Variant)As Boolean

Description

This function is used to change the values of the specified object property by a given the property id and it's value.

Parameters

Key Description 
chart_ID Chart identifier, 0 mean the current chart, the value of type Long.
Name Object key, the value of type String.
prop_Id The property that want to change its value it can be ENUM_OBJECT_PROPERTY.
prop_Value The new value for a property, the value of type Variant.


Return value

Return true if successful.Otherwise, it returns false.To get the detailed error information call GetLastError() function.
 

Sample 1

Public Sub main()

   Dim objID

   objID="Text1"

   AddObject Clng(0), CSTR(objID), OBJ_TEXT, Cint(0), "16/03/2013 00:00:00", 3.49672

   ObjectSetText Clng(0), Cstr(objID), Cint(18), RGBcolor(0,255,0)

   Text= " poivet"

   Objectset Clng(0),Cstr(objID), 2 ,Cstr(Text)

End Sub


Sample 2

 ‘To update the levels of Fibonacci objects using local VTL
Public Sub main()

   AddObject 0,"Fibo",7,0,GetTime(0,bars(0)-10),GetHigh(0,bars(0)-10),GetTime(0,bars(0)),GetHigh(0,bars(0))

   ObjectSet 0,"Fibo",8,False

   ObjectSet 0,"Fibo",7,0

   ObjectSet 0,"Fibo",7,0.001

   ObjectSet 0,"Fibo",7,0.010

   ObjectSet 0,"Fibo",7,0.220

   ObjectSet 0,"Fibo",7,0.430

   ObjectSet 0,"Fibo",7,0.67

   ObjectSet 0,"Fibo",7,0.88

   ObjectSet 0,"Fibo",7,0.99

   ObjectSet 0,"Fibo",7,1.5

   ObjectSet 0,"Fibo",7,2.0

   ObjectSet 0,"Fibo",9,true

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