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)

Magz 01-16-2007 07:15 PM

sorry to sound dense Lionel, but where and how would i implement this? I see no reference to it in the product file.

zethon 01-16-2007 10:23 PM

Quote:

Originally Posted by Quantnet.org (Post 1160725)
How often is the value in postbit updated ?
My topportfolion http://www.quantnet.org/forum/vbtrad...=topportfolios show different values than when you go to the portfolio value http://www.quantnet.org/forum/vbtrad...olio&userid=74

This is the same value from the Top Portfolios view. It gets updated once a day.

Quote:

Originally Posted by Lionel (Post 1160828)
try adding "AS user"

FROM magical_user AS user

Ah-ha! You are right. I now see why he was getting that error. I will post a fix shortly. Thanks Lionel.

zethon 01-16-2007 10:32 PM

The top portfolio view should be fixed now for people using a table prefix.

zethon 01-16-2007 10:34 PM

Quote:

Originally Posted by Quantnet.org (Post 1160725)
How often is the value in postbit updated ?
My topportfolion http://www.quantnet.org/forum/vbtrad...=topportfolios show different values than when you go to the portfolio value http://www.quantnet.org/forum/vbtrad...olio&userid=74

As I've explained, the top portfolio values are updated once per day. The portfolio view values are real time values.

Quantnet 01-16-2007 10:39 PM

can you please post your postbit where you display the portfolio value ? thanks

Just notice that the file still shows as 0.9.6

d8tabyte 01-16-2007 10:58 PM

Works great now, THANK YOU!!!

davidw 01-16-2007 11:09 PM

that fixed it :)

Lionel 01-16-2007 11:28 PM

I've been patiently waiting for midnight, I've been running that cron manually, no matter what

1-portfolio value is different from top portfolio and actual portfolio (I just ran cron again) here

2-It only displays one portfolio. There supposed to be 3 of them. The cron is still inserting -999999 for the other ones.

Quantnet 01-16-2007 11:30 PM

Lionel,
I can't see your top profile page : Invalid action

How do you run cron manually ?

Magz 01-16-2007 11:31 PM

Woo hoooo,

Thank you, working a treat.

I can now see that my users are smarter investors than me lol.

Keep up the good work

regards

Lionel 01-16-2007 11:35 PM

Quote:

Originally Posted by Quantnet.org (Post 1161010)
Lionel,
I can't see your top profile page : Invalid action

How do you run cron manually ?

try again I just enabled unregistered

to run the cron manually, admincp/scheduled task manager and look for stock trader, then click "run"

Lionel 01-16-2007 11:45 PM

<a href="http://www.haitiwebs.com/forums/vbtrade.php?do=viewportfolio&userid=6120" target="_blank">here</a> is a portfolio that doesn't display (shows in db as -999999.999) and I just ran cron again

Lionel 01-17-2007 12:05 AM

Solved my problem: It was due to the table stocktrader where the cheaters had entered negative values (from other problem that had been solved, but negative values remained in table)

Lionel 01-17-2007 12:13 AM

But one last bug remains. If someone sells all the stocks and pulls out, the cron which should have first empty all columns before re inserting does not. Therefore, someone who is out still carries old values in user table.

Lionel 01-17-2007 12:17 AM

so what I did, before the foreach loop in the cron I did

Quote:

$vbulletin->db->query_write("UPDATE user SET ambportval = '', ambportgainamt = '', ambportgainper = '' ");
and all is well

Quantnet 01-17-2007 12:37 AM

anyone notice the file for download is still 0.9.6 ? not 0.9.7 ? or just that he didn't change the number ?

Lionel, can you upload the file with the fix ?

Lionel 01-17-2007 02:49 AM

oh well, no one wanted to do it, so I did it. If it's ok with zethon I'll post my vbadvanced module.

image1 is seen by unregistered
image2 by member without portfolio
image3 by member with portfolio

Quantnet 01-17-2007 02:58 AM

wow, that's excellent Lionel. Can't wait to get that vbadvanced module.

Lionel 01-17-2007 03:26 AM

it does look good :-)
All packaged waiting for an ok.

xxxsaint 01-17-2007 04:18 AM

Very nice how you've got it showing the different market's position on the day , can that be done without vbadvanced ?

Also , how come we can pull up values of mutual funds , but you can't purchase them ??

Lionel 01-17-2007 04:28 AM

ok, I released it https://vborg.vbsupport.ru/showthread.php?p=1161159

Quantnet 01-17-2007 05:12 AM

thanks, Lionel. My modules are not populated. You can check out from my site. I posted on your mod thread.

soulface 01-17-2007 05:32 AM

when going to: /vbtrade.php?do=topportfolios

Quote:

Page generated in 0.28073 seconds with 20 queries (1 queries for uncached templates) [Server Loads: 0.07 0.09 : 0.08]
Uncached templates: forumdisplay_sortarrow (1)

Lionel 01-17-2007 05:37 AM

Quote:

Originally Posted by Quantnet.org (Post 1161173)
thanks, Lionel. My modules are not populated. You can check out from my site. I posted on your mod thread.

I answered on other thread. I don't want to hijack this thread.

Quantnet 01-17-2007 05:52 AM

Quote:

Originally Posted by soulface (Post 1161181)
when going to: /vbtrade.php?do=topportfolios

Got the same uncached template error here but nobody else seems to have it.

Lionel 01-17-2007 06:01 AM

it's there, you need to cache it

Lionel 01-17-2007 06:04 AM

This is not the proper way to cache templates, but I am too lazy to do the plugin, so in vbtrade.php I did in red

Quote:

$globaltemplates = array('vbtrade_main','forumdisplay_sortarrow');

Quantnet 01-17-2007 06:11 AM

Quote:

Originally Posted by Lionel (Post 1161206)
This is not the proper way to cache templates, but I am too lazy to do the plugin, so in vbtrade.php I did in red

This is amazing. Thanks so much lionel. Hope to have the proper fix in the next release.

I have added the portfolio value in postbit. It will only get update once a day when the cron job is run. Anyone is doing this more frequently ?

Lionel 01-17-2007 06:13 AM

You're welcome. If zethon incorporates it, then you good, won't have to do it every update.

NuclioN 01-17-2007 07:43 AM

vbtrade.php opens only a search option 'Get Stock Quote' without displaying stocks. Only after a search they show the result. Is this how it works or do we have to change something to have an overlook of available stocks?

NFLfbJunkie 01-17-2007 05:48 PM

I added the code to the navbar but I have no link showing to get to this MOD.

Quantnet 01-17-2007 07:49 PM

under which condition the amount i give to each member shows up on postbit ? I gave a dozen member 100K to start but only 2 members have the portfolio shown up on postbit even after i manually do the cron job.

Do they have to trade before the portfolio amount got added into the table ?

MorrisMcD 01-17-2007 11:56 PM

Excellent Hack!

Thanks!

zethon 01-18-2007 12:21 AM

Cool! My add-on has an add-on! ;)

zethon 01-18-2007 12:23 AM

I will add this to the code.
Code:

$globaltemplates = array('vbtrade_main','forumdisplay_sortarrow');
Thanks for finding the fix!

Carl Anderson 01-18-2007 12:26 AM

One thing I want to have is an option of how long a stock must be held before it can be sold.. I want people to think of this as investing and learn from it..

In the real world my broker will not allow me to buy a stock and sell it the same day and then use the funds again to buy the same day.. It takes three days for stocks to clear for me - I use Fidelity brokerage account..

Thanks my users love this ............. I plan to have investing contests with this...

zethon 01-18-2007 02:03 AM

Quote:

Originally Posted by Carl Anderson (Post 1161812)
One thing I want to have is an option of how long a stock must be held before it can be sold.. I want people to think of this as investing and learn from it..

In the real world my broker will not allow me to buy a stock and sell it the same day and then use the funds again to buy the same day.. It takes three days for stocks to clear for me - I use Fidelity brokerage account..

I did not know that! That shouldn't be too difficult to set up. I will try to get this in the next update.

Quote:

Originally Posted by Carl Anderson (Post 1161812)
Thanks my users love this ............. I plan to have investing contests with this...

I'm interested in any input from anyone on how you might like to see some sort of "contest" functionality built into this...

MistaMarkael 01-18-2007 02:28 AM

should i download this now or wait ?

Quantnet 01-18-2007 02:35 AM

Quote:

Originally Posted by zethon (Post 1161869)
I'm interested in any input from anyone on how you might like to see some sort of "contest" functionality built into this...

Set a start and end date, give everyone a set amount of cash (i use 100000 in reputation field) and at the end, the winner will be the one that has best gain (not portfolio value because some will sit on cash and risk only fraction of portfolio). The amount invest =100K - cash. See how much profit you make on the invest amount :)

Ideally, the user would see where he is ranked in the contest. The cron job is updated during business hour, some thing like every 2 hours...(4 times a day)

I still try to find a way to put top 10 gainers on forum home.

Lionel 01-18-2007 10:30 AM

Quote:

Originally Posted by Carl Anderson (Post 1161812)

In the real world my broker will not allow me to buy a stock and sell it the same day and then use the funds again to buy the same day.. It takes three days for stocks to clear for me -

This is not the real world. In day trading you can buy and sell within 1 second apart.


All times are GMT. The time now is 03:55 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.01455 seconds
  • Memory Usage 1,819KB
  • 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
  • (1)bbcode_code_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