Knowledgebase:
CreateNewSymbol
Posted by Fouad Faraj Allah, Last modified by Angham Al-Banawien on 28 June 2018 02:40 PM

Syntax 

Public Function CreateNewSymbol (ParentID As String , Name As String, Optional OpenDay As String = "Monday", Optional OpenTime As String = "00:00", Optional CloseDay As String = "Friday", Optional CloseTime As String = "23:59", Optional DailyCloseTime1 As String = "", Optional DailyOpenTime1 As String = "", Optional DailyCloseTime2 As String = "", Optional DailyOpenTime2 As String = "", Optional DailyCloseTime3 As String = "", Optional DailyOpenTime3 As String = "", Optional TickPips As String = "1", Optional MarketIsClosed As Boolean = False, Optional DDESource As String = "", Optional IsUsed As Boolean = False, Optional PipLoc As String = "1", Optional RefSymbol As String = "1", Optional ContractSize As String = "1000", Optional Direct As String = "1", Optional RefCalc As String = "1", Optional MoveIfClosed As Boolean = False, Optional Unit As String = "1", Optional IntEnabled As Boolean = False, Optional IntBuyRate As String = "0", Optional IntSellRate As String = "0", Optional IntYearDays As String = "365", Optional IntDayClose As String = "00:00", Optional IntSatDays As String = "00", Optional IntSunDays As String = "00", Optional IntMonDays As String = "00", Optional IntTusDays As String = "00", Optional IntWedDays As String = "00", Optional IntThrDays As String = "00", Optional IntFriDays As String = "00", Optional StopTradeIfNoPrices As Boolean = False, Optional StopTradeSeconds As String = "20", Optional Requotable As Boolean = False, Optional BackColor As String = "-2147483639", Optional MOType As String = "1", Optional PairNo As String = "", Optional description As String = "", Optional SpreadType As String = "1", Optional JustClose As Boolean = False, Optional BuyOnly As Boolean = False, Optional ExpDate As String = " ", Optional EnableDel As Boolean = False, Optional InterestType As String = "0", Optional MainUnitFactor As String = "1") As SymbolSettingsEnum

Description

This function is used to create a new symbol under the given group number. After CreateNewSymbol method executes
the CreateSymbolResultReceived event fires.

Parameters

Parameter Description 
ParentID The group Identifier which want to create symbol under it. Value of type is String.
“”: Means create symbol under the root. 
Name  Symbol name which want to be created. Value of type is String.
OpenDay The weekly opening day, Optional value of type is String.
OpenTime The weekly opening time, Optional value of type is String.
CloseTime The weekly closing time, Optional value of type is String.
DailyCloseTime1 The daily close time 1, Optional value of type is String.
DailyOpenTime1 The daily open time 1, Optional value of type is String.
DailyCloseTime2 The daily close time 2, Optional value of type is String.
DailyOpenTime2 The daily open time 2, Optional value of type is String.
DailyCloseTime3 The daily close time 3, Optional value of type is String.
DailyOpenTime3 The daily open time 3, Optional value of type is String.
TickPips The number of pips desired to be increase or deceased at the chatting window for this symbol. Optional value of type is String.
MarketIsClosed To determine the trade Status if open or close, Optional value of type Boolean
True : Means close.
False : Means open.
DDESource The source name for this sample, it is named in the currency server. Optional value of type is String.
IsUsed To determine if the symbol is used or not, Optional value of type is Boolean.
PipLoc The number of decimal moving point. Optional value of type Is String.
RefSymbol The referencing symbol ID that will be used in profit calculation. Optional value of type is String.
ContractSize The value of contract size, Optional value of type is String.
Direct The calculation mode Optional value of type is String.
 1: Means direct.
-1: Means indirect.
RefCalc The reference symbol calculation mode, the profit formula dependent on it, Optional value of type is String.
 1: Means Multiplication.
-1: Means Division.
MoveIfClosed To determine the symbol price will be moving although the system market is closed. Optional value of type is Boolean.
Unit The ID of amount type that you are using at trading, Optional Value of type is String. 
IntEnabled To determine if the interest is enabled for this symbol, Optional value of type is Boolean.
IntBuyRate The yearly long interest rate value, the valid value range is from 1 to -1, Optional value of type is String.
IntSellRate

The yearly short interest rate value, the valid value range is from 1 to -1, Optional value of type is String.

IntYearDays The year days value to be calculated in interest formula, Optional value of type is String.
IntDayClose The close time which the interest will be calculated every day, Optional value of type is String.
IntSatDays How many Times do you need to calculate the interest for this symbol at Saturday. Optional value of type is String.
IntSunDays How many Times do you need to calculate the interest for this symbol at Sunday. Optional value of type is String.
IntMonDays How many Times do you need to calculate the interest for this symbol at Monday. Optional value of type is String.  
IntTusDays How many Times do you need to calculate the interest for this symbol at Tuesday. Optional value of type is String. 
IntWedDays How many Times do you need to calculate the interest for this symbol at Wednesday. Optional value of type is String.
IntThrDays How many Times do you need to calculate the interest for this symbol at Thursday. Optional value of type is String.
IntFriDays How many Times do you need to calculate the interest for this symbol at Friday. Optional value of type is String.
StopTradeIfNoPrices To determine if you want to stop trading at this symbol after scound value when no price, Optional value of type is Boolean.
StopTradeSeconds The value of second that the trade will be stopped if no price. Optional value of type is String.
Requotable To determine when the dealer change the price the confirmation message will be sent to user or not. Optional value of type is Boolean.
BackColor The market watch color for this symbol, Optional value of type String.
MOType The market order type “At Price” or “Market”, Optional Value of type is String.
 1: Means “At Price”.
 2: Means “Market”.
PairNo The Symbol Id to be paired with source.
description The symbol description, Optional value of type is String.
SpreadType The spread calculation type”From bid/From average”. Optional value of type is String.
 1: Means From bid.
 2: means From average.
JustClose To determine the trade type, Optional value of type boolean.
True: Means just close.
False: Means full trade.
BuyOnly To determine the start trade with value. Optional value of type is Boolean.
True: Means buy only.
False: Means buy and sell. 
ExpDate To indicate the expiry date for this symbol, Optional Value of type is String.
EnableDel To active the deliver option, Optional value of type is Boolean.
InterestType To set the interest type, Optional value of type String can be one of the following :
  0: Swap by Interest.
  1: Swap by Point.
  2: Swap by Money.
MainUnitFactor To set the main unit factor ,Optional value of type String.

Return value

Returns value of type SymbolSettingsEnum. If the request sent to server successfully it will return SuccessSymbolSettingResult.

Sample

Public WithEvents BOAPI as new CVertexFXBOAPI

Private Sub NewSymbol_Click  (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewSymbol.Click

    Dim result As SymbolSettingsEnum

    result = BOAPI.CreateNewSymbol("", "NewSymbol",,,,,,,,,,True,,True,,,,,,False,,True,,,,,,,,,,,,True,,True,,, ,,,False,True,,False)

    MsgBox ("result” & result)

End Sub

End Sub

 


See Also


VertexFX Backoffice API Index

 

Last Modified: 03 January 2017 03:38 PM 

(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