Login
Try VertexFX
  • Home
  • Knowledgebase
  • Blog
  • Home
  • Knowledgebase
  • Blog

Object Functions

home/Knowledge Base/Technical Support/API/Client API's/VTL/VTL Client Scripts/Object Functions/AddObject

AddObject

7 views 0 Updated on December 16, 2021 hybrid-solutions

Syntax

Public Function AddObject (chart_id As Long, name As String, objType As ENUM_OBJECT, nwin As Long, time1 As String, price1 As Double, Optional time2 As String = "0", Optional price2 As Double = 0,Optional vColor As Long=0,Optional vWieght As Integer=1) As Boolean

Description

This function is used to create an object by a given the object type with a specified name.

Parameters

Key Description
chart_Id Chart identifier. 0 mean the current chart, value of type Long.
name Object key, the value of type String.
objType The type of object that wants to add, the value of typeENUM_OBJECT.
nwin Chart subwindow, the value of type Long.
time1 The time coordinate of the first anchor, the value of type String.
price1 The price coordinate of the first point, the value of type Double.
time2 The time coordinate of the second anchor, the optional value of type String.
price2 The price coordinate of the second point, the optional value of type Double.
vColor The object color, the optional value of type Long.
vWieght Object weight, the optional value of type Integer.

Return value

Returns true if the object is created. Otherwise returns false. In order to get an error , call GetLastError() function.

Remark

If the object required time to create it then you can createthis object with afuture time.

Sample

 Public Sub main () Dim ObjID  ObjID = Rec  AlertMessage AddObject (0, Cstr (ObjID), OBJ_RECTANGLE, 0,13/06/2016 12:22:00, 1.12787,13/06/2016 12:03:00, 1.262)  Return true if object added successfully   End sub

See Also

  • ObjectBitMap
  • AddPricelabel
  • CreateObjectLabel


Back to VTL Client Script Index

Was this helpful?

Yes  No
Leave A Comment Cancel reply

ObjectBitMap  

About
VertexFX Trader has a closed-loop trading structure with Backoffice dealing desk, Client Terminals, Dedicated Hosting, White Labelling and Bridging Capabilities. Through VertexFX Risk Management Bridge...
Categories
  • Mobile Trader
  • Lite VertexFX Mobile Trader
  • Release Notes
  • Technical Support
  • VertexFX Pro Setup
Community
  • Blog
  • Media Center
Need Support?
If you need any further help, don't hesitate to send a support request to our support team.
Contact Support
  • Privacy Policy
  • Brokers Terms
  • Traders EULA
  • ISV Terms
  • Plugins EULA
  • Copyright 2023 hybridsolutions.com. All Rights Reserved.