I'm using version 6.0.0.6 of the AX control with VB6.
The tfExpavg function is giving me some trouble.
I'm trying to use a 13 minute period. The result is no where near my manual calc. Am I missing a parameter or something?
With MultiChart.Series(21)
.Clear
.SetFunction tfExpavg
.DataSource = "series0"
.FunctionType.Period = 13
End With
The series0 is a candlestick series. Hopefully it is using the close values.
I'm also concerned because I need to use the Bollinger band function as well with a exponential MA set to true.
Thanks,
David
Exponential moving average
Hi David,
have you tried to add the CheckDataSource method ?
have you tried to add the CheckDataSource method ?
Code: Select all
With MultiChart.Series(21)
.Clear
.SetFunction tfExpavg
.DataSource = "series0"
.FunctionType.Period = 13
.CheckDataSource
End With
Pep Jorge
http://support.steema.com
http://support.steema.com
Pep,
Not familiar with CheckDataSource method. What is is for?
Anyhow I just tried it again with CheckDataSource and the result is no different.
It must be something else. It looks like it's tracking the candle mid points. No point is outside the current candle range. A moving average will usually deviate from the candle points. This doesn't.
Thanks for getting back to me.
I guess I'll have to write my own EMA function.
David
Not familiar with CheckDataSource method. What is is for?
Anyhow I just tried it again with CheckDataSource and the result is no different.
It must be something else. It looks like it's tracking the candle mid points. No point is outside the current candle range. A moving average will usually deviate from the candle points. This doesn't.
Thanks for getting back to me.
I guess I'll have to write my own EMA function.
David
Hi David,
The CheckDataSource method will refresh all Series point values, either from database Tables, Queries or another Series points.
You can call this method regularly if you want new or modified data to appear in realtime in the Series.
The parent Chart will be automatically repainted to reflect any changes.
Series1.CheckDataSource ;
Using the following code works fine here (with the TeeChart Pro v7) :
DescriptionNot familiar with CheckDataSource method. What is is for?
The CheckDataSource method will refresh all Series point values, either from database Tables, Queries or another Series points.
You can call this method regularly if you want new or modified data to appear in realtime in the Series.
The parent Chart will be automatically repainted to reflect any changes.
Series1.CheckDataSource ;
Using the following code works fine here (with the TeeChart Pro v7) :
Code: Select all
With TChart1
.AddSeries scCandle
.Series(0).FillSampleValues (20)
.AddSeries scLine
.Series(1).SetFunction tfMovavg
.Series(1).DataSource = "Series0"
.Series(1).FunctionType.Period = 13
End With
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi David,
I'm sorry, I'm not able to reproduce any problem here. I'm going to need a sample code or example with which I can see it. Could you please post it at steema.public.attachments newsgropup or send it directly to [email protected] ?The tfExpavg is the one giving me trouble.
Pep Jorge
http://support.steema.com
http://support.steema.com
Sure.
The code in my original question was copied from the program.
With MultiChart.Series(21)
.Clear
.SetFunction tfExpavg
.DataSource = "series0"
.FunctionType.Period = 13
End With
It isn't that the function fails or gives an error, it's just that the values are not realistic. I'm not sure exactly what to show you as an example.
David
The code in my original question was copied from the program.
With MultiChart.Series(21)
.Clear
.SetFunction tfExpavg
.DataSource = "series0"
.FunctionType.Period = 13
End With
It isn't that the function fails or gives an error, it's just that the values are not realistic. I'm not sure exactly what to show you as an example.
David
Hi David,
Could you please send me a Chart which would be the correct for you ? An example with which I can compare what should we get instead ?It isn't that the function fails or gives an error, it's just that the values are not realistic. I'm not sure exactly what to show you as an example.
Pep Jorge
http://support.steema.com
http://support.steema.com