Posted by Mohammad Rahhal, Last modified by Abdullah Almasharfah on 10 January 2019 11:27 AM

Public Function SetIndicatorData(chart_ID As String, indName As String, value As Double)

This function is used to update the custom indicator which is added before by AddCustomIndicator method in the specified chart.


Key Description 
chart_Id Chart identifier, 0 is the current chart, value of type String.
indName Name of added indicator, a value of type String.
value The new value for the indicator to be set, a value of type Double.

Return value

No value returned.


Dim indKey

Dim vchartId

Dim vchartName

Dim resultValue

Public Sub Main()

Dim highArry()



  CopyHigh 0,1, bars(0),highArry

  indKey=AddCustomIndicator(0, highArry,0)

End Sub

Public Sub OnTick(SymbolName)

ObjectSeriesGetValue 0,cstr(vchartName & ".high"),bars(0),resultValue

ObjectSeriesSetValue 0,CSTR(indKey),bars(0),CDBL(resultValue)

End Sub

Public Sub OnCalculate(symbol ,symPeriod, openVal , highVal , lowVal , closeVal )

SetIndicatorData 0,CSTR(indKey),CDbl(highVal)

End Sub


See Also

Back to VTL Client Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
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