Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: tfogle
About
User Name: tfogle
Groups: Gold User, Member, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Tuesday, November 2, 2004
Last Visit: Thursday, September 3, 2015 3:30:32 PM
Number of Posts: 9
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Wednesday, February 15, 2012 8:13:33 PM
Thanks for holding my hand on this. I'll play with it and see how it works.
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Wednesday, February 15, 2012 9:55:11 AM
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.
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Wednesday, February 15, 2012 9:49:58 AM
The simplest of mistakes, eh?
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Tuesday, February 14, 2012 10:52:13 PM
I just realized that I need to put 1-10 in an array to get proper calculation above. ^^^^
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Tuesday, February 14, 2012 10:45:21 PM
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
Topic: Interesting problems with VERY LARGE NUMBERS and decimals
Posted: Tuesday, February 14, 2012 10:32:21 PM
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?
Topic: Questions about StockFinder (for funds) Vs. TC2000 Funds.
Posted: Thursday, January 14, 2010 6:34:48 PM
^^^ Previous message was formatted into paragraphs so it was easy to read. Sorry for the change, I don't know what happened.
Topic: Questions about StockFinder (for funds) Vs. TC2000 Funds.
Posted: Thursday, January 14, 2010 6:33:15 PM
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?