• Home
  • Knowledgebase
  • Blog
  • My Account
  • Try VertexFX
  • Home
  • Knowledgebase
  • Blog
  • My Account
  • Try VertexFX

Custom Indicators

home/Knowledge Base/Technical Support/API/Client API's/VTL/VTL Client Scripts/Custom Indicators/NewCandle

NewCandle

9 views 0 Updated on December 29, 2023 hybrid-solutions

Syntax

Public Sub NewCandle (Chart_Index as integer , indName as string , OpenValue as double , HighValue as double , LowValue as double , CloseValue as double )

This function is used toadd new candle to specified indicator which is added before by AddCustomIndicatorCandles method in the specified chart.

Parameters

Parameters Description
chart_index Chart position on the chart windows, 0 means the current chart, value of type integer
ArrOpen The open prices array to be drawn. Value of type double
arrHigh The High prices array to be drawn. Value of type double
arrLow The Low prices array to be drawn. Value of type double
ArrClose The close prices array to be drawn. Value of type double
indName Name of added indicator, value of type String

Return value

No return value.

Sample

Dim indKeyDim vchartIdDim vchartNameDim resultValuePublic Sub Main()    Dim OpenArry()    Dim highArry()    Dim LowArry()    Dim CloseArry()     vchartId=chartId     vchartName=ChartSymbol(Clng(vchartId))      CopyOpen 0,1, bars(0),OpenArry      CopyHigh 0,1, bars(0),highArry      CopyLow 0,1, bars(0),LowArry      CopyClose 0,1, bars(0),CloseArry     indKey=AddCustomIndicatorCandles(0, openArry , highArry,lowArray ,  closeArry ,1,False,0,"Indicator",VbRed,VbBlue)End SubPublic Sub OnCalculate(symbol ,symPeriod, openVal , highVal , lowVal , closeVal )      NewCandle 0,CSTR(indKey),cdbl(openVal),CDbl(highVal) ,CDbl(lowArray) ,CDbl(closeArry)End Sub

See Also

  • AddCustomIndicator
  • SetIndicatorData
  • SetArrowStyle

Back to VTL Client Script Index

Was this helpful?

Yes  No
Leave A Comment Cancel reply

  NewTick

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
  • Release Notes
  • Technical Support
  • VertexFX Pro Setup
  • Mobile Trader
  • Lite VertexFX Mobile Trader
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 2024 hybridsolutions.com. All Rights Reserved.