Bitcoin Forum
April 16, 2024, 08:48:28 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
  Print  
Author Topic: Real Time Charting, Order Book, and Time & Sales  (Read 85478 times)
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 08, 2012, 02:04:57 PM
 #261

What method are you using to do the sound, HTML5 audio, Flash/Shockwave, or something else?

Apparently Safari's HTML5 audio support was somewhat broken before but supposedly it's now working in Safari 6.

I'm added the audio in JavaScript with the HTML5 Audio API:

Code:
var A = new Audio(filename);
A.play();

I'm not attaching <audio> elements within the DOM, however, and this might be the reason why Safari doesn't like it.

My guess is that it doesn't like the audio format.

I've got all the sounds in .ogg, .mp3, and .wav, which should cover every browser for codec compatibility.

1713300508
Hero Member
*
Offline Offline

Posts: 1713300508

View Profile Personal Message (Offline)

Ignore
1713300508
Reply with quote  #2

1713300508
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713300508
Hero Member
*
Offline Offline

Posts: 1713300508

View Profile Personal Message (Offline)

Ignore
1713300508
Reply with quote  #2

1713300508
Report to moderator
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 08, 2012, 04:01:57 PM
 #262

just wanted to say thanks for the great site!

awesome. i love the sounds.

Alright! Noticed my Period setting is persistent across full refreshes now.  Thanks!

Donation address available on the website or in signature   Grin

ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
August 08, 2012, 05:33:35 PM
 #263

I'm not attaching <audio> elements within the DOM, however, and this might be the reason why Safari doesn't like it.
One nice thing about attaching the audio elements is that they will pre-load.

Also you I would make sure that you are re-using your objects (just setting the playback position to the beginning) which in theory should be better from a memory, speed POV. (I would actually be surprised if you of all people were not doing this already.)

Also I just tested with Safari 6.0.7536.25 on OSX 10.7.4 (which is Lion) and it works fine, I do indeed get sounds.  Perhaps the other users trade volume is higher than they thought?

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 08, 2012, 05:58:04 PM
 #264

One nice thing about attaching the audio elements is that they will pre-load.

I do not pre-load the sounds until the user chooses to play them, or the setting to play them is loaded from the user cookie. This saves bandwidth to the server, since the browser might require .wav files, which are much larger than their compressed counterparts. So only users who want sounds load them from the server.


Also you I would make sure that you are re-using your objects (just setting the playback position to the beginning) which in theory should be better from a memory, speed POV. (I would actually be surprised if you of all people were not doing this already.)

I am doing this already. I simply didn't include it in my code snippet above  Cool


Also I just tested with Safari 6.0.7536.25 on OSX 10.7.4 (which is Lion) and it works fine, I do indeed get sounds.  Perhaps the other users trade volume is higher than they thought?

That's good to hear.

kentrolla
Hero Member
*****
Offline Offline

Activity: 1526
Merit: 564


Eloncoin.org - Mars, here we come!


View Profile WWW
August 12, 2012, 04:41:56 AM
 #265

I am having trouble distinguishing the buy and sell sounds. Its obvious when i hear them back to back. But when i just hear one alone, I can never judge fully if it was a low enough tone to be a sell or not.  They are too similar imo.  Maybe i just have a problem.  also, i'm still get disconnected a lot.









▄▄████████▄▄
▄▄████████████████▄▄
▄██
████████████████████▄
▄███
██████████████████████▄
▄████
███████████████████████▄
███████████████████████▄
█████████████████▄███████
████████████████▄███████▀
██████████▄▄███▄██████▀
████████▄████▄█████▀▀
██████▄██████████▀
███▄▄█████
███████▄
██▄██████████████
░▄██████████████▀
▄█████████████▀
████████████
███████████▀
███████▀▀
.
▄▄███████▄▄
▄███████████████▄
▄███████████████████▄
▄██████████
███████████
▄███████████████████████▄
█████████████████████████
█████████████████████████
█████████████████████████
▀█
██████████████████████▀
▀██
███████████████████▀
▀███████████████████▀
▀█████████
██████▀
▀▀███████▀▀
.
 ElonCoin.org 
.
████████▄▄███████▄▄
███████▄████████████▌
██████▐██▀███████▀▀██
███████████████████▐█▌
████▄▄▄▄▄▄▄▄▄▄██▄▄▄▄▄
███▐███▀▄█▄█▀▀█▄█▄▀
███████████████████
█████████████▄████
█████████▀░▄▄▄▄▄
███████▄█▄░▀█▄▄░▀
███▄██▄▀███▄█████▄▀
▄██████▄▀███████▀
████████▄▀████▀
█████▄▄
.
"I could either watch it
happen or be a part of it"
▬▬▬▬▬
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 14, 2012, 12:59:46 AM
 #266

I am having trouble distinguishing the buy and sell sounds. Its obvious when i hear them back to back. But when i just hear one alone, I can never judge fully if it was a low enough tone to be a sell or not.  They are too similar imo.  Maybe i just have a problem.

I thought about this too. I will probably change it soon.


also, i'm still get disconnected a lot.

I have implemented the Reconnect button up on the controls row. Use it for force disconnect / reconnect if the connection fades out. Also, it will display 'Connect' if there is a connection error. You no longer have to reload the page to refresh the connection.

toffoo
Sr. Member
****
Offline Offline

Activity: 408
Merit: 261



View Profile
August 14, 2012, 07:31:34 AM
 #267

Also I just tested with Safari 6.0.7536.25 on OSX 10.7.4 (which is Lion) and it works fine, I do indeed get sounds.  Perhaps the other users trade volume is higher than they thought?

Oh man, that stinks, I really like the idea of sounds for trades, why won't it work for me?

When I first read of your success with Safari 6 on Lion I at first thought it must be some quirk of Mountain Lion that it's not working for me.  But I got suspicious and tried it on my wife's Mac (also with Mountain Lion/Safari 6) and I got sound there!

Could anyone who knows more about Mac/Safari than I chime in with an idea why it's not working on my machine, but on others with same browser/OS?  Yes, my sounds is on, volume is up, and HTML5 audio is working for me on other sites I've tried.

For what it's worth, the sound also doesn't work on Safari for iOS 5 (iPad/iPhone) but I have no idea if HTML5 audio is supported there.

RedGolpe
Full Member
***
Offline Offline

Activity: 178
Merit: 100


View Profile
August 15, 2012, 10:23:04 AM
 #268

A minor annoyance: it looks like on the console the time is displayed as local, while on the "Time & Sales" tab is UTC.
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 15, 2012, 02:09:38 PM
 #269

A minor annoyance: it looks like on the console the time is displayed as local, while on the "Time & Sales" tab is UTC.

I'm displaying the trade time as it comes down from the server, which sends time in UTC. I'm displaying events that happen with the client in local time in the terminal.

Would it be better if trades were in local time or if client events were in UTC? Does either make sense? Should this be a user-selected option in the Controls?

(Are you annoyed enough to donate so that it will happen faster?  Wink )

ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
August 15, 2012, 02:54:42 PM
 #270

(Are you annoyed enough to donate so that it will happen faster?  Wink )
Honestly i hadn't even noticed this.

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
genuise
Sr. Member
****
Offline Offline

Activity: 379
Merit: 250


View Profile WWW
August 15, 2012, 07:56:15 PM
Last edit: August 16, 2012, 07:38:29 PM by genuise
 #271

Hi, just noticed this again.

I already wrote you that at some point the trades appear of double volume.
So now it is visible possibly why. You can see on screenshot that each trade is inserted twice



Hope this will help

RedGolpe
Full Member
***
Offline Offline

Activity: 178
Merit: 100


View Profile
August 15, 2012, 08:14:14 PM
 #272

Would it be better if trades were in local time or if client events were in UTC? Does either make sense? Should this be a user-selected option in the Controls?

Personally, I'd prefer local time for both, but anyway I don't think it needs its own option.

A minor annoyance
(Are you annoyed enough to donate so that it will happen faster?  Wink )

I'm so minorly annoyed that I already spent too much time typing for what that's worth Cheesy
Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 16, 2012, 03:33:38 PM
 #273

Hi, just noticed this again.

I already wote you that at some point the trades appear of double volume.
So now it is visible possibly why. You can see on screenshot that each trade is inserted twice



Hope this will help

I believe that double-trade situation arises from the way that I'm reconnecting at the moment. I think you should only see that after the socket.io feed dies once and reconnects. It's actually connecting twice, so you're getting all the messages twice. This means that the order book will be very wrong very fast as well.

I'm working on a fix now.

genuise
Sr. Member
****
Offline Offline

Activity: 379
Merit: 250


View Profile WWW
August 16, 2012, 06:20:33 PM
Last edit: August 16, 2012, 08:21:13 PM by genuise
 #274

We faced the same problem in bitcoin-analytics.com

It turned out that when we placed subscription to the chanel on reconnect event, this made second subscription because initial subscription was not actually unsubscribed.
I am not sure even that socket.io has special method to unsubscribe delibirately.

So we solved it just ensuring subscription is made only once on initialization.

Hope this help.

Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 17, 2012, 03:08:24 PM
 #275

It turned out that when we placed subscription to the chanel on reconnect event, this made second subscription because initial subscription was not actually unsubscribed.
I am not sure even that socket.io has special method to unsubscribe delibirately.

So we solved it just ensuring subscription is made only once on initialization.

I just launched an implementation along those lines. I hope it remains more stable for everyone going forward.

ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
August 17, 2012, 09:50:04 PM
 #276

Connection errors?

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
toffoo
Sr. Member
****
Offline Offline

Activity: 408
Merit: 261



View Profile
August 17, 2012, 09:55:19 PM
 #277

Connection errors?

It's Standard Imperial Operating Procedure for Mt.Gox to shut off all market data feeds before, during, and after market crashes.


Clark (OP)
Hero Member
*****
Offline Offline

Activity: 548
Merit: 502


So much code.


View Profile WWW
August 17, 2012, 09:57:30 PM
 #278

It's Standard Imperial Operating Procedure for Mt.Gox to shut off all market data feeds before, during, and after market crashes.

The feed dies reliably around market turmoil. I am attempting to secure a more durable connection to the market data feed.

Stay tuned.

pauljr8
Newbie
*
Offline Offline

Activity: 26
Merit: 0



View Profile
August 17, 2012, 10:50:15 PM
 #279

It's been a great site except if there's any significant price movement, then very predictably nothing.
ErebusBat
Hero Member
*****
Offline Offline

Activity: 560
Merit: 500

I am the one who knocks


View Profile
August 18, 2012, 03:10:59 AM
 #280

It's been a great site except if there's any significant price movement, then very predictably nothing.
Not Clark's fault that mtgox sucks.

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!