CCI Function gives Exception

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
cdn
Newbie
Newbie
Posts: 29
Joined: Wed Sep 19, 2007 12:00 am

CCI Function gives Exception

Post by cdn » Wed Oct 17, 2007 8:38 am

Hi:

The CCI function gives exception if the datapoints exceed 195. I am enclosing the stack trace for your reference. Could you please let us know any workaround etc.?

Code: Select all

The count = 195
CCI - Start, end64.0,80.0, 3,3
CCI - 195
The count = 197
CCI - Start, end64.0,80.0, 3,3
CCI - 197
Exception in thread "AWT-EventQueue-0"  java.lang.ArrayIndexOutOfBoundsException: 196
	at com.steema.teechart.functions.CCI.addPoints(CCI.java:130)
	at com.steema.teechart.styles.Series.addValuesFrom(Series.java:1022)
	at com.steema.teechart.styles.Series.fillFromDataSource(Series.java:2347)
	at com.steema.teechart.styles.Series.checkDataSource(Series.java:2388)
	at com.steema.teechart.styles.Series.setDataSource(Series.java:2287)
	at StockFrame.cciFunction(StockFrame.java:2693)
	at StockFrame.chartFunctionIndicators(StockFrame.java:1865)
	at StockFrame.createFrame(StockFrame.java:3496)
	at StockFrame.cbSInds_actionPerformed(StockFrame.java:516)
	at StockFrame_cbSInds_actionAdapter.actionPerformed(StockFrame.java:3934)
	at javax.swing.JComboBox.fireActionEvent(Unknown Source)
	at javax.swing.JComboBox.setSelectedItem(Unknown Source)
	at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
	at StockFrame.cbBSymbols_actionPerformed(StockFrame.java:380)
	at StockFrame_cbBSymbols_actionAdapter.actionPerformed(StockFrame.java:3901)
	at javax.swing.JComboBox.fireActionEvent(Unknown Source)
	at javax.swing.JComboBox.setSelectedItem(Unknown Source)
	at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Any insights are appreciated. Thanks.

best regards,

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Oct 17, 2007 9:15 am

Hi cdn,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

cdn
Newbie
Newbie
Posts: 29
Joined: Wed Sep 19, 2007 12:00 am

Post by cdn » Thu Oct 18, 2007 8:37 am

Hi:

I wouldn't able to give you a project. What I can give is the data points? Then, you can try it out and let me know what happens. If that is ok, please let me know. Thanks.

best regards,

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 18, 2007 9:21 am

Hi cdn,

Please notice that your current project is not necessary, just a simple example project we can run "as-is" would be enough to reproduce the problem here. However, if this is not possible, then yes please, send us the data and we will try to reproduce the issue.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

cdn
Newbie
Newbie
Posts: 29
Joined: Wed Sep 19, 2007 12:00 am

Post by cdn » Fri Oct 19, 2007 8:16 am

Hi:

We have uploaded the file "cci-dataset.txt". This has 201 datapoints. Let us know if you have any questions. Thanks.

best regards,

Marc
Site Admin
Site Admin
Posts: 1258
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon Oct 22, 2007 2:09 pm

Hello,

Thankyou for sending throught the sample data. We have found a problem on calculating set size with the CCI function. That has been corrected and the fix will be included in the next maintenance release.

Regards,
Marc Meumann
Steema Support

Post Reply