Commit Graph

269 Commits

Author SHA1 Message Date
Mark Veidemanis f4ae8fbc5f
Check equality with None instead of truthfulness 2023-02-14 07:20:47 +00:00
Mark Veidemanis 27de8090de
Add instruments to account readout 2023-02-14 07:20:47 +00:00
Mark Veidemanis 1fc969177d
Send all precision errors to the user 2023-02-14 07:20:47 +00:00
Mark Veidemanis 68a33cea7d
Send the user a more detailed precision error message 2023-02-14 07:20:47 +00:00
Mark Veidemanis c915fd1e41
Improve get precision error messages 2023-02-14 07:20:47 +00:00
Mark Veidemanis 507708574c
Add original status 2023-02-14 07:20:47 +00:00
Mark Veidemanis 6385339b7b
Don't print the JSON of webhooks 2023-02-14 07:20:47 +00:00
Mark Veidemanis 6464b6de05
Filter for enabled accounts 2023-02-13 21:02:59 +00:00
Mark Veidemanis 6ff5f718ba
Implement asset rules as Asset Group children objects 2023-02-13 20:45:23 +00:00
Mark Veidemanis b48af50620
Rename pairs to assets 2023-02-13 17:50:46 +00:00
Mark Veidemanis 0321aff9d5
Implement checking direction with assetfilter 2023-02-13 17:47:47 +00:00
Mark Veidemanis dcfb963be6
Remove asset restrictions and make asset groups smarter 2023-02-13 07:20:40 +00:00
Mark Veidemanis 287facbab2
Allow changing the asset filter list 2023-02-11 18:46:26 +00:00
Mark Veidemanis da9f32e882
Send the user a message when an asset restriction is hit 2023-02-11 18:25:09 +00:00
Mark Veidemanis 313c7f79d0
Write tests for asset filter 2023-02-11 18:22:49 +00:00
Mark Veidemanis ce0b75ae2d
Make account on AssetGroup optional 2023-02-11 18:18:07 +00:00
Mark Veidemanis bdf8f04210
Re-add property fields 2023-02-11 18:07:05 +00:00
Mark Veidemanis 7afdd39af7
Fix adding asset restrictions 2023-02-11 17:45:22 +00:00
Mark Veidemanis 33d8e26c9b
Use cachalot to invalidate caches 2023-02-11 17:22:25 +00:00
Mark Veidemanis 7d693ad1fa
Vary cache on URL 2023-02-11 15:48:53 +00:00
Mark Veidemanis a0c94b2097
Cache all object list templates 2023-02-11 14:52:00 +00:00
Mark Veidemanis 8455d64e31
Reformat 2023-02-11 14:00:19 +00:00
Mark Veidemanis 57078c10c1
Optimise performance with caching 2023-02-11 14:00:09 +00:00
Mark Veidemanis 1f43a00c7a
Add all models to admin site and tweak some documentation 2023-02-10 23:47:55 +00:00
Mark Veidemanis 010aba7f81
Implement storing asset restriction callbacks 2023-02-10 23:26:30 +00:00
Mark Veidemanis c283c6c192
Add asset restriction webhook API 2023-02-10 22:04:01 +00:00
Mark Veidemanis aa227c53ac
Remove unused function in callbacks 2023-02-10 21:16:27 +00:00
Mark Veidemanis 0b7dc001bf
Add a warning about hooks to the asset restriction form 2023-02-10 21:14:17 +00:00
Mark Veidemanis 1d01368570
Add webhook ID to asset restriction model 2023-02-10 21:13:12 +00:00
Mark Veidemanis 101a4933c9
Make long IDs copyable 2023-02-10 21:13:00 +00:00
Mark Veidemanis 119acdd734
Use django-crud-mixins for CRUD helpers 2023-02-10 20:49:35 +00:00
Mark Veidemanis 659b73e695
Add mixins 2023-02-10 07:20:36 +00:00
Mark Veidemanis 8750e999b3
Remove unused log 2023-02-10 07:20:36 +00:00
Mark Veidemanis f81d632df3
Add asset groups and restrictions 2023-02-10 14:33:17 +00:00
Mark Veidemanis 7938bffc8d
Implement extra permission checks and mutations on restriction mixin 2023-02-10 14:32:51 +00:00
Mark Veidemanis 72055181bc
Implement CRUD for asset groups 2023-02-10 07:20:19 +00:00
Mark Veidemanis e00cdc906e
Update pre-commit versions 2023-02-09 07:20:17 +00:00
Mark Veidemanis f4ef280f80
Fix circular import 2023-01-11 21:12:43 +00:00
Mark Veidemanis 70d1fdbbd3
Adjust comment 2023-01-11 20:53:04 +00:00
Mark Veidemanis 7d0f979a96
Check risk management when opening trades with strategies 2023-01-11 20:48:17 +00:00
Mark Veidemanis 3f05553c71
Add initial balance to template and adjust PL calculation to use initial balance 2023-01-11 20:43:11 +00:00
Mark Veidemanis 9a69120695
Remove leftover comments and debug statements 2023-01-11 19:59:27 +00:00
Mark Veidemanis 23faeb6f71
Write tests for open trade checks 2023-01-11 19:55:09 +00:00
Mark Veidemanis e55f903f42
Continue implementing live risk checks 2023-01-11 19:46:47 +00:00
Mark Veidemanis 93be9e6ffe
Check the max risk relative to the account balance 2023-01-06 07:20:55 +00:00
Mark Veidemanis ae42d9b223
Fix profit/loss calculation 2023-01-06 08:52:15 +00:00
Mark Veidemanis 1bab2a729b
Fix SL polarity for losses 2023-01-05 23:58:13 +00:00
Mark Veidemanis db870c39c6
Fix TP/SL calculation and make more tests for profit/loss 2023-01-05 23:37:50 +00:00
Mark Veidemanis 2dfaef324c
Add more tests for risk checking 2023-01-05 19:48:56 +00:00
Mark Veidemanis 483333bf28
Test checking maximum risk with market data 2023-01-05 19:46:18 +00:00
Mark Veidemanis d3e2bc8648
Implement TP/SL price to percent conversion 2023-01-05 19:27:59 +00:00
Mark Veidemanis a6f9e74ee1
Close all positions on demo account when exiting tests 2023-01-05 17:25:22 +00:00
Mark Veidemanis b8b39ea8d3
Implement closing all positions 2023-01-05 17:25:06 +00:00
Mark Veidemanis 9dda0e8b4a
Write live open/close and list trades tests 2023-01-02 18:42:55 +00:00
Mark Veidemanis 72671aa87f
Refactor OANDA schemas and refactor existing ones to make use of more objects 2023-01-02 18:42:33 +00:00
Mark Veidemanis 9835219e51
Implement closing trades on OANDA 2023-01-02 18:42:03 +00:00
Mark Veidemanis 2fa61fb195
Print the response if validation fails 2023-01-02 18:41:49 +00:00
Mark Veidemanis e0ea4c86fa
Implement check risk function 2023-01-01 21:52:51 +00:00
Mark Veidemanis 46aaff43c0
Begin writing live tests 2023-01-01 21:52:43 +00:00
Mark Veidemanis b2361bda77
Add enabled checkbox to account list 2023-01-01 15:52:04 +00:00
Mark Veidemanis b31a2d1464
Allow disabling accounts 2023-01-01 15:46:40 +00:00
Mark Veidemanis a18c150fe2
Begin implementing get all open trades 2022-12-22 07:20:49 +00:00
Mark Veidemanis b818e7e3f5
Write risk checking helpers and tests 2022-12-13 07:20:49 +00:00
Mark Veidemanis c81cb62aca
Finish implementing risk models 2022-12-13 07:20:49 +00:00
Mark Veidemanis 4e24ceac72
Add risk model and views 2022-12-21 21:35:59 +00:00
Mark Veidemanis 52ddef4c8f
Simplify protection options and allow none 2022-12-20 23:20:07 +00:00
Mark Veidemanis 29125d5087
Reshuffle the menu to minimise confusion 2022-12-13 07:20:49 +00:00
Mark Veidemanis 3a7b5c3ffd
Bring Alpaca and OANDA implementation functions into alignment 2022-12-13 07:20:49 +00:00
Mark Veidemanis a41a1e76a5
Refactor market into two files 2022-12-20 07:20:26 +00:00
Mark Veidemanis b7c46ba1d3
Add more user feedback on rejected and dropped trades 2022-12-20 07:20:26 +00:00
Mark Veidemanis a96c99b9e4
Remove dot in notifications title 2022-12-19 07:20:56 +00:00
Mark Veidemanis 8afe638f0d
Add Elasticsearch support 2022-12-13 07:20:49 +00:00
Mark Veidemanis 50820172b1
Send notification on new user creations 2022-12-18 17:49:42 +00:00
Mark Veidemanis 8de99c1bcd
Make variables passed to CRUD helpers consistent 2022-12-18 17:37:34 +00:00
Mark Veidemanis 246674b03e
Hide the cancel button and add title/subtitle to notification page 2022-12-18 17:27:40 +00:00
Mark Veidemanis 7ee698f457
Implement custom notification settings 2022-12-18 17:21:52 +00:00
Mark Veidemanis 4c463e88f2
Implement notifications 2022-12-18 16:55:09 +00:00
Mark Veidemanis f4772a3c7d
Remove some comments from limits views 2022-12-18 16:37:27 +00:00
Mark Veidemanis 3a39181261
Implement viewing and altering trends 2022-12-18 15:10:28 +00:00
Mark Veidemanis b882ba15d0
Write tests for crossfilter sub-functions 2022-12-12 19:53:32 +00:00
Mark Veidemanis 1793b5cc5d
Prevent betting against ourselves via inverted pairs 2022-12-12 19:53:20 +00:00
Mark Veidemanis d6ab0ffd0e
Add all models to admin site 2022-12-12 07:20:20 +00:00
Mark Veidemanis 06d8c9f4b2
Add tracker 2022-12-09 17:09:03 +00:00
Mark Veidemanis d1c44cee92
Improve professionalism by removing color 2022-12-08 07:20:46 +00:00
Mark Veidemanis cf4b8a0195
Lowercase trade in profit table 2022-12-08 07:20:46 +00:00
Mark Veidemanis 05f94e6e93
Rename trade action title 2022-12-08 07:20:46 +00:00
Mark Veidemanis a18572ebda
Add unrealized PL to profit screen 2022-12-08 07:20:46 +00:00
Mark Veidemanis 103a15f0e3
Add account ID to trade page buttons 2022-12-08 07:20:46 +00:00
Mark Veidemanis cd89b11611
Pass account ID to trade CRUD helper 2022-12-08 07:20:46 +00:00
Mark Veidemanis 633894ae75
Make account required for trade information 2022-12-08 07:20:46 +00:00
Mark Veidemanis 312ddb4dc1
Adjust titles for CRUD panels 2022-12-08 07:20:46 +00:00
Mark Veidemanis 0aef440229
Correctly check if no trend signals are defined 2022-12-08 07:20:46 +00:00
Mark Veidemanis 8840b04059
Use ObjectRead helper for all list and detail views 2022-12-08 07:20:46 +00:00
Mark Veidemanis 1e85e830b2
Fix positions CRUD 2022-12-08 07:20:07 +00:00
Mark Veidemanis d396abca84
Use CRUD helper for position list 2022-12-08 07:20:07 +00:00
Mark Veidemanis aa8ee887d3
Replace numbers with question marks in signal name 2022-12-07 07:20:05 +00:00
Mark Veidemanis 575b6a240f
Handle errors in checking for open positions 2022-12-07 07:20:47 +00:00
Mark Veidemanis af69b886ba
Add debug statement in crossfilter 2022-12-07 07:20:47 +00:00
Mark Veidemanis e388624f65
Move type field to signal 2022-12-07 07:20:11 +00:00
Mark Veidemanis 2ee5f7b937
Don't show all signals on strategy page 2022-12-01 07:20:35 +00:00