Re: Price Data Formatting
- From: "Webbiz" <noreply@xxxxxxx>
- Date: Tue, 19 Aug 2008 19:17:13 -0500
Wow Mike. I didn't realize you were so combatant. Forgive me for ruffling
your features. Not intended.
It's a lot easier for me to deal with one issue at a time. While you
apparently can multitask several threads at once, my mind goes into
overload. Try to be a bit easy on us mortals, okay?
As for my comment about 'mostly', it helps to know as I do that MOST of the
data will be of the correct format. Your example and point is noted and
understood, and so perhaps I should have stated it differently. But since I
was thinking in line with what I know that the most of the data will be in
the format I need and only a 'few' will not be (as opposed to your example
that showed the other way around), 'mostly' would work although not the
proper or correct way to go about it.
Yes. Looking for the 'maximum' digit off decimal is what I need to do, and
is what I was doing. Just wanted to know if it was the best way.
"what format is the data as you are loading it in."
That's the whole question originally. What is the best way to determine
this? I believe it's been covered with the String() function Steve posted.
"Is it being loaded as a floating point value (Single or Double or whatever)
is is it being loaded as a formatted string?"
As mentioned, this is price data, like stock prices. It's not going to be
'double' logically. However, it is whatever I want it to be, right? And
since my initial question was on "the best way to do this", how it is loaded
would fall under that same request, would it not?
Thanks anyway. I really didn't want to get into an argument over this. Sorry
for putting you out.
Regards.
Webbiz
"Mike Williams" <mikea@xxxxxxxxxxxxxxxxx> wrote in message
news:%23o%236rNkAJHA.4588@xxxxxxxxxxxxxxxxxxxxxxx
"Webbiz" <noreply@xxxxxxx> wrote in message
news:%23Hj8CejAJHA.5316@xxxxxxxxxxxxxxxxxxxxxxx
Mike, When you load in a datafile of a stock or commodity,
you get data like this for example:
1.2324
1.2345
1.234
1.2876
1.2865
Now, when I said 'MOSTLY', is that if you look at this data,
note that MOST have 4 digits following the decimal point.
What if I only sampled one of these and it happened to be the
third one down on that list? I'd end up with a 'pattern' for all
my displayed data that was only 3 digits following the decimal
rather than 4. So a 'sampling' is needed to note that MOST
of the data use 4 digits following the decimal.
Make sense?
Nope. Doesn't make sense at all. I never suggested that you should sample
only one data item. You've just made that up. I merely completely
disagreed with your own hypothesis that you should check how many decimal
digits MOST of the data items used. I suggested that instead of looking
for the number of decimal digits that MOST of the data items use you
should instead, with the specific "rider" I mentioned, look for the
MAXIMUM number of decimal digits in the data list. For example, using your
own suggestion of looking for the number of decimal digits used by MOST of
the data items, and running it on the following list:
1.23
1.24
1.2345
1.2876
1.28
You would deduce that MOST of the data items had two decimal digits, and
you would therefore according to your own hypothesis format ALL data items
to two digits (according to your own rule). Do you REALLY want to drop the
last two digits from those data items that actually contain four in the
above list. Think about it.
Right now, without any formatting, I get values that look
like this after a calculation:
1.2837463839834874
1. It doesn't fit well in my textboxes for display.
2. It simply does not look like the prices loaded.
Of course you need to format the data items, and it of course makes sense
and looks nice if you format them so that they all have the same number of
decimal digits. I am not arguing with that. What I AM arguing with is your
suggestion regarding how you should initially decide on how many decimal
digits you need to display. Using the number of decimal digits found in
MOST data items is not a good idea, as you should realise if you look
again at my previous message and check again the contents of this message.
You have asked for details of how to accomplish a specific task, but I
think your hypothesis is wrong, and if you are doing the WRONG thing it
doesn't matter how well you do it, it will still be wrong. Far better to
do the RIGHT thing badly than to do the WRONG thing well ;-)
By the way, I asked three distinct questions in my previous messages and
you have not answered a single one of them, apart from your accidental
"half answer" above to the method you are using to display the output. Do
you not actually read the responses you get? Do you just skip read them?
Are you a bit too busy to read them properly?
Mike
.
- Follow-Ups:
- Re: Price Data Formatting
- From: Mike Williams
- Re: Price Data Formatting
- References:
- Price Data Formatting
- From: Webbiz
- Re: Price Data Formatting
- From: Mike Williams
- Re: Price Data Formatting
- From: Webbiz
- Re: Price Data Formatting
- From: Mike Williams
- Re: Price Data Formatting
- From: Webbiz
- Re: Price Data Formatting
- From: Mike Williams
- Price Data Formatting
- Prev by Date: Re: Price Data Formatting
- Next by Date: Re: VB6 and Beyond
- Previous by thread: Re: Price Data Formatting
- Next by thread: Re: Price Data Formatting
- Index(es):
Relevant Pages
|