considering that json and xml are not programming languages how would you actually use that code
You run the code using an Finite State Machine that executes the algorithm.
considering that json and xml are not programming languages how would you actually use that code
what a strange pointless thread,
Not pointless. It gives you multiple advantages.
- You can load new strategies on-the-fly into an running system without restarting it.
- You can run multiple strategies at the same time in different contexts/threads.
- You can outsource the development to external developers without giving away IP.
- You can very easily tweak parameters and test out new ideas.
Everyone seams to be reinventing the wheel. I have for example seen 20-30 different people implementing order management logic for IB/TWS in their language. Why not have an open-source implementation that everyone can use regardless of language and platform choice. Ex. micro-services architecture accessible through a common interface, HTTP REST or even better high-performance asynchronous messaging (NanoMsg/ZeroMQ).
All of this is possible without crunching your logic into a particular format, or weird descriptive language. As you allude to some kind of messaging system, or decent API, would allow you to write your signal logic as a function / class without needing to learn / create a sufficiently flexible setup to handle all possible signals.
The problem I have with other peoples implementations that I've seen on open source is that they aren't well written, and even those that aren't flexible enough. If you know what you're doing its quicker to write your own system and have 100% control, reliability and flexibility; than to work out someone elses code.
Even in a corporate setup I've often ended up in a situation where people have rewritten the wheel because its too hard (technologist resource, politics, whatever) to get the current boilerplate system to do what you want.
I'd happily donate some time to creating an open source implementation of my particular flavour (futures / IB / python). I'd happily release my own system, minus the 1% of actual signal generation code, except that it suffers from needing a lot of work and refactoring to make it useable to other people. It would make more sense to try and get a few people together and rewrite an implementation from scratch.
this thread is reinventing the wheel. The pattern is dependency injection or visitor. Both do what you want.