uniVocity / univocity-trader

open-source trading framework for java, supports backtesting and live trading with exchanges
577 stars 140 forks source link

various changes #19

Closed teverett closed 4 years ago

teverett commented 4 years ago

cli depends on examples, not vice versa changed spaces to tabs enabled star imports

jbax commented 4 years ago

Cli cannot depend on examples. Everything apart from the examples is meant to be released as a library. The examples must work by importing these libraries so the cli must load what it is given via reflection.

On Thu, 26 Dec. 2019, 2:05 am Tom Everett, notifications@github.com wrote:

cli depends on examples, not vice versa changed spaces to tabs enabled star imports

You can view, comment on, or merge this pull request online at:

https://github.com/uniVocity/univocity-trader/pull/19 Commit Summary

  • various changes

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=ABWFQPQL6H7PHC2KAGE5NH3Q2OVGHA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICUAHSA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPW4DSZPYNWKG7JUEQTQ2OVGHANCNFSM4J7GEXSQ .

jbax commented 4 years ago

The latest changes on the master branch moved the Main class back to the core project, simulations and other classes are loaded via reflection, and the examples project now generates a zip file with all libraries and configurations ready for command line execution (you can also run straight from the target folder).

I didn't have time to test this thoroughly but feel free to suggest adjustments.

On Thu, 26 Dec. 2019, 7:57 am Jeronimo Backes, jbax@univocity.com wrote:

Cli cannot depend on examples. Everything apart from the examples is meant to be released as a library. The examples must work by importing these libraries so the cli must load what it is given via reflection.

On Thu, 26 Dec. 2019, 2:05 am Tom Everett, notifications@github.com wrote:

cli depends on examples, not vice versa changed spaces to tabs enabled star imports

You can view, comment on, or merge this pull request online at:

https://github.com/uniVocity/univocity-trader/pull/19 Commit Summary

  • various changes

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=ABWFQPQL6H7PHC2KAGE5NH3Q2OVGHA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICUAHSA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPW4DSZPYNWKG7JUEQTQ2OVGHANCNFSM4J7GEXSQ .

teverett commented 4 years ago

Well.. ok.  If you look at my branch called "sim" I wrote command-line support for a database report, simulator, livetrader and importer.  However, now that Main is in core, I can no longer access the class "Account".  I need the class "Account" for for the simulator CLI and livetrader CLI.

Jeronimo Backes wrote on 2019-12-26 9:25 AM:

The latest changes on the master branch moved the Main class back to the core project, simulations and other classes are loaded via reflection, and the examples project now generates a zip file with all libraries and configurations ready for command line execution (you can also run straight from the target folder).

I didn't have time to test this thoroughly but feel free to suggest adjustments.

On Thu, 26 Dec. 2019, 7:57 am Jeronimo Backes, jbax@univocity.com wrote:

Cli cannot depend on examples. Everything apart from the examples is meant to be released as a library. The examples must work by importing these libraries so the cli must load what it is given via reflection.

On Thu, 26 Dec. 2019, 2:05 am Tom Everett, notifications@github.com wrote:

cli depends on examples, not vice versa changed spaces to tabs enabled star imports

You can view, comment on, or merge this pull request online at:

https://github.com/uniVocity/univocity-trader/pull/19 Commit Summary

  • various changes

File Changes

univocity-trader-examples/src/main/java/com/univocity/trader/examples/ExampleStrategy.java https://github.com/uniVocity/univocity-trader/pull/19/files#diff-4 (18)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/ExampleStrategyMonitor.java https://github.com/uniVocity/univocity-trader/pull/19/files#diff-5 (30)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/LiveBinanceTrader.java https://github.com/uniVocity/univocity-trader/pull/19/files#diff-6 (67)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/MarketSimulation.java https://github.com/uniVocity/univocity-trader/pull/19/files#diff-7 (94)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/TrivialStrategy.java https://github.com/uniVocity/univocity-trader/pull/19/files#diff-8 (143)

  • M

univocity-trader-examples/src/main/resources/univocity-trader.properties https://github.com/uniVocity/univocity-trader/pull/19/files#diff-9 (8)

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=ABWFQPQL6H7PHC2KAGE5NH3Q2OVGHA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICUAHSA, or unsubscribe

https://github.com/notifications/unsubscribe-auth/ABWFQPW4DSZPYNWKG7JUEQTQ2OVGHANCNFSM4J7GEXSQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=AAJLKZR6DB4US36BPYT77FLQ2TLGVA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVYW2I#issuecomment-569084777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJLKZSSXXUYRH2JVVB44P3Q2TLGVANCNFSM4J7GEXSQ.

-- Tom Everett tom@khubla.com mailto:tom@khubla.com https://www.postbox-inc.com

jbax commented 4 years ago

The AbstractMarketSimulator loaded in the Main class has a .configure().accounts() which will give the accounts (i.e. instances of AccountConfiguration) to you. You must not refer to the binance-specific Account class, but if there is no alternative the only option is to use reflection.

On Fri, 27 Dec. 2019, 1:16 am Tom Everett, notifications@github.com wrote:

Well.. ok. If you look at my branch called "sim" I wrote command-line support for a database report, simulator, livetrader and importer. However, now that Main is in core, I can no longer access the class "Account". I need the class "Account" for for the simulator CLI and livetrader CLI.

Jeronimo Backes wrote on 2019-12-26 9:25 AM:

The latest changes on the master branch moved the Main class back to the core project, simulations and other classes are loaded via reflection, and the examples project now generates a zip file with all libraries and configurations ready for command line execution (you can also run straight from the target folder).

I didn't have time to test this thoroughly but feel free to suggest adjustments.

On Thu, 26 Dec. 2019, 7:57 am Jeronimo Backes, jbax@univocity.com wrote:

Cli cannot depend on examples. Everything apart from the examples is meant to be released as a library. The examples must work by importing these libraries so the cli must load what it is given via reflection.

On Thu, 26 Dec. 2019, 2:05 am Tom Everett, notifications@github.com wrote:

cli depends on examples, not vice versa changed spaces to tabs enabled star imports

You can view, comment on, or merge this pull request online at:

https://github.com/uniVocity/univocity-trader/pull/19 Commit Summary

  • various changes

File Changes

univocity-trader-examples/src/main/java/com/univocity/trader/examples/ExampleStrategy.java

https://github.com/uniVocity/univocity-trader/pull/19/files#diff-4 (18)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/ExampleStrategyMonitor.java

https://github.com/uniVocity/univocity-trader/pull/19/files#diff-5 (30)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/LiveBinanceTrader.java

https://github.com/uniVocity/univocity-trader/pull/19/files#diff-6 (67)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/MarketSimulation.java

https://github.com/uniVocity/univocity-trader/pull/19/files#diff-7 (94)

  • M

univocity-trader-examples/src/main/java/com/univocity/trader/examples/TrivialStrategy.java

https://github.com/uniVocity/univocity-trader/pull/19/files#diff-8 (143)

  • M

univocity-trader-examples/src/main/resources/univocity-trader.properties https://github.com/uniVocity/univocity-trader/pull/19/files#diff-9 (8)

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub

< https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=ABWFQPQL6H7PHC2KAGE5NH3Q2OVGHA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ICUAHSA , or unsubscribe

< https://github.com/notifications/unsubscribe-auth/ABWFQPW4DSZPYNWKG7JUEQTQ2OVGHANCNFSM4J7GEXSQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=AAJLKZR6DB4US36BPYT77FLQ2TLGVA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHVYW2I#issuecomment-569084777>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAJLKZSSXXUYRH2JVVB44P3Q2TLGVANCNFSM4J7GEXSQ .

-- Tom Everett tom@khubla.com mailto:tom@khubla.com https://www.postbox-inc.com

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/uniVocity/univocity-trader/pull/19?email_source=notifications&email_token=ABWFQPTY7AGY74MYDMU4LM3Q2TYIBA5CNFSM4J7GEXS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHV6DZY#issuecomment-569106919, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWFQPVUTTGFFSV2KO4OJVLQ2TYIBANCNFSM4J7GEXSQ .