Aido
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 10:26:30 PM |
|
Interesting. It uses a simple enough syntax for new users to understand yet could be very flexible and powerful for people familiar with JavaScript. My original idea to use a trading logic in AidoATP kept things very simple by keeping everything boolean.....easy to understand logic and easy to code. A couple of months ago as part of a discussion with daybyter I had toyed with developing a more comprehensive trading language using ANTLR. It may be possible to use ANTLR to parse similar, more readable boolean logic from the config file or other file. This will then give the user more control over the use of the different trading algorithms rather than having it hardcoded.
I think daybyter tried to get some discussion started on a similar idea on a Formal definition of a trading language but I'm not sure if it got off the ground. But why create a whole new trading language syntax when something similar to a eclipsetraders JavaScript syntax can give a lot of power to experienced users but still be relatively simple for new users to pick up.
|
Interesting Bash command line, try it ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
Ianwhitbread
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 101
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 18, 2013, 10:56:13 PM |
|
kinda lost me at the moment with the syntax but saying that I thought AIDOATP trading logic was a bit alien ( I'm talking just the config file, I am no Coder) now can quite happily change and play with it at leisure Im sure if I saw other working examples of the syntax I would get my head around it early days yet was just looking at TA-lib now think I need to go back to school................. sigh! ![Cry](https://bitcointalk.org/Smileys/default/cry.gif) I will be the simpleton test monkey!!
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 19, 2013, 04:52:05 AM |
|
Interesting. It uses a simple enough syntax for new users to understand yet could be very flexible and powerful for people familiar with JavaScript. My original idea to use a trading logic in AidoATP kept things very simple by keeping everything boolean.....easy to understand logic and easy to code. A couple of months ago as part of a discussion with daybyter I had toyed with developing a more comprehensive trading language using ANTLR. It may be possible to use ANTLR to parse similar, more readable boolean logic from the config file or other file. This will then give the user more control over the use of the different trading algorithms rather than having it hardcoded.
I think daybyter tried to get some discussion started on a similar idea on a Formal definition of a trading language but I'm not sure if it got off the ground. But why create a whole new trading language syntax when something similar to a eclipsetraders JavaScript syntax can give a lot of power to experienced users but still be relatively simple for new users to pick up. I agree, and it would be quite possible to have each Signal expose itself to the Javascript API. BTW here is the way the new ATPx modular API works. A module is a completely self contained mini-app, it implements runnable and has 0 or more dependencies. Each instance runs a single ExchangeModule. The ExchangeModule, among other things is responsible for listening to Ticks coming from the Exchange. Every time a tick is captured, it passes the tick to a SignalManager. The signal manager's job is to record the tick to the DB and relay the tick to all subscribed signals. A signal is a discrete unit of logic and is comprised of 3 elements, Direction, Amount and Intensity. For instance if the VWAP for BTC doubled in price, the signal would be VWAP|Advancing|100|1.0 (This was done to allow DSP's to more easily digest signal data). Trading logic (aka individual trading modules or strategy modules in some parlances) subscribe to the individual signals it needs, notifying the signal of it's interest, and then is notified that a signal has changed through the trading logic's onSignalChanged method. A javascript based trading logic module would just subscribe to all available signals and use onSignalChanged as its entry point. VWAP cross then becomes a simple function onSignalChanged{ val Object;
if(VWAP.Direction == Signal.Declining){ Object.Action = BUY; Object.Amount = VWAP.Strength * Balance.USD; }elseif(VWAP.Direction == Signal.Advancing){ Object.Action = Sell; Object.Amount = VWAP.Strength * Balance.BTC; } return Object; }
Of course Object here would be converted to an Order and then handed to the ExchangeModule, but that would be handled seamlessly in the background by the javascript trading logic module. This would allow you to change trading logic on the fly fairly easily. Thoughts?
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 19, 2013, 07:54:17 AM |
|
That's a nice idea and those are cool tools, but this is written in Java not Python. We aren't saying let's develop a new language, we're talking about exposing the internals of the system via an existing scripting language such as Javascript, to allow more granular control and a faster turn around time for custom strategies. Otherwise I would just leverage algo-trader http://code.google.com/p/algo-trader/wiki/AlgoTraderDocumentation#Strategy_Development
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
c0inbuster
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 19, 2013, 12:52:15 PM |
|
Python is a much better "glue" programming language than JavaScript.
In a trading strategy, You can need for example to get/fetch "news" or various data
Python will be much more convenient for that purpose.
|
|
|
|
Aido
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 19, 2013, 01:01:28 PM |
|
Jython? http://wiki.python.org/jython/Quote: - Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application.
|
Interesting Bash command line, try it ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) : bitcoin-cli sendtoaddress 1Aidan4r4rqoCBprfp2dVZeYosZ5ryVqH6 `bitcoin-cli getbalance`
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 21, 2013, 12:18:32 PM |
|
Been playing with integrating scripting and it's coming along pretty well. I think it will make a great addition. As a proof of concept, I was able to integrate the MtGox ticker stream by using the weberknecht Java based websocket client and then exposing it to the scripting engine. --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"111.065","type":1,"type_str":"ask","volume":"4.944","price_int":"11106500","volume_int":"494400000","item":"BTC","currency":"USD","now":"1371817094868568","total_volume_int":"494400000"}} --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"111.09348","type":1,"type_str":"ask","volume":"-5.0102","price_int":"11109348","volume_int":"-501020000","item":"BTC","currency":"USD","now":"1371817095881588","total_volume_int":"0"}} --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"92.9475","type":2,"type_str":"bid","volume":"-1.5","price_int":"9294750","volume_int":"-150000000","item":"BTC","currency":"USD","now":"1371817095907136","total_volume_int":"0"}} --received message: {"channel":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21","channel_name":"trade.BTC","op":"private","origin":"broadcast","private":"trade","trade":{"type":"trade","date":1371817096,"amount":0.05,"price":109.14,"tid":"1371817096032810","amount_int":"5000000","price_int":"10914000","item":"BTC","price_currency":"USD","trade_type":"bid","primary":"Y","properties":"limit"}} --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"109.14","type":1,"type_str":"ask","volume":"-0.05","price_int":"10914000","volume_int":"-5000000","item":"BTC","currency":"USD","now":"1371817096099557","total_volume_int":"310202358"}} --received message: {"channel":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe","channel_name":"depth.BTCUSD","op":"private","origin":"broadcast","private":"depth","depth":{"price":"108.62347","type":2,"type_str":"bid","volume":"4.9629","price_int":"10862347","volume_int":"496290000","item":"BTC","currency":"USD","now":"1371817096340518","total_volume_int":"496290000"}} --received message: {"channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f","channel_name":"ticker.BTCUSD","op":"private","origin":"broadcast","private":"ticker","ticker":{"high":{"value":"115.00500","value_int":"11500500","display":"$115.00500","display_short":"$115.01","currency":"USD"},"low":{"value":"109.00000","value_int":"10900000","display":"$109.00000","display_short":"$109.00","currency":"USD"},"avg":{"value":"111.78385","value_int":"11178385","display":"$111.78385","display_short":"$111.78","currency":"USD"},"vwap":{"value":"112.03950","value_int":"11203950","display":"$112.03950","display_short":"$112.04","currency":"USD"},"vol":{"value":"52396.01262622","value_int":"5239601262622","display":"52,396.01262622\u00a0BTC","display_short":"52,396.01\u00a0BTC","currency":"BTC"},"last_local":{"value":"109.14000","value_int":"10914000","display":"$109.14000","display_short":"$109.14","currency":"USD"},"last_orig":{"value":"109.14000","value_int":"10914000","display":"$109.14000","display_short":"$109.14","currency":"USD"},"last_all":{"value":"109.14000","value_int":"10914000","display":"$109.14000","display_short":"$109.14","currency":"USD"},"last":{"value":"109.14000","value_int":"10914000","display":"$109.14000","display_short":"$109.14","currency":"USD"},"buy":{"value":"109.13751","value_int":"10913751","display":"$109.13751","display_short":"$109.14","currency":"USD"},"sell":{"value":"109.14000","value_int":"10914000","display":"$109.14000","display_short":"$109.14","currency":"USD"},"item":"BTC","now":"1371817096581510"}}
Obviously I will put this back into Java, but it was just neat to try it out. We officially have a MtGox ticker now which is at least half of what we need for the exchange module.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
daybyter
Legendary
Offline
Activity: 965
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 21, 2013, 06:25:22 PM |
|
Wasn't there a java scripting framework back in the days?
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2013, 02:19:46 AM Last edit: June 22, 2013, 02:52:09 AM by Nova! |
|
Wasn't there a java scripting framework back in the days?
Yes there is and it's what I used to get those results. It doesn't support websockets directly though. Hence the need to bring in the weberknecht java websocket client and expose it via the scripting API (so I could run the mtgox ticker in javascript for a quick test). For the record I could have just as easily written the glue in python/jython, groovy or a host of other languages. JSR-223 is as it turns out pretty widely used. I'm not a big fan of python, it's not that I have anything against it in particular, but I've never found a problem that could be solved in python any easier than I could solve the same problem in Java. Nevertheless I'm also not a fan of language lock-in and I have nothing to contribute to the great language debate that hasn't already been said. So when you go to ATPx you will be able to pick your scripting language for writing your particular custom logic. I'm going to stick with Javascript for demonstration purposes. But be advised that the choice of language is runtime configurable and you will be able to mix and match to a limited extent. Script variables that are set in the scripting context are not shareable and a single script file must be in a single language, but any module exposed to the scripting logic will tend to be a singleton so modifications made to it inside of one script will persist to another. That persistence is not an intentional design choice on my part, just a side effect of the way things are put together because modules are generally singletons. (except where they're not, which isn't that often as it turns out).
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
daybyter
Legendary
Offline
Activity: 965
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 22, 2013, 12:08:36 PM |
|
I wholeheartly agree with your comment on java vs python...that's why I still use java, even if the folks at IRC greet me with 'java must die'... I don't really understand, why the scripting framework needs sockets, since I thought, your framework connects to the exchange? But don't get confused by my silly comments and keep rocking the trading world with java!!! *thumbs_up* Ciao, Andreas
|
|
|
|
joesmoe2012
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 25, 2013, 04:03:33 PM |
|
Where's the github for this again? Or are you working under Aido's fork? I'm getting a little lost as to what code is what these days...? Thanks in advance and great work ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 05, 2013, 09:49:17 AM |
|
I wholeheartly agree with your comment on java vs python...that's why I still use java, even if the folks at IRC greet me with 'java must die'... I don't really understand, why the scripting framework needs sockets, since I thought, your framework connects to the exchange? But don't get confused by my silly comments and keep rocking the trading world with java!!! *thumbs_up* Ciao, Andreas Yeah sorry didn't mean to confuse with that. The test was to see how deeply I could ingrain Javascript and if I could use it to directly implement a module. Most .js won't ever need to touch the sockets ever. However they're there if someone wants to do something custom later on without resorting to messing around in the internals etc.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 05, 2013, 10:43:25 AM |
|
Ok guys, good news and bad news. The bad news is that I've been away for a bit. I am now finishing up a document for someone else and then I have 1 month with nothing but 80 hour weeks on this particular project.
Still, I've been away for a bit and haven't had a chance to code since my last post on the topic. Which is why you have not seen commits on the repo yet, because I don't want to commit something that is only partially functional.
Now for the really good news. I have decided to take this month and devote myself exclusively to this project. In the meantime I am changing both the direction and the focus of the project. I know I said before that I don't want to get married to this project. However recent events have forced me to reconsider that position.
To that end I have taken on a partner who is securing long term funding for this project and together, will be building a company to keep this thing alive and breathing. The company will of course be seeking talented developers (yes Aido this means you if you've got the time, same with anyone else who was daring enough to try their hand at a fork.)
Coming soon will be a website with a community forum where anyone can participate.
Having a company also means that there will be a few licensing models in place.
A free and open GPL community edition with entirely FOSS modules will be the main emphasis.
We want to create a healthy and competitive ecosystem here around both the product and the underlaying network. To that end the API and the network protocol will be open, people who wish to make their own modules or even competing products available, whether they are FOSS or some other license will be free to do so and can even have their own forum section upon request. (Think bitcointalk devoted to p2p exchange products using a common network rather than a common coin).
There will be no "enterprise" edition or anything silly like that. Because of this, everything we do with the exception of custom work will always be open.
Nevertheless, besides the FOSS model, there will also be 2 subscription models available. These are support models. One grants you "early access" to the newest source code and modules before anyone else. Bug and security fixes are to be immediately backported, so early access really is to give a temporary monopoly for new features only. FYI the exclusivity period on new modules will typically be quarterly, eventually all new modules which were not custom developed (i.e. paid for by an individual or business) will become part of the open source collection.
There will also be a personalized support subscription to address specific problems or requirements you may have. Regardless of the choice. The cost of licensing is expected to be very minimal, we are considering a flat fee or a percentage model, and may choose to make both available. However those who subscribe to both subscriber classes will also get the aforementioned AI module to play with.
The business will fund itself on custom module development, the subscriptions are mostly intended to recoup development and support costs. This means we will maintain a free open-source core project and a a collection of open source modules to meet general needs (90% of you will never need anything else).
Now understand that this means there is a material project change to deal with.
Out the gate, the focus of the project will be on peer to peer exchange. There is too much happening in the world right now to try and focus on any single outside exchange and the more I think about it, the more I realize that these exchanges are both a means to an end, and to some extent a pinch point. I feel that in their present capacity as the sole gatekeepers they present a serious danger to the bitcoin community. Looking at how exchanges come and go, it would be good to be able to still participate, without taking a chance at losing your a$$ets. Thus the renewed focus on whispernet p2p (which may be getting a new name just to make it sound less scandalous).
Now this isn't to say that we won't be supporting the major exchanges, in fact MtGox and BTC-e are where I trade, and I also keep some assets at bitbox. Thus there will be modules for these exchanges and they will be open source.
Also if you choose not to participate in the p2p exchange mechanism, that's your right and you won't be forced to do so. However I believe it is far better to spend primary effort on a true peer to peer exchange mechanism and then integrate the exchanges as additional resources rather than the previous way of looking at it; which was to place the exchanges as primary and the p2p aspect as secondary. For most purposes, which is primary and which is secondary are purely academic and of no consequence. But from my perspective, I'm trying to make it so you can exchange freely with anyone worldwide without the need for a middle man or manual intervention. I never want to be in a situation again where all of my liquid trading assets are trapped in 1 currency and 1 exchange because "sorry but we aren't taking orders at this time..." Dangit! It's my money and I want it now! To paraphrase the worlds most annoying commercial.
This is not intended as an indictment against any exchange. I would love to see any and all exchanges participate in the new network. If anything it will save new and existing exchanges major headaches in the IT and regulatory compliance areas. It could only be a net positive for everyone, because it would provide significant liquidity and it would prevent future problems such as an inability to trade due to regulatory capture or DDOS issues. The network is designed to view that sort of thing as censorship which is treated as a type of damage and route around it.
I have already been contacted by 1 exchange that will be launching in Q4 of this year. They will not only have a custom module you can run to trade on their exchange, but they expect to function primarily as a liquidity provider for the network.
So consider this an offer. I am officially inviting any exchange that wishes to participate, to contact me directly and I will work one on one with you to help you create a customized integration to assist in polling orderbooks, matching and fulfilling orders and anything else you would like to see from this new network.
I hope you enjoy the announcement everyone!
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 06, 2013, 02:54:34 PM |
|
At this point I'm taking a break from the engine for a couple of days and working on the UI from a "view first" perspective. Originally I was going to create the UI as Java swing application, or possibly a webapp of some sort running on top on an osgi container.
I've discovered javaFX and FXML and I think it's perfect for what we're doing here. Now if you want a new UI all you have to do is draw it using JavaFX scene builder, set the controller class and then set the onAction methods to match those from the controller class. This approach also allows you to control the look and feel via combination of XML and css files.
You can also create your own controllers if you're feeling handy with Java. Finally I'm binding the Javascript engine directly to the main controller classes so you can create and extend controllers using javascript. This should give new users simplicity while allowing power users (and modders who want to profit from mods) ultimate flexibility.
The overall goal being to allow you to make the UI whatever you want it to be. Just wanted to give an update on the progress, I'll post some screenshots soon.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
daybyter
Legendary
Offline
Activity: 965
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 06, 2013, 04:53:59 PM |
|
Sounds very cool...
I use Swing for my app but also added a server mode, that should be controlled by a mobile app at some point.
|
|
|
|
Ianwhitbread
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 101
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 07:45:01 AM |
|
Very excited with all the news Thank you for updates
|
|
|
|
Nova! (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 01:03:06 PM |
|
Sounds very cool...
I use Swing for my app but also added a server mode, that should be controlled by a mobile app at some point.
Yes swing was my first choice too. However as I was about to try may hand at yet another layout using netbeans I stumbled upon JavaFX and realized it gives all the power of swing with the flexibility and clean separation of view and controller that would be needed to allow a modding community to spring up around this thing. One of my primary goals is to allow a healthy ecosystem to crop up around this. The modding community can be a powerful force. Power users should be able to mod their UI's how they see fit. People who want to mod semi-pro or even pro can do so with a minimal amount of hassle, just ship out a zip with their new skin and layout and *poof* brand new app. The system is designed to actively look for a new "primaryui.zip" file in the working directory and load that at run time. All the while compatibility is maintained and hostile forks are at least somewhat prevented ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) I do like that JavaFX now runs on Android and iOS so you'll (in theory) be able to run the same app on your desktop or phone to control your traders.
|
Donate @ 1LE4D5ERPZ4tumNoYe5GMeB5p9CZ1xKb4V
|
|
|
|