Syntax
Public Function SetIndicatorData(chart_ID As String, indName As String, value As Double)
Description
This function is used to update the custom indicator which is added before by AddCustomIndicator method in the specified chart.
Parameters
Key | Description |
chart_Id | Chart identifier, 0 is the current chart, value of typeString. |
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.
Sample
Dim indKeyDim vchartIdDim vchartNameDim resultValuePublic Sub Main()Dim highArry()vchartId=chartId vchartName=ChartSymbol(Clng(vchartId)) CopyHigh 0,1, bars(0),highArry indKey=AddCustomIndicator(0, highArry,0)End SubPublic Sub OnTick(SymbolName)ObjectSeriesGetValue 0,cstr(vchartName & ".high"),bars(0),resultValueObjectSeriesSetValue 0,CSTR(indKey),bars(0),CDBL(resultValue)End SubPublic Sub OnCalculate(symbol ,symPeriod, openVal , highVal , lowVal , closeVal )SetIndicatorData 0,CSTR(indKey),CDbl(highVal)End Sub
See Also