Added stock market!

Announcements about the forum or services itself
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

The system is simple and straightfoward, check it out in the cybervillage and if you have any suggestions or questions post it here, check out the help file as well. B)



Archived topic from Iceteks, old topic ID:2230, old post ID:18783
Honk if you love Jesus, text if you want to meet Him!
sintekk
Posts: 4994
Joined: Mon Feb 16, 2004 10:38 pm

Added stock market!

Post by sintekk »

So, how does the system work?

Archived topic from Iceteks, old topic ID:2230, old post ID:18789
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

Check the help file :D http://www.iceteks.com/forums/cybervillage...php?topic=stock

Archived topic from Iceteks, old topic ID:2230, old post ID:18795
Honk if you love Jesus, text if you want to meet Him!
sintekk
Posts: 4994
Joined: Mon Feb 16, 2004 10:38 pm

Added stock market!

Post by sintekk »

It all makes sense now! :D
I hope the market pays off, I've invested in it big time :D

Archived topic from Iceteks, old topic ID:2230, old post ID:18796
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

The next stock update should happen soon. I might set it so it changes more often though. Right now it changes once per 20 hours or so (just pitched an aproximate number in seconds. :D)

Archived topic from Iceteks, old topic ID:2230, old post ID:18797
Honk if you love Jesus, text if you want to meet Him!
sintekk
Posts: 4994
Joined: Mon Feb 16, 2004 10:38 pm

Added stock market!

Post by sintekk »

w007! 349 -> 800! I'm Rich!
I now have a maxed out defense :P

Archived topic from Iceteks, old topic ID:2230, old post ID:18800
User avatar
manadren_it
Posts: 1810
Joined: Wed Jan 01, 2003 6:48 pm

Added stock market!

Post by manadren_it »

well I tripled my investment... I should've bought more :P Well I'll just have to wait until it goes down again and then blow all my free cash on stocks :lol:

Archived topic from Iceteks, old topic ID:2230, old post ID:18802
mana's blog {1, 2} yell at me when I get lazy
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

Looks like were on a depression, they went down big time. :D

Archived topic from Iceteks, old topic ID:2230, old post ID:18807
Honk if you love Jesus, text if you want to meet Him!
User avatar
manadren_it
Posts: 1810
Joined: Wed Jan 01, 2003 6:48 pm

Added stock market!

Post by manadren_it »

Buy! Buy! Buy!

hmmm I think I might've went overboard on that stock purchase :P

Archived topic from Iceteks, old topic ID:2230, old post ID:18808
mana's blog {1, 2} yell at me when I get lazy
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

Notice the enron logo blended in the igloo for the stock market section. <_>

Archived topic from Iceteks, old topic ID:2230, old post ID:18809
Honk if you love Jesus, text if you want to meet Him!
User avatar
manadren_it
Posts: 1810
Joined: Wed Jan 01, 2003 6:48 pm

Added stock market!

Post by manadren_it »

So does that mean that I can artificially increase the stock price through creative accounting? :lol:

Archived topic from Iceteks, old topic ID:2230, old post ID:18820
mana's blog {1, 2} yell at me when I get lazy
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Added stock market!

Post by Red Squirrel »

Not quite, but I happen to be the CEO so...... :D

Nah for now this is the algorthm that is used for each update, it's very cheap but does the trick LOL:

Code: Select all

1: $stockprice = (rand(0,1000)+$stockprice)/1.6;
2: if(rand(0,4)=="3")$stockprice = $stockprice /rand(1,5);
3: $stockprice = round($stockprice);
[code]

$stockprice is the value loaded from the file at startup (the current price)

This algorthm is only run if a certain time interval has passed by, at that time, it rewrites it to file and it's the new price, otherwise it just skips the processing and sticks with the same price.

line 2 is to make a mini depression once in a while because without that the stock price slowly gos up more then it goes down.  Line 3 is only to make sure it stays out of the decimals.   

[color=#888888][size=85]Archived topic from Iceteks,  old topic ID:2230, old post ID:18821[/size][/color]
Honk if you love Jesus, text if you want to meet Him!
Locked