I am trying to find in your documentation for examples of creating functions by code, the help file are referring to the following
"Function is a component. When you add a new function you are adding a Series, defining a new function and setting it as FunctionType for the Series.
Series1.SetFunction(TAddTeeFunction.Create(Self));
See the online help for a description of how to add each of the different types of function. Each function uses the same Series method, SetFunction.
"
I have created the following stockhastic function by code, but I would like to see different examples like for :
:MACD
:RSI
:Boilinger bands
:RVI
Please if possible point me to the right help file or examples to use the function properly by code.
here is my code on stockhastic :
Code: Select all
with chart1 do
begin
tmpStockhastic := TLineSeries.Create(self);
addSeries(tmpStockhastic);
tmpStockhastic.SetFunction(TStochasticFunction.Create(self));
tmpStockhastic.DataSources.Clear;
tmpStockhastic.DataSources.Add( candleSeries );
tmpStockhastic.FunctionType.Period := StrToInt(edtSeries.Text);
tmpAxis:=Chart1.CustomAxes.Add as TChartAxis;
tmpStockhastic.CustomVertAxis:=tmpAxis;
tmpAxis.Axis.Color:=Color;
end;