vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - Stock Trader for vBulletin (https://vborg.vbsupport.ru/showthread.php?t=135084)

zethon 01-23-2007 05:15 PM

Could those of you who have seen the after-hours-trading-cheat in action please try this fix to see if this resolves the problem?

I've attached one file to this post. Simply upload this file to your /includes directory, overwriting the already existing file. If this does fix the cheat, I will include this in an official update.

zethon 01-23-2007 05:29 PM

Quote:

Originally Posted by xxxsaint (Post 1165263)
Any new news on the mutual funds part ?

I have a fix for this. I will include this in the next update which should come some time tomorrow night (EST).

Marko777 01-23-2007 07:15 PM

Today I'm getting an error (it worked perfectly for two days. I haven't changed a thing):

Quote:

Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /includes/class_stocktrader.php on line 65

Warning: file(http://quote.yahoo.com/d/quotes.csv?...nl1vc1p2d1t1xp) [function.file]: failed to open stream: Connection timed out in /includes/class_stocktrader.php on line 65

Warning: implode() [function.implode]: Bad arguments. in /includes/class_stocktrader.php on line 65

Warning: Division by zero in /vbtrade.php on line 112

Warning: Division by zero in /vbtrade.php on line 112

Warning: Division by zero in /vbtrade.php on line 112

zethon 01-23-2007 07:32 PM

Quote:

Originally Posted by Marko777 (Post 1165943)
Today I'm getting an error (it worked perfectly for two days. I haven't changed a thing):

Looks like your server is having issues connecting to the Yahoo feed. Contact your host.

xxxsaint 01-23-2007 08:31 PM

Quote:

Originally Posted by zethon (Post 1165877)
Could those of you who have seen the after-hours-trading-cheat in action please try this fix to see if this resolves the problem?

I've attached one file to this post. Simply upload this file to your /includes directory, overwriting the already existing file. If this does fix the cheat, I will include this in an official update.

Just out of curiosity , this doesn't prevent us from buying after the market has closed does it ? Because I work in retail management and I'm rarely home when the markets are open :)

zethon 01-23-2007 11:14 PM

Quote:

Originally Posted by xxxsaint (Post 1165976)
Just out of curiosity , this doesn't prevent us from buying after the market has closed does it ? Because I work in retail management and I'm rarely home when the markets are open :)

No, it does not. I changed the plugin to grab slightly different info from Yahoo. I believe it's a "real time" feed.

In theory, if a user tries to buy something early in the morning, it should use the current price and not the previous day's price.

RyanDe680 01-24-2007 05:24 PM

Should there be something for icash on my forumhome that would work with the stock trader? My stock trader links are in the navbar, but they lead to non-existent pages

zethon 01-25-2007 01:22 PM

I've posted a new update which includes two fixes:

1) mutual funds can now be bought/sold
2) the after-hours-purchasing cheat should be fixed

MorrisMcD 01-25-2007 02:04 PM

Quote:

Originally Posted by zethon (Post 1167011)
2) the after-hours-purchasing cheat should be fixed

What is it that you did to make this the case?

Quantnet 01-26-2007 03:21 PM

i heard report from my users today that when they buy before market opens, vbtrader shows the market is already open. This is by design right ?

zethon 01-27-2007 03:26 AM

Quote:

Originally Posted by Quantnet.org (Post 1167805)
i heard report from my users today that when they buy before market opens, vbtrader shows the market is already open. This is by design right ?

it's based on however Yahoo is getting it's information. I am using a the "real time" price from Yahoo, and not the price that is 15 minutes behind.

At least this is what I suspect. I don't know enough about stocks, live quotes, etc, to know for sure. The data field of Yahoo's I'm using seems to change by the second, so I'm guessing it actually is the "real time" quote.

Actually, now that I think about it... this won't fix the cheat. Crap! I will have to think on this again.

QUESTION: From where can I get after hour stock quotes?

MorrisMcD 01-27-2007 03:37 AM

Quote:

Originally Posted by zethon (Post 1168152)
it's based on however Yahoo is getting it's information. I am using a the "real time" price from Yahoo, and not the price that is 15 minutes behind.

At least this is what I suspect. I don't know enough about stocks, live quotes, etc, to know for sure. The data field of Yahoo's I'm using seems to change by the second, so I'm guessing it actually is the "real time" quote.

Actually, now that I think about it... this won't fix the cheat. Crap! I will have to think on this again.

QUESTION: From where can I get after hour stock quotes?

If its real time, why wouldn't it fix the cheat? Or do you suspect now that it really isnt on real time?

Lionel 01-27-2007 03:40 AM

I sincerely doubt that this is real time, as you need to pay for those. I remain convinced that the only way to get around it would be to put the trade on hold and to execute it 15 minutes later, making sure that user still has enough money to do transaction (price variance)

zethon 01-27-2007 03:53 AM

I think you're confusing "getting real time quotes" with "displaying real time quotes". However, you may be right -- I wonder if there's anyway to tell? Let me ask you, does it cost money for you to view real time quotes?

The old field I was using, the price would only update every 10-15 minutes or so. The new field I'm using, the price seems to change by the second. I suspect it is a real-time quote. Streaming the data and polling the data are two very different things.

Let me ask a stupid question. I'm trying to figure out a way to determine if the market is open based on the data of one specific stock. I'm thinking of using the "Last Trade Date" and "Last Trade Time" fields. If a stock hasn't been traded in say the last 30 minutes, is it "safe" to assume the market is closed? Or is it possible a stock may go hours, days or even longer without ever being traded?

Lionel 01-27-2007 03:58 AM

I get real time quotes from my broker, or when I was doing daytrading, it cost me a hefty penny to see the market live. I believe they do it like that in order to protect the brokerage firms.

It's very possible for a low volume stock to remain idle (no transactions) while legitimately open for trade.

Market is open Monday to Friday from 9:30 sharp to 4:00 PM EST. And there again it will not be foolproof because of holidays.

RyanDe680 01-29-2007 01:04 AM

*clicks uninstall*

Good idea, but I can't get it to work with iCash on 3.6. I reinstalled everything 3+ times and still nothing.

sinisterpain 01-29-2007 01:19 AM

Quote:

Originally Posted by RyanDe680 (Post 1169438)
*clicks uninstall*

Good idea, but I can't get it to work with iCash on 3.6. I reinstalled everything 3+ times and still nothing.

Works fine for me on 3.6.4 Icash installed

punchbowl 01-30-2007 10:29 AM

any feeds for uk stock exchange?

TJFweb 02-03-2007 10:51 AM

Hi. Is there any point in changing the exchange rate of forum points -> USD?

Additionally, might I suggest the option of adding a multiplier to any gains, as it would provide faster short term gains for forum users?

TJFweb 02-04-2007 10:45 AM

Additionally, there seems to be a bug with one of the rows in the table on the 'Sell Preview' screen.

See here: http://img239.imageshack.us/img239/6...rscreengd5.jpg

When you have capital gains tax set, the row for capital gains tax pops out instead.

brvheart 02-10-2007 07:51 PM

I tried to install this on 3.6.4....but when I got the the vbtrade page it is nothing but jibberish meaning:

"symbol", "n" => "name", "l1" => "lasttrade", "v" => "volume", "c1" => "change", "p2" => "perchange", "d1" => "lasttradedate", "t1" => "lasttradetime", "x" => "exchange", ); var $service_url = 'http://quote.yahoo.com/d/quotes.csv'; var $format = null; var $request = null; function StockRequester() { foreach ($this->request_formats as $code => $key) $this->format .= $code; $this->request = $this->service_url."?s=%1&f=".$this->format; } function BuildHash($string) { $retval = null; $string = str_replace("\"","",$string); $stack = explode(',',$string); foreach ($this->request_formats as $code => $key) { $retval[$key] = trim(array_shift($stack)); } return $retval; } function GetSingleQuote($symbol) { $request = str_replace('%1',$symbol,$this->request); $response = implode ('', file($request)); return $this->BuildHash($response); } function

The entire page looks like this, can someone help me get this working? I love the idea behind this would love to have it up and running :)

zethon 02-11-2007 06:01 PM

Quote:

Originally Posted by brvheart (Post 1179371)
I tried to install this on 3.6.4....but when I got the the vbtrade page it is nothing but jibberish meaning:

"symbol", "n" => "name", "l1" => "lasttrade", "v" => "volume", "c1" => "change", "p2" => "perchange", "d1" => "lasttradedate", "t1" => "lasttradetime", "x" => "exchange", ); var $service_url = 'http://quote.yahoo.com/d/quotes.csv'; var $format = null; var $request = null; function StockRequester() { foreach ($this->request_formats as $code => $key) $this->format .= $code; $this->request = $this->service_url."?s=%1&f=".$this->format; } function BuildHash($string) { $retval = null; $string = str_replace("\"","",$string); $stack = explode(',',$string); foreach ($this->request_formats as $code => $key) { $retval[$key] = trim(array_shift($stack)); } return $retval; } function GetSingleQuote($symbol) { $request = str_replace('%1',$symbol,$this->request); $response = implode ('', file($request)); return $this->BuildHash($response); } function

The entire page looks like this, can someone help me get this working? I love the idea behind this would love to have it up and running :)

Re-install. Your files have been corrupted somehow. This is not a problem with the script.

brvheart 02-11-2007 08:39 PM

I did reinstall 3 times, even download the files again :(

brvheart 02-11-2007 09:41 PM

I fixed it, at the top of the php page, you have this:

PHP Code:

<?

PHP Code:

<?php


99% of the time this does not matter, in this case it does....seems ok now :)

Quantnet 02-22-2007 07:14 PM

it stops working today...something wrong with the yahoo feed ?

Lionel 02-22-2007 07:22 PM

Quote:

Originally Posted by Quantnet.org (Post 1188516)
it stops working today...something wrong with the yahoo feed ?


you saved the day for me. I was getting lots of emails about site being unaccessible. After your message I disabled the vbadvanced stock trader and all is fine. Yahoo probably closed the feed.

zethon 02-22-2007 07:25 PM

Looks like Yahoo change the subdomain of their feed, which is causing Stock Trader not to work at all. Upload the attached class_stocktrader.php file to your /includes directory, overwriting the existing one, and this should fix the problem.

Quantnet 02-22-2007 07:34 PM

Glad I spotted this early.
Overwrite with new file and all is fine.

Thanks Zethon for the quick fix. I posted a bunch on your board about this ;)

Quantnet 02-23-2007 03:50 AM

A quick question

How would I use template conditional to show in the postbit the $post[ambportval] only for members whose portfolio > 0

Otherwise, don't display that since I have lot of people with portfolio = 0

Something like this (not quite right yet)
Code:

<if condition="$post[ambportval] == 0">       

don't display anything here

Else

<if condition="$show['reputation']" >
<div class="pbit" align="left">
Portfolio: $$post[ambportval] <br>
Change: $post[ambportgainper]%</span></div></if>
</if>


Quantnet 02-23-2007 04:03 AM

After playing with it for a couple of minutes...I found out a way to do this. Hope this helps

Code:

<if condition="($show['reputation']) AND ($post[ambportval] != 0)"><div class="pbit" align="left">Portfolio: $$post[ambportval] <br>
Change: $post[ambportgainper]%</span></div></if>


djchris 03-05-2007 03:06 PM

Hi zethon,

Love your mod. Is there any I could use this mod with other stock exchange? I'm thinking of using it with the Singapore Stock Exchange (SGX).

Please advise.

gsnindia 03-08-2007 01:21 PM

I have problem i do not have the icash and money ,

i am using reputation , but that is not increasing , can you provide any option so that i can give all a single amount so that can use the same for trading amount putting all on parity with starting amount.

newhere 03-16-2007 01:00 AM

I had this installed and it was working great. But now I am receiving intermittent problems which will last for hours at a time. It seems it is unable to retrieve the CSV file from finance.yahoo.com despite the fact that you can browse directly to the url it passed to file() and the CSV file is served up just fine. What's the deal?

The error looks like:
Quote:

Warning: file(http://finance.yahoo.com/d/quotes.cs...c1p2d1t1xpk1): failed to open stream: HTTP request failed! in /includes/class_stocktrader.php on line 74

Warning: implode(): Bad arguments. in /includes/class_stocktrader.php on line 74
Does anyone else have this problem or know what is going on?

dashed 03-20-2007 01:36 AM

Can you make the plugin not to be viewed by guests/not logged-in users?

forumrating 06-18-2007 05:17 AM

all working fine..

just found a bug for one stock

Infy.ns if i buy it , it works fine,
but if i sell it then the status of the stock shows 0 value.

error message
Quote:

Warning: Division by zero in /vbtrade.php on line 112

Warning: Division by zero in /vbtrade.php on line 112

masons 06-26-2007 11:10 AM

Hi,

I installed it using REPUTATION field and it works fine
2 questions

1) How would we put "a" yahoo stock runner in there
2) How can we see the other players stats

Centrix 07-20-2007 03:24 PM

Well its already july... where is the full version o.O

- edit

I cant buy some stocks... does it only allow a few stocks to buy?

websiteking532 07-21-2007 04:20 AM

how can i add it to navbar?

kylek 08-21-2007 06:50 PM

Quote:

Originally Posted by websiteking532 (Post 1297132)
how can i add it to navbar?

It says how to in the install file.

Just installed stock trader with the new vbcredits and it works good, had to put credits for the money row.

Only negative thing is it shows 12 decimal spots for the amount of cash on hand.

wickland 08-21-2007 10:27 PM

I'm having a problem, I just installed it and pressed "stock trader" and it goes to a blank page, nothing is happening. It's turned on and everything too from the options.


All times are GMT. The time now is 09:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01732 seconds
  • Memory Usage 1,840KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete