| tfogle |
|
Gold User, Member, TeleChart
|
| Registered User |
|
|
|
|
| Unsure |
|
| Tuesday, November 2, 2004 |
| Thursday, September 3, 2015 3:30:32 PM |
9 [0.00% of all post / 0.00 posts per day] |
|
|
Thanks for holding my hand on this. I'll play with it and see how it works.
|
To quick to hit the post button.
In the first case, I have done all the suggested actions with no result. As in, the very large numbers which would end in a decimal are rounded and wrong when compared to a calculator, and no decimal is ever shown, only "xxxxxxxx.00". It appears that it's numbers that are larger than 1 million. For the sake of it, I tried using "double" instead of "single" for the variables and that didn't help.
|
|
The simplest of mistakes, eh?
|
|
I just realized that I need to put 1-10 in an array to get proper calculation above. ^^^^
|
Here's another bit I was working on that only returns whole numbers.
I must be doing something wrong?
'# PH = indicator.Library.Price
'Define variables
Dim sigmaXY As Single
Dim days As Single
'NUMBER OF DAYS
days = 10
'Calculate sigmaXY
For i As Integer = 1 To days
sigmaXY = sigmaXY + (days * PH.Value(days - 1))
Next i
plot = sigmaXY
|
First, I'm not much of a programmer and second don't know much about Visual Basic. So please forgive me if I ask some ignorant questions.
I'd like to create some "Sum" (sigma) statements that I can use in a formula. I don't know of any predefined code and have made up my own. The problem is then, when multiplying to very large numbers, there seems to be an issue of accuracy. As in the numbers are rounded at some point during the calculation and become inaccurate. Here is an example that calculates the sum of 1 to 10 and multiplies it by the sum of the price hisotry for the last 10 days:
'# PH = indicator.Library.Price
'define variables
Dim sigmaX As Single
Dim sigmaY As Single
Dim days As Single
'HOW MANY DAYS?
days = 10
'calculate Sigma X
For i As Integer = 1 To days
sigmaX = sigmaX + i
Next i
'Calculate Sigma Y
For i As Integer = 1 To days
sigmaY = sigmaY + PH.Value(i-1)
Next i
Plot = sigmaX * sigmaY
The discrepancies are most noticable when using the formula with the DJ-30. It seems the numbers are rounded to the nearest whole number, but sometimes StockFinder disagrees with my calculator by up to 2.5. Somewhere, the decimals are getting clipped or rounded or something, and I'm worried it may throw my final calculations off.
Is there a way to get the program to use at least 2 decimals in this instance?
|
|
^^^ Previous message was formatted into paragraphs so it was easy to read. Sorry for the change, I don't know what happened.
|
|
Is there a way for both programs to use the same data set on my computer?TC2000 for funds is a decent program that doesn't allow any user designed plots. Even though this seems to have started as part of the TeleChart programs, somewhere along the line Funds were spun off and completely ignored. There has been no update since 2001, and many of the features that came in the later versions (for stocks) would be useful to me in funds. So now, I'm looking at StockFinder (for funds). Aside from having to now learn to program my plots (something I didn't need to know in TeleChart) I cannot now export to text in a format for which my spreadsheets have been designed. The idea of opening an editing a file for every mutual fund is daunting.In the mean time, I'm paying for one or the other. I suppose I could pay for the same data twice to maintain functionality of both programs. In reality, I hope that there's a way to get both programs to work off the same data set so I can export to text with TC2000 to keep my current system working while I learn to be a programmer to see if I can get StockFinder to work for me.Anyone have any ideas?
|
|