Page 1 of 1

CCI Function gives Exception

Posted: Wed Oct 17, 2007 8:38 am
by 7665742
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,

Posted: Wed Oct 17, 2007 9:15 am
by narcis
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!

Posted: Thu Oct 18, 2007 8:37 am
by 7665742
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,

Posted: Thu Oct 18, 2007 9:21 am
by narcis
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.

Posted: Fri Oct 19, 2007 8:16 am
by 7665742
Hi:

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

best regards,

Posted: Mon Oct 22, 2007 2:09 pm
by Marc
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