tripolskypetr commited on
Commit
63494b0
·
1 Parent(s): 318a42a
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/hierarchy.js +1 -1
  2. assets/navigation.js +1 -1
  3. assets/search.js +0 -0
  4. classes/types.ActionBase.html +0 -0
  5. classes/types.BrokerBase.html +0 -0
  6. classes/types.MarkdownFileBase.html +9 -9
  7. classes/types.MarkdownFolderBase.html +4 -4
  8. classes/types.MemoryBacktestAdapter.html +12 -12
  9. classes/types.MemoryLiveAdapter.html +12 -12
  10. classes/types.Performance.html +4 -4
  11. classes/types.PersistBase.html +9 -9
  12. classes/types.PersistBreakevenInstance.html +5 -5
  13. classes/types.PersistCandleInstance.html +5 -5
  14. classes/types.PersistIntervalInstance.html +7 -7
  15. classes/types.PersistLogInstance.html +5 -5
  16. classes/types.PersistMeasureInstance.html +7 -7
  17. classes/types.PersistMemoryInstance.html +9 -9
  18. classes/types.PersistNotificationInstance.html +5 -5
  19. classes/types.PersistPartialInstance.html +5 -5
  20. classes/types.PersistRecentInstance.html +5 -5
  21. classes/types.PersistRiskInstance.html +5 -5
  22. classes/types.PersistScheduleInstance.html +5 -5
  23. classes/types.PersistSessionInstance.html +6 -6
  24. classes/types.PersistSignalInstance.html +5 -5
  25. classes/types.PersistStateInstance.html +6 -6
  26. classes/types.PersistStorageInstance.html +5 -5
  27. classes/types.PersistStrategyInstance.html +5 -5
  28. classes/types.Position.html +3 -3
  29. classes/types.ReportBase.html +8 -8
  30. classes/types.StateBacktestAdapter.html +9 -9
  31. classes/types.StateLiveAdapter.html +9 -9
  32. documents/LLMs.html +201 -1
  33. documents/concept_03_manual_control_adapter.html +116 -0
  34. documents/data_test-guidelines.html +76 -0
  35. documents/docs.html +15 -0
  36. documents/docs_class_ActionConnectionService.html +11 -3
  37. documents/docs_class_ActionCoreService.html +16 -2
  38. documents/docs_class_ActionProxy.html +15 -2
  39. documents/docs_class_BacktestUtils.html +17 -1
  40. documents/docs_class_BrokerAdapter.html +46 -1
  41. documents/docs_class_BrokerBase.html +70 -4
  42. documents/docs_class_ClientAction.html +16 -2
  43. documents/docs_class_LiveUtils.html +17 -1
  44. documents/docs_class_MarkdownFileBase.html +3 -3
  45. documents/docs_class_PersistBase.html +2 -2
  46. documents/docs_class_ReportBase.html +3 -3
  47. documents/docs_class_StrategyConnectionService.html +15 -1
  48. documents/docs_class_StrategyCoreService.html +17 -1
  49. documents/docs_data_positional-args-audit.html +202 -0
  50. documents/docs_function_commitCreateStopLoss.html +52 -0
assets/hierarchy.js CHANGED
@@ -1 +1 @@
1
- window.hierarchyData = "eJylmV1v2zYYhf+LrtmOpMQP+651MSBYOhjJsF4MveAkRhEsS4VId8uK/PeBpuKQCmWR6k2cWDo6j/S+/NDJj2zoe62y7V+I5RCgDSYAwyIHGFIIMGTmN04ARhADjBACGGEOMCI5wIia75g5ej5lQwHGkACMEQMYY/NnzgHGBQM4ZxBgQnOAKaMAU25+bAggELKvIBvkQytL3fSdyrY/MpTj3Hx24iizbfZx6A9y+CiUzEB2aLoq2xqM7DS02TYrW6GUVL/op29SvX899/2jPrYZsMezbaZV9c6I39kvnkFmbtqxubHaiwcm9MWj6bQcHkR5sRnPnfW4CMzBx6atBtmZx5zj/Ktx5hvqOt/2dZztbV9HeBqHDSYThzr23uy5yffGN9Tcm2kg13kvB9Uo7ZXvqr0jSGXICWWWgcIQwyDFQX6X3U2ntOjKRKCpOpmOwtzSsdAT2omuauUqNF+azoXHynES4Loxqu+iXUU2FaezFfzMhiAOsN329SosR5dOxKAlQihA9FkKdRrWlXGiTSfjtr8Q5kGyYz88rQRzpclcDBLLRUJ9/3uvm4emFGb6X0UXukA6Yz72GQ312V4Mulk5BCbadDIyVpWFRuedLGWnV4H50nQuZmcNFJw17hp1WEflCJOZOBzHpr++jpe+Lx9ldVo5x07F6WzYsmEYel73Uqm1A2CiTSfLN5YMsRBZU3crW9+XpnNRZLlwsJpa6JWldJXpVHysYx6aZe91P4h6LZenTSbbjN2Pi2Ad9SC0rNetAFNxOhuyawDm/hpw+rttStsnd/0/kUy+KJUF57w4s+TM2yWamWf3KMvDh6FWcSSeJJmjGMddzospR+IT8SRxbwjGfer6p2ib6ryO7sVT24sq3v2NNJaCemP7ZZat7N3sTK/FP4Y5dSQLgfwKy1qKNR1aULu2EuqNFnvBT7qPBHk5PdmfmFd/Mm4nCQtAvGzsE2EcWWxReMA9vharS4C5eQTQ7gppUfgQ/zVdvReDOKoPf9zFoniiyNunhMw5/9r8K6u9HMwuTtSR8/mVC8QS0Vmi32TbPqVznGWx7oy+dTcj7igSK3ERJbcGLez6Qfksy0/UJniBdEZi11u6CVTLWiRXy5Gl81DLw6k3x34R7UEOd1KdWh255nqSuK4xuZDjGoqkZhPFmDjqEimaiCdgNJs7LbpGZ04Ogrdbvh4uLflHBkuOecHfms8mSEv20emRA+Dt6a7EREveMRGRY8sDdZ/LgpasY3OgV3vmvVNeD3yW3aPCHsc8D9T8aqqzhJCU6DggJFCEuehmiSE2tnHsWWDgzeQzS+6R2cyrOYeBvg+GMIvWMQGMY4wDxrNJy5J5dMriAHjvMQtxyqJ/ZJTi2FMUsA9nJovucXmJY85DDz8YjCx6R4Uir9abUMPNpR/L5nHJh2OPAjPebMSx7B8Zb1wAzH8uHQC7Kdn1x2+t1HLXd3oQpY7a0ISlyRssTjkgsDgnQObzDZwpcKN0U6rPfSXbBLaJMmbP9fz8P6WAOEA="
 
1
+ window.hierarchyData = "eJylmV1v2zYYhf+LrtlOfElJlO9aFwOCpYORDOvF0AtOYhTBslSIdLesyH8faDoOqVAWqd7Yhq2j85Avv3T8IxmHQclk8xdmBSBIGUMAaY4AgCAAoj9R/V2eIYCCIoASIyA4R0AgQ0AIQ0D0JSQrEZBcf2KpfikR0BQjoDhFkBGCoIAcASMlAkb1S8ZQhsv8K0pG8dCJSrVDL5PNjwSTrNDvPT+IZJN8HIe9GD9yKRKU7Nu+TjYYGEqOY5dskqrjUgr5i3r6JuT712vfP6pDlyDze7JJlKzfafE788UzSnSjLZsbo714QJa/eLS9EuMDry4252tnPS4C/eNj29Wj6HU3k6z4+owSSLPSdr4dmjDb26EJ8Dw5MDZxaELbZq6NbZtu06ltkOa2806MspXKKd9Ve0sQy0AKkhoGID6GUfC9+C76m14q3leRQFN1PF2eGzri66Et7+tOrEJzpfFc7Fw5yjxcN1r1nXeryKbiaDaGsWHLMw/b7dCswrJ08USEGKKCeog+Cy6P47oyTrTxZPQ8vkrsJTsM49NKMFsaz5WzExfBvnH/+6Dah7bievlfRee7QTRjmZpxRsA3znZ8VO3KKTDRxpNhU1VCfLPzTlSiV6vAXGk8FzGrBvGuGnet3K+jsoTxTLmZm8TdX8+3vq8eRX1cucZOxfFs7MyW+/rrXki5dgJMtLFkNE3BkLHUR9Y2/cqh70rjuYCeubzVVFytLKWtjKeipo409a2y92oYebOWy9HGk51HP8XeOqqRK9Gs2wGm4ni2wuwBlLp7wPHvrq3MOLkb/glkckXRJ9WMmlN4RpxTol55to+i2n8YGxlG4kiiOfLzvMtoMeWI7BFHEviEkKcwdf2Td2192kd3/KkbeB3u/kYaSgHO3H5ZZWvTmq0ea+HdMKcOZSnwFZa1FGtGaA5mby3AmS3mhp/UEAjycnm0f6Ef/YvzcbIgHoiXg30kjCULLEpBPe7htVhdAkpzpEfEqQtYWrgQ/7V9s+MjP8gPf9yFojiiwOYzzOacf23/FfVOjPoUx5vA9fzKDUKJYJboN9F1T/EcJ1moOynfuusZd+CRlbiIoocGS83+wegsy0/UxnuDeEZs9luWeaplLKKrZcnieeDEQ1LirLFfeLcX452Qx04F7rmOJGzU6FzIcvVFUrOJYkgcdYkUdcTjMZrNnRZdgzMnC8E5LV8Pl5b8A4OlV3OG8Vvz2QRpyT44PbIAnDPdlZhoyTskIrJsqafuc1nQknVoDmTZO8+U1wOfZfegsOfVvEw9Nb+a6iwhRCU6Fgj2FGEuulliCI1tLHvimXgz+cySe2A2Y5nnnnHvDWEWrUMCGMuYeYxnk5Yl8+CU5QKg0wsPwEycsugfGKVY9kA99v7MZNE9LC+xzKmv873ByKJ3UChiWfsG3Fz6sWwelnxY9oVnxZuNOJb9A+ONC4D+59ICMIeS7XD41gkltkOvRl6poAONXxodL6YEowzMc6N+fwOnC9xK1Vby81CLLoJtogw5cz0//w+UIjig"
assets/navigation.js CHANGED
@@ -1 +1 @@
1
- window.navigationData = "eJytfdmS3DiS7b/I7mP3be1S9ZtKy1R2q6o0Ut7uh7E2GsVARnKSQcaQjJSyxubfr4HggsXhfpyaJ1VlnAUAQRCr4z/++9Fovo+P/vqo7Me6asyjPz2qbuvm0Jv20V//Y/318ZOi6bq7orw15aH4WpfDoz89Opfj7aO/Pjp01eVk2nH4y6xRpOj/ezuemkd/enRXt4dHf3397PXrl49f/8+fNv2nxWCqrj0UXX8wfVHdlh1vQRFEl2dF1ZSXgynGvjyYnjWIsKL286I7j3XXFrfmcKzbIyseg0X1F0VZF8PYl6M5PhTfuv7upum+sR40RXR6GdC+Nhdz7ut2ZK0yHNHrleW15tswFXLdHouhPrZlwz/6LEv0e22ZTf1fl/pQjw/Fbdnfm2GUHlaWJfr9VJzr1gxVX5/HoumqsilOZX9nRj6DeZrk+ORxcajKorw3fXmcSmZ+KJxflkS7/cvz+2qOdZtvM85995+mGovu3vT3tSHr6yRREGCgzTiacXQJLvvRHIqqa2/q46Uv7bvFmAlMoB0ZHobRnIqyr27r0VTjpTdILnki0MY0zam46XpTlcNYmPZYt6ZoumNdMaYMC2h3Vt65PpvGMrvLaP9lHBkW0v4c7uuh6wf3jruaXxzKsWQcGRbQCk2UGzNWt7ZOVKX7d/qD/YnxFblAm9Q1TXkqi6o7nRtj6x9nSMGBdmhtKZdG+sZ8LZ4+fvqSbSFmT4QOtEyulS6OpjXuPSsG0461tSpO5fmcaYddIjC+mIonxbkb6onc1DemerANoPlej9JbJDFF56fF17K6G80wFqfucGlMcdOXJ4O2WRhfTMUz++T6S9k/uMdXlYMphvFyeCjOpr/p+lPZVsyrDQqI6Xi+5eauHl1WbBeFcc5RRK8XK9FWYfPdVJfpMfbm3PW5r/9sKnJF95dLvR3GcjTFaWoguBKmCaLPq6Kp7836pp66A2dCoEWH10VfD3fFqWzLo7FqjH6CFdV/CvqQtnt8qv9wr/m3srmje+uzm8iV3J8+Lsz36rZsj6ao29Ec5wbGvWlMeywQRd8nRVV9HzeN8lCeRy6vOYbo9LQYHk5fuwZtcDIE0edZcWy6YSh75ovigeQ+ZtXUf+lNeTiR9blq6sL9KqWs6trKnMd8b/XUtZ19r4tz2ZdNY5rtfSednV7BM4Fe7B+m7wrz/Wyq0VUeM1Tlmc7t4pllyeV5MKcuUwhLW8eUt2VvDTFW8l/77s70ouiEAiWX6i+Jrq8JJmsbRUlyajgxOb8lkmSDVguTt6PEcZCEHYqVDKuH/fzk3xJulOO4hYcCqv+dsd3J0o6EyIZ2EQ2RwBitboexbBpXomV7KAYzXs6cRY4DDMz+61JXd244WRwvNf3xXXwIODASq7p+6u7ZFoAtqQgKDLm2jo3tCbDiCRgYX80dmq3fjFQihgYMquzwqGvt0KA3x3rqG2Ta8cUvx0FGV+Z07vqyKeqh8+qOnQT9s5sEPffm3g5W+CTolIAhlz/NwBhHSGAU1ZQPU1s9nLt2qL/WTT3WbL3JcoCB08GcTXswbfVQ1K2dI5rGftNECufIEoGRUtW19n/sxNS5PEr1hyYAA6HpcQLZCZHAqOd8+drUVVGebQ/pxvQmM7JbDGgGMMAJOojFzaWtsrMYi1eWBIxz6NcU85XZwDBo7f6U55ozC5HACCgYkwniKRoY5LjRkCAd4IARzNn0Qz2MtrIUl1FuCnIUYAizdueQh03igfGLe82aKX2mZx0SsCj/3KuAQ3VrTvRS2mJAwEWLF9tQGHBI0aLBy61cAYMULRq8mue2APUIKkrPExOAcogUhX8qhvqPaY5Ulo6xkviz9Y2UxROsKP5kGXtg+gRctHhaVE1t63BtJ62tXim9vVmOaPZsJnIz24tJjBXFn8+EpU5z4jFWFH8xE6YqzSkHQFH25Yy29ZlT9XGi6Kul5KaazMmGSFH49Qw/2/XJsuGUI6go/dOMXyswJ56AJfnnj4vBjk8q47q6jHgMFaWfrHh4yXGxEqii9VPbVWuXzrOT4l5cmiDaPJsbE8giAYvyz4v7sqkPJZwLkiDavLATm1/t5D1gkYBF+ZdusQlSj7Gi+Ktp1fTQfcMKiICLFq+TMT3nkKJFg5+CxRM2/RFUkn5BLUDasflWTRg3gC0m4MlU6e26woHbJ7M4EnDR4umSSq+DznlQeNHkWXFum6Iqm+rSiOWWgEX55/6SHScdAEXZbSXQmwDLbcJaLLIk0e5lYVe2Xd92qzKcF80QjV4VN+Uw/vmm67+Vva0pJ+CpZEmi3etg2Mp5hEhReB4P48+GJEg2Lx8XVV8Ot0VvKvsF5TqXCVYUf2Jn6Zs/2+do15Tqsev5QsowRKOn02Jlf182xXjbd6PdmsP6kATR5tkyFMmtRi/yAVCUfb6g4Yedo4hW3ujYDsTLvh7YN4MmiDYvl+S5fQVcu55gRfFXyLr9op6ARfl5nHzuu5s6s1a+iEdQUfonh4e+sClYkn/1eNvSM/Zldce/AxRctHiy7RSZPvdlWzYPY11xxZQniXZPtz6Zk8C+HSxPNH3m7/wpTmbshfyRBNHm+dRRqwdbEGDvIcsRzV4U85jSVVa7yWsYoFrCM0Xjl8WtKcdTecaqCgEXLV7JW0AW+Ve6zR+vXi8jGtiBZohGP/mjM7vr4mRGfq42R5GsXj+2/Sr7KkI2FFy0eFJUfTcMf64ublfytHLbs9NjWY5o9tSOC90+b2nNKcGK4s8K0/ddX9yW7UHoUyRYUfx5sG4gzbFQcNHihd1HbJulQzF2Z/7lS8Gi/MuiugxjdyI3jXFWLFG0fbWw/QKxIxPTHtgcskTR9vXCjj7MrGWWJNr9VJwuzVj/ed62NvfD+LWoPEmy++lxUdZ/PnffTG8H2NTmQ8YXYIsJ8CfiwYX+LEc0ezrtpS+qrmnmmb1lZz9nl2eJhs+mUwvY65GCRfnnfj/9AI6xGZZo+ML2AerWtqX3Q7HsKO7tu8xVUJYH7ObqMk1Yl2mt6H1fVVMOQ2ZP2Jvpwf5cDnRN6GzPy9KLDSgVlkO+XWeRv7j5RUg/YaFmvdHZrHjM4FPffadnC2LpCYmJfplmwTXpDhiYyT/WNlhjlLAks5/nmbK33elUtgfMiyahVh/tBPmnvr4vR/DhM0yd6bTTZo+nT0Qtf50Hdzq/iIWafZ4GkDqrgIMa/b+xzsyApwYTVhTuTXlnN3RoW548Ebb8t2kUpLQLSLCVsjZkaLCdqj6QJNgKqhEBWJa2m9Lf5E9lBMoeFhMGvpobUJJ8W1a3BimCDShKTivgrkGXRD0oJvue20IRC78H91A49IfsBopY9wOyg8JBP+e2T8San4H9Ew75Jb95Ihb9Au2eeNs1l5P6i51hyWZ2ykZvRrIAs2EsW6jVD7CicN9BDceKkwTfXU5nrMXwkJLoUv+1n6YsDzdEO8YEAzXR9GNJDmqEPOgAiwpr34IsTzKcGixtLaBJoBX6/GM4JK958ikBstA+GpokWf1iSmU/m2AgJpr+VIJHDJB3ZMWJgvXx1gzjp2ktRFk+DFVlqyqxLFFlCZVhQpAsruY1eEQ9wErCH+t7oxp3pwTEQj/ezrBwM8U4myYhVrp6TTAQE00tTvCIAVKrVpwo2B2xPtAGBCSPpgcLwMfKwt3d5Qxlf0NKossTxkohQqPiH+rGAGPIGA7Ld80BGqSmBNQCKfUAiwr/s69HdOROcmSj7+/68pvl6d7/PFFhqWkNcjSFHfaYQrgob05d/wA+IR+LCS9TfxqDiIMZ2TZRY+LhJYPfurG+qaupH4pZEAyNia7QGKbG9BfTnNGGPcvTGOJPLMOSzD65LUDaYVqOBtpp5pApCmija+1oEmilaeUoCmiDtG4+VJTlQ2n5qnjMLA+qfAJZosJS9SQyNMDObjIB+hseEhVdpv2vpqlBJA8kTWsHVS2KAxq9tZunjC5TIUdlpMiORwAtliGrLjcxS2mmyJFqSD1zPnZHXXY8Am6hyMSCBsV/NeVw6ZUVLCLprBR58Rmwie2CabPjc1RGqsysBNDC75zockQxd5gqcpfQQLv5s6vLXkTSWSkypewTWMpnU5l21GUn5KiMFJnxCKhFPdwpc+IxFCaaXCxwUP7LfEZSl4+YpTRT5CegoDZmGNRNQkTSWWky5DFQk+mMqTI7AUdlpMnMRkAt7GFjZVZ8isZGk5EVDxt0fXlU5yQg6axUudkYsInb16vNUMhSmqmy5FFEm/mcmiQ9w1C5L/Uf2FOI8aJBX1fmVzOC68AxXJJ3XzZswifAYsK6OTOSgxnh01YJXja4sTv0kafrQ2VZO/xH0+xhMWFgpmADYpJYCaxITFSzFkEwRJN6uNNONZIcxEgzyZjgEQPd5BbBQEw001kJHjHQ7GtJ8IgBVFHRzrAFarfJkBzJaOnO6h5yhoWaaR42yUGNkGei6tDPnWWs5QjBoLTu40WTQCv885USRItpd6y2EcywMDNNQ0gwMBNNM0IwMBPtm59hiWZ2jAFWAA8KySqrMUGBbBRVOILL8tOQBRX3waC0togoEmilKaaYIFu4gZD6Xc/xcEN0IyzBQE2U30WahZqpvosUBzVStWIUBzWCPsCakfQCVjeROZ5o+NBWykqQMhAT1cOP8YgB9CwWnCxow09gkitSEr2uT4pZhwgtif9zCtKk2lRLUTAb/cbaLE9jqNhcm6Nhdro3guRgRpq3gmBgJprmkGBgJsi74iExUW0zmGHRZn7cgiVeeybmQHk4+MfZs6lYZIqIIOW2PBzCY0aQQ0gBPLwDLZCBhwfUt2kFSHyDA9r+WANS9wmIftALwBwCCuDhv1qQg0+Q9O1FoMZtgcm/hau4jxaVb011hyt7aFG5O53q6Qjv9D1YoscCJjQR9JvuHTY/X/LRMWKjlYE5rBurUIOVgOm/tUs/jbq8Ihro1XSD+WTabPRUysjjgC69sQ9yWt2EXTwO5jJvn/jYDUhFjilqj7fdQIe+5H0sTeXlDnQpnRxph8+OXG1EzM8902kHD/yO+hzM5bovaxsG7svY0Ze0ES4+R++iKbqYp3O7Lu/yXaWMk+XoXfbkaeGJbt4bPs1vAUYxRfI42CPxR7sE2w7fmOmj1SEiIPrvbdhBTHmCIpp/y8UFTiT/BgQEtrjPpup64GOyYRHV6/JrJuh+IjpBIU37n5ik+S7Wsmnr+Dit8cuiHhjT/fdL2Y71CLRjIV5SP5pRNyKJCIj+8dibYzmaw3Vf5m5pTDwiEuLjulfgE4gIgP4yp3y9hKuHTBIW4oR3/Hw0oAz3vzcsojp11OBy3+CI9hTjBUyxw0KqNpgLKGqhmOYItSgbFlB9B32vZiCiZ27KS6Mq1pCi8YALOWAADtpZjoQCeKhmOUI8oP7RXt4yokOViADoe6da39Vul9+ntsG6WSx9t/cn09vdXSUTOUtOwSaCpKNuL6MZvtRtZfzic0M+oI8iayCpyF0ikVgBl0gczfib+a5qxz08oP57b0/Cd10+ZJivvaIB5Xkkr6jyAQNxmDdwTjM6Zn5ymBPFVDi+7S7tOJ2M32EakxW+64H8HbYRV+H6/ubGTAWFf/NpqsbT3u+nzOHMUbo8/H5v+qYEBvMZosZvGOtTOe6qqxFX4TpH8PFaWM2nQVT50ZQoPxSglj5VP1Aou0vih7P/o3me5th0AxBeYm8a9vRaEKH/hfT84BPKy+1N257mgxLY66//DqT0vd52YD2M5UnXXtMSijRctfdmGM1BXTd94i6/S+YmLNnwIl+L5fE+mnvDLMVTVo6i8PBjCu2owyl9n/eeNuaHvnv/Kx+8/4UvnS+hfodj8j7ffe8vJaDwn1eU9vT0QqreU1fDF5LGZ0dl1tfgrcZpjWaawuufZW1vD9nTQoRUwPNz+U0zuN7giLZiZ0sAR7Qvrb1N86q96TDxDQ+or6v9itF7xEFc3PmJd+WIFZCHR9Q1C4AhHlLX7CyKCIi+cmdRQtF4jOV4wep/SEE8pgurMO0JCmjqPiGa78V1N5ZTyzitWWAzhhEHdZmbRa1RQAO8dLvHIoKkf1sOv3XKeb6UA7moWySKBThNy4/w0k5EkPSb6W46N+n4CdoZFTO0Dr9zMQKyLr8DMQJmzs1o+vctUIFDvE5dlQuPg7ksS7af+u7YG2STF80D3cyNPW8zlj1QvxKK2kNTdBEN9Fomft7cl3WDbdvIMfc6qjJJsjHnd127HjVD/XyO3kWTs5iHu9lzbRoXi9epa/OxcHAX993SeDiG1kGbk42FOYG7vjwwqPsd2ey5YTHVYF4NlQ9IO3w0jyAhYn5Xh0b1hV7wOnVNRnwO5uLNmaAmHkXtoclMRMO8vM3O6m8Nxd3vqslqjq9yd9V3b64j9o8478g5oQCmAAhPHFvicYodgb0sLRJH7kvbkJqSWvCY+jKo0bRPPkfvoslLzAPdwFGdj9Yoa3ttIWuPk6rMEqbGUdN72xhaB31+dH043emNlKN30edo42nc9D4KhzWGgz0pAbsErD1OqjwlTNDxoa1gj4e2wlVVqZ/xmPp2hhjV3xiYg26coxnjrOf6z41B5swplsZJ8xS0oyiH187ohCzESbsxOeUgLqqtyREB0XcxvTFph0VUNctfIR5R1y3AxAzIQbkEk3IQF90EfcyQHLp70/f1wegO/VAs1En7RtA81E31ZhAk1EdTl1MO6qKr0xQLdlLWbZqHuunqOMWSnHpTHtBWbMPKqqfu3uC6G1pUvrRX7a9ddQcvNcUMyWEwZV/domn30bIyfpxogE9pDfgprQE9pTWY0d2wCGk6KKCp2rcwqPYtDMp9C4Nq38Jwexmx6cAFKSqO3XlpEwBVDy0p37t+MVAGC1JS/FbW44eu/2zKA5BWHy0r9yd4F5EHFnVteGX0FfbAtK4fuKi2dwTdlFMHnIpclARJEQaYq16RYUpZzdD8+1j2m/sqUEKm2Svb0PZlBWc6IIk28zK1xiSiiBZr/Bn84UUUrYX2cTF0yXqZLbMNXz2MdTXY83T5KcTNNcMUDbfVccVDI1iiUbJCrSxWXgC2h2tNxFAa7M3cjiqzUfHnF3Ngk/f33GZZwmEiwPI76n2GKllGAaDgakHydpkpq4ioISbCi0SFZzch6W20GWUFRPupY47WHg8tCvf1WFdlM+1O0GYpx5VN51OZkMmMRUR/mfpqoKoDS7J2X4iiDfLhkvQvphxP5VnfOtBE0c7fXqHIEslTmaHNa0pS2ewoSIYuWV+5GTfAZUaCgm/LpvlaVnf54UmivFJAi09lX54U+g4PigtTR4k4Nmm0gKXxayoPjmGvMuORz9031IxmY8b1+IC2iCFBlg/DNbEzIb5JSpOtojECWnYpTbT6uT6gOZmhsqR4stoXRc9QX0WdYLBMUhZuBBeMTwDkO24xM9DtgIXMq7dehFq8RUpZgJFFo6WyoWVhLxKuIgcJSzZaKgF7PZnv4RNE+Xm7oqJPEFNEi3eX01maP/fkPTgkLd6xGGmjtytevedD+3my76GgflfL2hkkOWNhUVXfISHBNnhdDxmwAd6H0C1FXr3/bqrL1GXC62LMEU0+sBEIPeUPSNBBh1I92ZCBGeDP1INj0vjTVKz2Xs2DIPB7uqFF4Y9dfl3LU/zYiWtaFgP36hYsIsotk4WSwCrZ1XKthW0Yfz/bmg7VA4IGW12X/dFAb1/IkA2mRRXN5yBkAAbjbXdQNB8BQZRvb7o9UzEkTzTzwfgTSVkqI/4WkYwPdKHI1RryDu3rBQRR/lPZD+ZNf1T09SIKbvHZDJcGehwRBbGwW/1BaQtFJdFS9+CotIuarxg/UTzUbJnp0ttFTNnQ3cSN9uo9OCy9jPE0TWKOi5q6wc0Ox5CI2l1Znfuy2WEYU1HLj91xh5vHQo1+NeVw6feUZcTEDbUfUJKI2vmN/A5Tio5az+/sDteIiRq6K9R3+IVE2K4e7vaYeTTUapn13GEXU2FLt1Frj2PIhA2nvVt7/AIibGc3ie1x83m42XRn6i67gIkbuln5XY4hVbac403NYcE+locDNnwiibDdl/oP8+b6s6KvSBFVdh/q7+awBZvbZ02KqJLxd9M0D/vMPapsOV36qJvcjTmgiXuF0b5gSBEtXOsOD4s8OCBtb5JUjusTEmiDjyB9vCzOHfv1RYEjvxNo3gA41zpUOmRBRqo5u4CAydt1BDvwg+UXAi6vqTYRBzLBW4kNDQl/Nv/pruTGB9IEDbLCpzfxUyYOqml1AgIkD5x/jPTx848R/MMOiw9ak0/lQ9OV+fBWWaeZKNtdNMsGGxoRFgNEhspofMgF+xldcvLxongUsm3ZAwHW2Dxba+w2Ee6zXbla0312kJF+aKMd08x5t3sS0XwEDNDg3QhV6BUMyi6zNip5jwTaqEoGK5Q/uDgggeYfQPSPGfa2bKpLU45zX/3N9WfcIuXuM0WnMLPkfbbRYGV3CiKdfYmZBi+7kzCxcWO8ZxlRQIsddUlbhX7wEf7Ik9v1wPTPyXX2VIW4UlQWutdv46hMdj8pkq6yVj4pjyTbaCfadDNsExof5nhwQHqae1u/P3AlIHhqM9dv4u4mZxxXst6Wj8HMeUJhmBPa72fT7jN0TLWhfOk74wlf/b4w4WknHw+I49u04Q3aa2wi1ccvJsE2n9qPGoNP7UdYGp+TCBmwAT4loQsSscKv6+rOpcnNi2msYu4OU2Xjk6XvsVY0QDR3h+kVdqopw9xhqGn1aO4OU2XLl6XvsJ7vItlnPJNF2+u+rBvbOxm7s2p3CUmE7a7LO7PLLiCKdnNwMU3jHFFAC1foCoOZAMrjbacm6M0CVn8BKB5gtsatwLueCUmysUEj9WfuCJZk5IUgVpxRIFgKI/TMYkxRWOjLLk8Wbc0wlEcDG3lwWXrs68qmB6lmHloSnrfZoE/Ch4PSQaRn5ZZbSUKRBPjcesJRm+zPpP7QekCGX1uCBRpF0av3ZZURUSVD+0x91g6jH8ns7ierPkpO8kAzfWtJE0W7LS65JmcpS2G0I29Zsmg7h0xdQutoMpmhopZL/Fm1YUiU7KadCLiJD0ek0e/RikVE140Hyhc5y0VM9dWOYElG67AMLbeQgMorD7BSNNRKX2wZpmjIR9r39KEg+w71f57AgsUTUPIpLvkUk1ynaJTvA8MGje0cjaYipSyF0c7sJVTQcvrQg8sEMQWzsJsqFTXMwtFaZve7qB+MT8Jtdj2VmIjZ2dkyda58Em6zs7alVMxS2yInJMxm/VzsyhzJBo0f2kr1Li0EXH560ffli2LjxvaZ7/aNyaLtPLkFdxB8PCq+46NNM0XDh7aCc7JgEdEdOUhZkpGd1UZTv2JF0WT+GlFPSHobZRXmBVD7bdpcYbmR9DY7c0kLSPbztlkDbjz34aB03bV7jsAzbMk4vBdF8c2iiaid2kYjr28tSB5q1p3V+fFJtI0fBXt8OHMBsLv2Ny7oimUXG07KFVu5nRZQn7GAXJOcKhSXi6+1RU2TNr7PDiQJ81qTp7CKOZiTN/ur8EpZKjc3H6n3C3iYozeAU/ilLI2b7Y+pzTySxmuOcKu2C3mYo/+5VhgSNJ2f/XDu8PNoot+lujOj3KJtOElxCpv3oW7Mh/kOAl44gcP6fzcPcusZo2V18ZDnrIse7FwiTbgzAYjqghWVp+DLwv0oTtdDYqpSsWLXt8wwZprGV5OnZxa9/CxgoCfOAC56zzC9Z6jec0zvOar3AtN7geq9xPReonqvML1XqN5rTO81qvcTpvcTqic1DrOe3DbMel8xva+ynh1kQV+MACrq9lvoZ0HWQ0qq7+rhXI7VLa+4oFA1qbFZcHJr867vzh/qnrkf2AkuMFhPTOIClNPoYoFeCQ97Qclql5OkdDmJKnOkTLlX4SMl1SliI/YZDaCQrpzUFSbqQd0etLez4KQqs+DkGrMqCh/RVVH8iv6bcbFgmLPXk+KGExWb7qtdEZJ7Nj5S3Ky47Cb42B3r6lPvwqib/r5mjuNMLhxTdJV3xDoPfAOs3dioz0OGJbotp1nFPrGPRFXxgQLF0LhAwwWCIHq4KCzCHQ1O3YfKe8eps5uCAckBnRQGKl1hm7OvC58NCc8iSdoRHN61v7z1wh7qxYUi7TghAPpsBHBHuL7FyPIkx7+bB6EiWQSiIn33LEb+5n3sjnLzNYPkbdUuTLDcZfCR8tbmKYainEoPKGvaOImI5IID93Z/7phDQrPkCgQ1r7uusQMHSHcBS9r+0oxcDjFao84vfSTy0IrHb1Jn/De5L44EzJ20FKFylzlwcy9l2UcqNqm6nfvXbh2Gk6cook/buPG0oL3AxO2NU5Q0uYA3nKxog5bJ7cuGkxWH0V442Zbn4bYTvjARGNneCeR+RiFqv5ZnWezX8oxoAaU4o1R7Z2XJFSrqujhIQBFuQHT/qCzqI0XV6TrwL2a0ZxCF73uIlZXlu7NnWfjS7C/gqPQLPCrdNhIKiisO3QeITGqEWEzZ/+RAs4JZGrihyxbk9eUsdQ9itGKfmrT27+t7eNnBjj/k1mLDydvByhF5AReYrDeNYhDFFQhqStOHKwzdAudGuPIHPMWjDnMwNVMOUmNMMWCXKQiZxmQjwB5AZyTE4sp2Qgl8Y0gO6oRUyg2JqgJvo4fUbM+8SF+vAItsmYRrfIAVd+Ahs0rX2HzSDJMG1DNMHlPPwLdjlw9x7StaIKiJzBhda+70vN4988sxla4uWPMOU58oe4p3S84W6LWS125vCfCcN6Co6d+MByjHcFFfvPvO6aLX3l2D18WFqmDdjG99w6pIhiW68VfGOW3otrhr5MY1Tw8sjV1rGzmWwk3xdtIk2as7AlV9Rolqy+Qiey7ESfpQlS6Q3Bgu62O3vszqqpteIjiS+oQgeiR3hQE2JEd0kq7PctrgzVnXyAVQsyJ+95OPBcohQsPq8e1QCiuKivqGd0ThpikPdYwvicI9KSbq6l0WhRtGJNQruisK9yOIuKeyWcjyUEfqsijcN8dG3aNLo3Bjgoh6hhdH4ZYpD3b0bo9S+EUs1C2+PAp3pJiwaxhsXWGaEmHP4BIphWXCgx39MLcKw5iG+wU3SWkcEyLuGd4lpTFNmaKrd3UP4BShAXW78AR0JTagQhNKsA+WtbmLfWZF4E6fCSTOn1gQMHsC3Oey6YFjp/mtf3MozyNz8ZjTDcGotqL+7mmDhHsLZmHoyoIZJj4vBwOeGL6b6Vqzm+l6asfAZ+ZBMV3N81K3p36kZsgghAP6QnDnRReL67wC5ToxA5FagQVCDnXBmrFz31aep3JUzIjkaKAfVHaaGKgO6/aE8LI+ElOVVyU2HK34r+C4sflentyCKXXi+PGT4ugW0YthLPuRDlk8axQpWsrT46fFzXTS4Os85czKx2BR/VlxaQ+mt23KYUrV1EkkV19WkwxH9HpeNPW9Kca+PGS+IatFCBWVXxS9/aifyrY8mlMmZMUqnqBF/ZdFWRfdeaxP9R/ZIASrfoIW9V8VTXOCCiZA5mqvt6/y46/ks7R/l1J1Lqu78miGTMW/6bt2/EtvygP9ui30YgIWDih5HvvyfIuITkBQ9NS1xw4RnYCgaNc05alEVB0SlD3XrRkHRNYhQdmhPpi7urpDhBcsLD29/ZjyBGWF/dp7dt/GTAWsmnIYDFm9Z2IxQ6Qs3MynFVitFSSprcEtWLkNJZfD4HoldfZdLM998fTxU/JU60YuFpiUgxlHHkJN5cRDqAdTWRx5RtaTW2Di0zJfLY7sInpyCwyUkzK7wCS5/yxbRG6BiW1XCT2KBSa2WtWIlN0CE+XubTfSkOc7fLkZJtd02z3zXptTZyfmhr9Mfw7ZT7kAMOHMx9wKzCobIhR88tTP2XIF5RoULg7jtL2/ni7BiFL94qVsQkc7Qg3z0Y4I80ysVNqLiZAaSpeHA71PZG1DZ9kIGGq+fB5K5pb4CVFugT+WJVfJCc3sGnksSE0cEXq5aaNYjp7VIATzcxqJZGZITIkyA+JYlh4rEqL5kWIg+eZmNP379oDUzwjK1s6mPrbXXbqpN0lpCORSusZSkpuJCMq+ohEWbRgYGmf3czLCvC/72oa+X5R/JoeVz54SItmgY0lyMww2pebGHoCwI2igchBoTvyrOdbp7c5x5fBRTM2YYNe13zEmlSyEkSE2jSXPht4vFj6cBSPcjJAWIUtkH9XCFN+MCKkQ1WZC+VpsNLmqxVhIONydOynFeum23KePf3r15AX5dKOonflUEiE7M0lUvM4ZCm9jNyZyddv+zlZsIQ5eWKhA/DuqeKdYdkzXckNwXUspjl6aVD5+Xi6lXPy81EOKmye4ZOLmZX2YeHk5Jy5eXuojxcnjXcg4eTmTbHw83iMXHy9nw8XFyzmxcfFSIzEenuRDxsPL+2Tj4KU+U5y4fAsx/cw0EJX9fb7SLP8p9lHM19idVMGHhiSeaw9JAviVE7mCcRJdz398uah61POio+qlanT/OlWsbk11Jz9CD8U9wqlhcG+U/PwSMFuGCRp9ciyRtSQDDQZFnQ0wSDy6CSt95z0Ul7RqykgyV8E8QJrAPMuZsX7PRe0VKYoS/W5aM9P7JiSj91MSjuCyvFeJRG0PKwv3xj6P6B6ajLCHFYW9noek60E1sm+7gRnJkXBU3vVjQHEH1kkr0r4RuIaPjkAYthXZyINEqzyBvWPJ4uvnY8Wy8HskkrCPVQkjZRzjYQPbx0HFLVYlrEn5gmcrx7S7iJkBWhBcV8t7+actS0wCYyiXtr4e66psmAsB0m9UjsN+TPuOmWaxvzKZpwNxBm9XNgAn8SXuu/Z9O/YPbB5njJSnX6ZOkaDkQJzUu64l7kVIxHwYK3c5nfOlbX9lSvtwOZ3fHE07vmmHb/4EQlzRIiBTzSxyqi682AQRZP4WnEqnVP6WHEN/+fxPblJhWjc996Yq7ZaiSPmzqbqe6TpsGCGJ17aweZ0JIsmwU6ULghExp3ocTZ9d+lt+DyWeZ1bD18WqL5evNshLvn6tugmHqXXlvNigUA8ZjPaycWvp8Nm5BdyHYXOe2/y4wiohcQ7rnCCuH1G4VqBrzbqIABsQLMFjuq5cpe8xBO15SUylHnAYfWO/Dri0D+dUbQv43pEQVQ/OqX6vR4XohmY0b+vjrRlG1z3Gy4GiMS71oVG2ORGD0T55l73D8imJcThvwx/cISXJDtqnQNE4ly3iHF6NUhLnEN18rLChmYCXe9P1TgGP8bH7YfFH4qEZzcG7VhfXJlicx+1ltPUbL5mIwWlPoxL9UyZ5oo9WH9W1XyCttscR9d0wXvF8UxbnEQQ9UrhQPM7noa3meTCFSUISHHTSsub9es0drpxwGP1vwZV2uAfJE33wWvoNbNW+rXfLadPucRJ9f7tiermDP9KnL3VIR/lpLJw4eXQYnGehiBCkJtUE4tMEFtM3cvzUB7LxYM8DMeM9h/r3SzkVkaS24BjBzOUT/uNgLp1In8nRMAPao+HGskczYrsfI6AgeTz25mgnA6778sCtgBFgQdqthwgPNgLyksvnz25rugkDGhG6CVoQlxdlfBQvJi4obhhBaFpMEctwgwly8S1flBZ1yVcqFK4KkjrpsiAhw2+I2zC80Dt2RngGCBLmprw0UBGFUFBWLLAAyYu+v7kxbm7JPnM7IcMqp3BBHtwUnUB5WWhTdIjjBT+W0zyLsHoYAXnJX7fx7bvaHYqeYoJzKyIsbY/dJ9Pb0Azlka/TElmwrtvLaIYvdVsZv3zcMiszDyxzBePuIOSrOwhp/818h9pYD8cL/t4fTP9z192xciuKF1v673K9DJCCaDfUlu0OTcwPgBenGJjJ2+7STiNajU9MwqyWGqxxijiYUdgIQj4hBbRpx74G8zFjceGH3+9N35TMonWGAFoMY30qR1XtijiY0S9uFtRrwJBGVmT/gDnY5IIaqoTsyPqe/O7O5A/kbJpfxXrWPHWHrebzjQj8WBJ2Fn1eZkdyNK81Rdxhibe1KW2HnR3rDWN5whpImorZXrX3ZhjtTliwavkErcWl1Xpc4s00OZPpkh6sSjgoJus1jJpal9LUdprXfe8X5Ic+HT/2zfDZ8LsVk9RWuveKImKW855DTS8npKhssDq5gEFpRfVT1bmtrqDaMxyT/2dZ2wBCmpc1pAg2ttp9qUpuX1AA4+U+l9+Q4d8GE+SAw9UBTJBzVzZdtTcdr7fheMF1ozYwpIywgjB1AxMlmruAKRFENmiGOO1WtYmNnF6PgELCwdPrCRSUja4f4WSJ20cS2YfT106oBxOEl8GadbANv+7G+WgcP3fk4RDBbhhh0RULCM+tI6odwHl5LGJBBGQk6Wux/UWo/HXY6RrUbTn81oEzVCmWSeYEhlsqCs2LT4tO4oJBBGQkfzEls3Zrf2VWLe3Pp/KMH2CmCdwe5mB0wiTUh3Ep9nHAVmsSD6dXOiyegmFpRZkzNM7uil5pTfSv8guthCARVSe4xJqWp1m8WbhOG37cCZcUzsr/XB8kyRnCy4RxE4SiSNGCeHj0nxJMD/9HItSx1VQoe3g1Ektz6bfgV7l8Je331by/E3iFYyibQHsoImldU0kPJsql173QevRNL5Fgbk0yleSWJCNRckUyVcwuSEZycyMv1OUNxYp97I6cyscu/tQndOmQz4qRhI78u+QQrMhyYZB93L+fxzAsYqpIwHn5zPVChDJzt1Ak2t50mmNhJJ41SC4I4tQTMJ/2eM9S3G2gtywFPYYFkj+47yOkdquesV9Gc/6VGQmFOKb/VnsTqtedODdCwhn5q3WxV/oCBED2qQTHgYGvHoVHDJZOG24RMXgT6k4pQjl3oVRGLr6zCdGOOYhReE8T4BISEIv4WibAJKYgNt5lTICDh0bEo5uXAIOIgZmg7TZJQCyoa5UAI4qG2EWXKQFOEQMxCa9PAjxCAmTh3ZiEGHhwRD6+HgmwiCmQTXgZCeISMiCT4AokxCMgQBb+JR2Ig4/HDII7jiCLgIGZhHcaQS4hhbeZFya+1H+YN9efP5V9eWL7VCQBtvhQfzeHbf1OZ0eSYeu/m6Z50Bl6FN5muskjvoE66PX5EHG46sDYWDrGAgl175LUyQmhrKx3KxYn6cEEOXtnFTjsScC8dD3czSGU5+fMaidoUfytjXr1pj/yafaBoqQ81s4tslFiyLMPgKLkP9aTTJLmhlSIflDIftAIJ6F3JHU6EE9kQa1jEsK5ZUxa7nN4Kimr9zk9mxQJRssHLqiVUB1yHI2RzkIUx/soms6JM383so9uBQFS62AfkfTAgLRUoFg5Tmu9b8umujTlmHyOgy8YiRU/ZSTrzfVnPu00R5+VqMegNo34+gRMPQi17cQCzIDnpXpMiqejeSg7n8XeR6AqeV2Bx59iosDJ73CuwB0YKvAVCidTXeAkDbYDC9wD89Lo8A0ft83DL6L9DJ9jBJOfpXdbI5/SDSck1I3gPrUfeb0VBsl9NsOlYVeqQiQkKvdOub0/GdHrurqLUxs9oxgIPKWY4rr2SNJjjjITrscUxBhFvFaa1i7anwN5EZt0RKMrPoxdhqE0sUcvtblxHKUREQkW8cpEhBXt5q2gOrOZxFqFATKB9QySAFm4SJYKi4DAWriNXi7XbKsaAAFJucHK7zGjBeHmlcJzBk39Nb8a2dRfmYXIph5G0263ReUX+WIks74XQ39vuc30FFoWnwP0ibIzDhaE0uphReElVsKnOcSTJB7jZYMtsJ+ovUE1skiZRHBZPrmgRnRIGDtMoKyQLNHsnRefULLwsSphJP0xHjL4GHRx8sIfk24NI4imdsFCwq51RGQdUiGKpndDi+JCaFoPJEt95wKXbxhRKLP9lVZkNsFK0khxJgTRYtl6JykvOFgQSa6PFYW9w1qSrgfVyCJJjuCivLczBm6bKc4uIyRDOR5q6OqaNm8Ra6eZIn8EUzbdAmOKLhtUlLXrG5KexUBCSBEsOFHwixd+UhL1sSphJMUxXjYQTnH4KFAM7X2EaKU4VBgJAzRBeiEbUiGKpxrui2BXaKRYlTCe7g0PGuDSmGgQwlMUDtBKcSjlCUM2eWgrUfahrSAhKI0zThSkls5pydzSOSGK9aPBPvQ/gxCimOiCBsWRElV0zB0UHZWHaEEcjfGWYgVhKMpbBBQk3a5PXs1hBCHkoHeIEwSxk8gxUhIFzyKnWEEYO5kaIxnR8FMYz+qln79gWm+6xwA+zEeguenG4PRMkrD47EyYru6YP/Iw/yit0HzsursLcwWN+51JxHICJi+xIACRD3VjuCtmY1woGV40u2K75sBfXJsiEd3fgriuftH7CKn8F+w/+5oN/xzi2KIkhsmpWmaAnJMCDvERaK7ee3DpDG4MBWXxVzZPYq3cMYL8K+gBxGoQfTiSB0Z8NJ6lAvId9iEOFnxzKM9B/YzeIArMvkQTgSu65Xes5Pj2fcOIGbYgKLMekM/oMJRHI9ZAD8bXuQn3uWtybc8GkEtugl53XWNvZGP1FpCsOd52BzQIO4Vmn9DY15V9Q7m1SQ/FlSR9WDJOYf6IZJAyHya/gxQaFM+/MTFKelI+nn97YiSY1KjK59JKVfkksd296fv6YLDI8hSa6RsucHSgQeMBA2jAQYABaWS8kGIBYWzcQKERcXD8QOMBA2wcQaEZ8XPZDyY8bRArrhBGZp6Yzr93M4B53WZEvlHwANIrNkOlvpgP45pXalkBPJ8uUUFb8V7zBKsS1mdGd6l5QBQ73wQaEI8WRXRZYsiwNfqMfLRSfE+mdj0pOGARiQcM8PEMTeAszm7r8bv65oZp1TYQ1zw61HU37W7kY0ymWFn4H2VzYaYufRTX+lJre2E/P7umF/bwPRjy8FM0++g3uOvXXj+cMz1/Eiq2+htJUb2yJCEraTSGpMTpSAxJiQdBFZLxWvIlpQncl1WM9UCnnI/zQGbDnSJF8xCg5QzkYkiQqefiR5BJXw5PoYmP8HLy8/EpyAzwsSnILHzsjmjqN6iccDLiBZnmbLQLMrnzlBKa5BAuJzsbS4NMOhtHI5N8O3WCp95DI4mnY3Rk0p6Pz0Em3e8NoBkgOHI2+DggZGbkGCBkluZuApqbEC5nJBthhMwDG12ETL472Y6mPkDLic9FLiHTzkUtoZNuz7ijCd+wQLLJaCh0orORUMgkL1ty0GRHeDnp+UgrZPL5KCt0FtypZDgHARzIQO58NJ1+7og0nfxp+wiceh8NJD4TG4ZOOxMXhk66PS4Ip9wDAwmnjyzS6c6fWswkezo7iCfchyNJz8SyySSeiWOTSb6bLsPTH+CRDOTi5GRywMXIibKQRAqJJMnYILSGjSrDZN5DcVmOri9HxnoZCjtKCu4uV5iEBM6iN+VB2qiyYZgxtPvs5UvW/c6UqQPICyYhThTMz4duv0sDY4fkF0Y2DJukm4a9fHkGMBK9OXX3Rn5kG4p9aDZ0D5cc+zubIQvghvEbgns7HSq/i2L7XX5WFintoPBRXPaC3dmJSLIvOyED76wP495Ui2Mq8/yrWDz1cCdN668YKTmfjb0WvO5acF41y5GM8OkoAs02f92lPdjDvcz6zYZh3qT+0l61v3bVnRjrP0Zyr6eLKcQ89Q0gPfili5yvzguCqdILJJ8iH4Em6SBVyBDIPU//rADw7lFwRB6vjxkGZzKYsq9upRbeRzFVaB5ZME/dAbiH7hDylzkCypJMNcpd3UPUIgflv84eiEnWwN10P7A33Q/ANeUDck35IF9TPgDXlA9mjEOgEzJUDPRYBrptaUBvWxrA25aGH7ptabi9jPzZwAXBvTperLXGHMBvHMNiWxZHcytfcruVokFxZTYSimzDvNTr7+I7Pc8p3HRwYfhgOZEWrSqJmIBYxNHs07Kg49nnysPGVIHLwwfLiXXhWlQlklJkG/SznIBl6bWPoMoEyQLMHtpqejd0ZhQLNEsKLa1MPg6rUNMpqbNBu+95EtudWW4h+3Jb39hLDPgLQEk490FpJsR6OcJEY+VTOPcRCD9TSb8i/TqFHR37O9Bz8mGonLAzmcJyQ/AJzzTey89i1bJAoTe2QKSsAhuwYxyXxWHszsu8I1NFPBRbM6YpWC6XE4DN44RA6kcAlCW557gC5Cc5QaVnuYLYZMWlnupQJU6KuK28+c0vKU7O6Xyk1QXWNeWQCyNOIWF12/ZD4hsQ1p52qQmfCRKLOnBVakOgauKQ38ex30jvAlJwSE4zUJNLJtwrdxMqUQ7BiejkZUjOQj+LyWIBLhg2Xw9tpSi4FM2LD6M5cZm0vzPZvHbX3b0d/TA/fpF7AKm8r/0r2xjFGCbq1pU4n7piuNK6/tgdmXTNv4rJWY4GhlPygZQPkfWCrTFMAlOgqJ1cDsbIk1jJYew+NWVtAxawMUwCGPPFHzu3TddurA7iiROCPpCRvCY3QgY5z99IlZaoh2XKMkLBqvF+RsCCoqB+4Q5E2SzFo07xVkHZi2Kgbt4mP9koAqMe0W482Ycg4F5gE5HFo07U1jbZL8dCXaPNaLIhQUC9ws1jslWKh528HV+AT4RGXeKNWbITxYDdwm1UgFlKgL2CbU+AVYKHnfyNSoBRDMd9gj1FiFNCwL3C3T+IWcoQv/9n1dQTCef6A2fV1BMJ5/oGSVBoro+ZgNnOZoIGpwB5ImK5xZ8GbDawTlqZG5rIWno3aTF1N0KJbwe1nSYSpHfTEFp4Y7inFUQbJX1r5N/RwAqHMEn33oXvYl7/BcG8kgvEdTWZpd4IiEh2p1Mnhi6k0NrF0UXjk2kP9lUGLQP4Xs/olinZNSLs9kXtpKCQWxQ4zS3bDItrZb6V9fih610lyic+gDFpn3GfTXlgpr99FCMWx7iLZ3eo6HbB7E4YqQ5YFaQJXPnB+2bx/bIO6c5U0i2Tj5AapTnIALFunklidgmdSCQ+sUfi+YrZn8Q20ANxldLuwZQ2O3mgROpf//Ov/w+ZCWcf"
 
1
+ window.navigationData = "eJytfdmS3DiS7b/I7mPXbe1S9ZtKKk1lt6pKI+Xtfphuo0EMZCQnGWQMyUgpa2z+/Rq4YnG4H6fmSbKMswAgCGJ1/Md/Pxrst+HRXx6ZbqjK2j7606PytqoPnW0e/eU/1l8fPynqtr0rzK01h+JLZfpHf3p0NsPto788OrTl5WSbof/zrFGk6P97O5zqR396dFc1h0d/ef3s9euXj1//z582/adFb8u2ORRtd7BdUd6alregCKLLs6KszeVgi6EzB9uxBhFW1H5etOehapvi1h6OVXNkxWOwqP6iMFXRD50Z7PGh+Np2dzd1+5X1oCmi08uA9qW+2HNXNQNrleGIXq8cr7Ff+7GQq+ZY9NWxMTX/6LMs0e+1Y9bVf12qQzU8FLemu7f9ID2sLEv0+7E4V43ty646D0XdlqYuTqa7swOfwTxNcnzyuDiUpjD3tjPHsWTmh8L5ZUm02788vy/2WDX5NuPctf9py6Fo7213X1myvo4SBQEG2oyjHYYpwaYb7KEo2+amOl46494txkxgAu1I/9AP9lSYrrytBlsOl84iueSJQBtT16fipu1safqhsM2xamxRt8eqZEwZFtDurLxzdba1Y7aXwf3LODIspP053Fd92/XTOz7V/OJgBsM4MiygFRopN3Yob12dKM307/gH9xPjK3KBNqmta3MyRdmezrV19Y8zpOBAO7S2lEsjfWO/FE8fP33JthCzJ0IHWqaplS6OtrHTe1b0thkqZ1WczPmcaYenRGB8MRVPinPbVyO5rm5s+eAaQPutGqS3SGKKzk+LL6a8G2w/FKf2cKltcdOZk0XbLIwvpuKZe3LdxXQP0+MrTW+LfrgcHoqz7W7a7mSaknm1QQExHc+33NxVw5QV10VhnHMU0evFSnRV2H6z5WV8jJ09t13u6z+bilzR/eVSb/vBDLY4jQ0EV8I0QfR5VdTVvV3f1FN74EwItOjwuuiq/q44mcYcrVNj9BOsqP5j0Id03eNT9cf0mn819R3dW5/dRK7k/vRxYb+Vt6Y52qJqBnucG5jpTWPaY4Eo+j4pyvLbsGmYgzkPXF5zDNHpadE/nL60NdrgZAiiz7PiWLd9bzrmi+KB5D5mWVd/7qw5nMj6XNZVMf0qpaxsm9Keh3xv9dQ2rXuvi7PpTF3benvfSedJr+CZQC/2D9u1hf12tuUwVR7bl+ZM53bxzLKAvuvJNBczPtaha2uuyq12OZL89FwP7M+u/fzheKkOY1eQfJ0crohwUl4O9tRmHufSajM1x7G3TwpWh7507Z3tRNERBUouL7Ikur7wmKxr3iXJ8ROAyfltqiQbtL+YvBvvDr0kPKFYyaDqWfchzb/v3Hht4hYeCniR76zrGBs3pqPr+CwaIoE3tmr6wdT1VKKmORS9HS5nziLHAYaY/3WpyrtpYFyM7yLnQ8CBMWXZdmPH1TUubElFUGDwuHXRXJ+GFU/AwEhx7pptIwCkEjE0YHjoBnpt4wY5nT1WYy8n80Va/HIcZJxoT+e2M3VR9a1Xd9x07g/TdO65s/du2MUnQacEDB79CRPGOEIC48HaPIxtdX9um776UtXVULH1JssBhoAHe7bNwTblQ1E1brZrHMWOU0KcI0sExnzuq22/DW6K7WyOUv2hCcCQbnycQHZCJDB+O1++1FVZmLPr693YzmbGqIsBzQCGakFXt7i5NGV2PmbxypKAERv9mmK+MhsY0K3dH3OuOLMQCYzlgtGlIJ6igeHaNK4TpAMcMBY7266v+sFVluIyyE1BjgIMxtbuHPKwSTwwEptes3pMn+1YhwQsyj/3KmBf3toTvSi4GBBw0eLFNqgHHFK0aPByK1fAIEWLBq/mWTpAPYKK0vMUC6AcIkXhH4u++mOc7ZWlY6wk/mx9I2XxBCuKP1nGHpg+ARctnhZlXbk6XLnpd6dnpLc3yxHNns1Ebo5+MYmxovjzmbDUaU48xoriL2bCWKU55QAoyr6c0a4+c6o+ThR9tZTcWJM52RApCr+e4We30mpqTjmCitI/zvi1AnPiCViSf/646N34pLRTV5cRj6Gi9JMVDy+eLlYCVbR+6rpqzdJ5nqS4F5cmiDbP5sYEskjAovzz4t7U1cHAuSAJos0LN0X7xS1DABYJWJR/OS2bQeoxVhR/Na7/HtqvWAERcNHidTKm5xxStGjwY7AMxKY/gkrSL6ilVDc236oJ4wawxQQ8GSu9WyE5cDt+FkcCLlo8XVLpddA5Dwovmjwrzk1dlKYuL7VYbglYlH/uLz5y0gFQlN3WNL0JsNx2ssUiSxLtXhZujX7q225VhvOiGaLRq+LG9MMPN2331XSuppyAp5IliXavg2Er5xEiReF5PIw/G5Ig2bx8XJSd6W+LzpbuC8p1LhOsKP7EzdLXP7jn6FbHqqHt+ELKMESjp+Oya3dv6mK47drBbTJifUiCaPNsGYrk1tUX+QAoyj5f0PDDzlFEK2907Abipqt69s2gCaLNyyV50w4Jrl1PsKL4K2QHwqKegEX5eZx87tqbKrPqv4hHUFH6xwkPfWFTsCT/6vG2OWnoTHnHvwMUXLR4su15GT/3pjH1w1CVXDHlSaLd061PNklg3w6WJ5o+8/cwFSc7dEL+SIJo83zsqFW9Kwiw95DliGYvinlMOVVWt12t76FawjNF45fFrTXDyZyxqkLARYtX8maWRf6VbhvLq9fLiAZ2oBmi0Y/+6MztHznZgZ+rzVEkq9ePXb/KvYqQDQUXLZ4UZdf2/Q/lZdpfPa7cduz0WJYjmj1148Jpx7q05pRgRfFnhe26tituTXMQ+hQJVhR/HqwbSHMsFFy0eOF2RLtm6VAM7Zl/+VKwKP+yKC/90J7I7W+cFUsUbV8tbL9A3MjENgc2hyxRtH29sKMPM2uZJYl2PxanSz1UP8wb8OZ+GL8WlSdJdj8+Lkz1w7n9ajs3wKa2UTK+AFtMgD8RDy70Zzmi2dPxVEBRtnU9z+wtZxQ4uzxLNHw2nr/AXo8ULMo/9/vpB3CMzbBEwxeuD1A1ri2974tlb3Tn3mWugrI8YDdXm2nC2kxrRe/7KmvT95k9YW/GB/uT6ema0Lqel6MXG1AqrAn5dp1F/jzNL0L6CQs166zOZsVjBh+79hs9WxBLj0hM9PM4C65Jd8DATP6+tsEao4Qlmf00z5S9bU8n0xwwL5qEWn1wE+Qfu+reDODDZ5g603GnzR5Pn4ha/joP7nR+EQs1+zQOIHVWAQc1+n9DlZkBTw1GrCjcWXPnNnRoW548Ebb8t3EUpLQLSLCVsjZkaLCdqj6QJNgKqhEBWJZ2m9Lf5Df7B8oeFhMGvpobUJJ8a8pbixTBBhQlxxXwqUGXRD0oJvszt4UiFv4Z3EMxod9nN1DEuu+RHRQT9FNu+0Ss+QnYPzEhP+c3T8Sin6HdE2/b+nJSf7EzLNnMTdnozUgWYNYPpoFa/QArCnct1HCsOEnw3eV0xloMDymJLvVf+2nK8nBDtGNMMFATTT+W5KBGyIMOsKiw9i3I8iTDscHS1gKaBFqhzz+GQ/KaJ58SIAvto6FJktUv1ij72QQDMdH0pxI8YoC8IytOFKyOt7YfPo5rIcryYagqW1WJZYkqS6gME4JkcTWvwSPqAVYS/lDdW9W4OyUgFvrxdoaFmynG2TQJsdLVa4KBmGhqcYJHDJBateJEwfaI9YE2ICB5tB1YAD5WFm7vLmco+xtSEl2eMFYKERoVf1/VFhhDxnBYvq0P0CA1JaAWSKkHWFT4H101oCN3kiMbfXvXma+Op3v/80SFpaY1yNEUdthjCuGivD213QP4hHwsJrxM/WkMIg5m5NpEjYmHlwx+a4fqpirHfihmQTA0JrpCY5ga019sfUYb9ixPY4g/sQxLMvs4bQHSDtNyNNBOM4dMUUAbXWtHk0ArTStHUUAbpHXzoaIsHxTMV8Wjf3lQ5RPIEhWWqieRoQF2bpMJ0N/wkKjoMu1/NU4NInkgaVo7qGpRHNDords8ZXWZCjkqI0V2PAJosQxZdbmJWUozRY5UQ+qZ86E96rLjEXALRSYWNCj+qzX9pVNWsIiks1LkxWfAJq4Lps2Oz1EZqTKzEkALv3OiyxHF3GGqyF1CA+3mz64uexFJZ6XIlLJP4CifbGmbQZedkKMyUmTGI6AWVX+nzInHUJhocrHAQfnP8xlJXT5iltJMkZ+AgtrYvlc3CRFJZ6XJkMdATcYzpsrsBByVkSYzGwG1cIeNlVnxKRobTUZWPGzQduaozklA0lmpcrMxYJNpX682QyFLaabKkkcRbeZzapL0DEPlPld/YE8hxosGXVXaX+0ArgPHcEl++rJhEz4BFhPWzZmRHMwIn7ZK8LLBjduhjzxdHyrLuuE/mmYPiwkDMwUbEJPESmBFYqKatQiCIZpU/Z12qpHkIEaaScYEjxjoJrcIBmKimc5K8IiBZl9LgkcMoIqKdoYdULtNhuRIRkt3VveQMyzUTPOwSQ5qhDwTVYd+7ixjLUcIBqV1Hy+aBFrhn6+UIFqMu2O1jWCGhZlpGkKCgZlomhGCgZlo3/wMSzRzYwywAnhQSFZZjQkKZKOowhFclh+HLKi4DwaltUVEkUArTTHFBNliGgip3/UcDzdEN8ISDNRE+V2kWaiZ6rtIcVAjVStGcVAj6AOsGUkvYHUTmeOJhg9NqawEKQMxUT38GI8YQM9iwcmCLvwEJrkiJdHr6qSYdYjQkvg/xiBNqk21FAWz0W+szfI0horNtTkaZqd7I0gOZqR5KwgGZqJpDgkGZoK8Kx4SE9U2gxkWbebHLVjitWdiDpjDwT/Onk3FIlNEBCm35nAIjxlBDiEF8PAOtEAGHh5Q36YVIPENDmj7Yw1I3Scg+kEvAHMIKICH/2pBDj5B0ndXmtppC0z+LVzFfbSofGvLO1zZQ4vK7elUjUd4x+/BEj0WMKGJoN94g7L96ZKPjhEbrQzMYd1YhRqsBEz/rVv6qdXlFdFAr7rt7UfbZKOnUkYeB3TprHuQ4+om7OJxVC5De/7Q9khdJlgap2tzZ6fTVjqvjYe5zdtCNJnyKGqPt20PZyiiqbx0RReQdvjsyNVGxPymujruTILbHp+DuVx3pnLh7VyNRV18jt5FU3QxT+fm3gytk+PoXfbkaeGJbl7LNc7bAUYxRfI4uKP+R7e03PRfmWmx1SEiIPo/u3CKmPIIRTT/mot3nEj+FQh07HCfbNl2wEdywyKq1+ZL5jKBRHSEQpruv5ik/SbWsnFL/DDuXZBFPTCm++8X0wzVALRjIV5SP9pBN9KKCIj+8djZoxns4bozudsnE4+IhPhM3UbwCUQEQH+ZK79ewvBDJgkLccI7tD4aUIbHFRsWUR07oHC5b3BEe4xdA6Z4wkKqLkgNKOqgmOYAtSgbFlB9B32vZiCiZ2/MpVYVa0jReMCFHDAAB+3sTUIBPFSzNyEeUP/gLqUZ0CFYRAD0vdO676pp9+LHpsa6WSx9t/dH27lda4aJCCanYBNB0lE1l8H2n6umtH7xTcM+oI8iayCpyF2OkVgBl2Mc7fCb/aZqxz08oP575074t20+FJqvvaIB5XmGQlHlAwbiMG9MHWeq7PzkMCeKqXB8216aYTzxv8M0Jit810ADO2wjrsL155sbOxYU/s2nqRpPd2+hMoczR+ny8Pu97WoDDOYzRI1fP1QnM+yqqxFX4TpHJvJaWM2nQVT53pQoPxSglj5V31Eou0viu7P/vXke59h0AxBeYm8a9vRaEKH/hfR85xPKy+1N257mgxLY66//DqT0vd5uYN0P5qRrr2kJRRqumnvbD/agrps+cZffJXPDl2x4ka/78ngf7L1lthhQVhNF4eHHStpRh1P6Pu89bcx3fff+Vz54/wtfOl9C/Q7H5H2++95fSkDhP68o7enphVS9p66GLySNz47KrK/BW43TGs00hdc/TOVuRdnTQoRUwPOT+aoZXG9wRFuxYyeAI9qXxt0SetXctJj4hgfU110MitF7xEFcpnMh78yAFZCHR9Q1C4AhHlLX7JiKCIi+csdUQtF4DGa4YPU/pCAe40VcmPYIBTR1nxDN9+K6HczYMo5rFtiMYcRBXeZmUWsU0AAv3a64iCDp35r+t1Y5z5dyIBd1i0SxAKdx+RFe2okIkn493rk3TTp+hHZ8xQytw+9c7IOsy+9A7IOZczPY7ucGqMAhXqeuyoXHwVyWJduPXXvsLLLJi+aBbvbGnSMaTAfUr4Si9tAUXUQDvZaJnzf3pqqxbRs55l5HVSZJNub8rm3WI3Son8/Ru2hyFvNwN3deT+Pi8Dp1bT4WDu4yfbc0HhND66DNycbCnMBdXx4Y1P2GbPbcsJhqMK+GygekHT6aR5AQMb+rQ636Qi94nbomIz4Hc/HmTFATj6L20GQmomFe3mZn9beG4u531WQ1x1e5T9V3b64j9vc478g5oQCmAAi7HFvi8ZcnAnsJXCSO3AO3ITUlteAx9WVQ8/M9NBtHkHb4aLKTEHV+mnbX5+hd9mRK1wajo1UfrVHW9kZD1h4nVZklTI2jrn5vFLWHPkvamj2SNL3sjaF10GdG19fWnbJJOXoXfY42nsZN76NwWGOIuBMtsEvA2uOkylPCBB0fmhL2eGhKXFWV+hmPqW9n2FH9jYE56MajmrHoGlfiXFtkbYNiaZw0T0E72p3w2pm3kIU4aTeQpxzERbWFPCIg+lNMeUx6wiKqmmXKEI+o6xbKYgbkoFwqSzmIi24hJWZIDu297brqYHWHsygW6qR9I2ge6qZ6MwgS6qOpyykHddHVaYoFOynrNs1D3XR1nGJJTp01B7QV27Cy6qm9t7juhhaVL81V82tb3sFLgjFDcuit6cpbNO0+WlbGj3318Gm6Hj9N16On6Xo7TDd8QpoTFNBU7S/pVftLeuX+kl61v6S/vQzYtO2CFBWH9ry0CYCqh5aU76d+MVAGC1JS/Gqq4X3bfbLmAKTVR8vK3Qne7eWBRV0X3ht9hT0wresHzqrcHVU3ZuyAU5GzkiA9wgBz1SsyTCmrGZp/H9B+c18FSsg4G+ca2s6UcKYDkmgzbyfQmEQU0WKNf4Q/vIiitdA+LoYuWS+zf67hq/qhKnt37jE/Jbq5Zpii4baLQfHQCJZolOwkUBYrLwDbw7UmYigN9mZuR5XZqPjzizmwCT/NTDhAk8wreke9z1AlyygAGVwtSN4uM2UVETXERHiR0PDsJiS9jTajrIBoP3bM0drjoUXhrhqq0tTjLhJtlnJc2XQ+PQuZzFhE9JexrwaqTmBJ1u3fUbRBPlyS/sWa4WTO+taBJop2/jYYRZZInsoMbV5TkspmR0EydMn6appxA1xmJCj41tT1F1Pe5YcnifJKAS0+ms6cFPoTHhQXpo4ScWzSaAFL49dUHhzDXmXGI5/ar6gZzcaMq+EBbRFDgiwfhtViZ0J8k5QmW0VjBLTsUppo9VN1QHMyQ2VJ8QS8L4qedb+KOsFgmaQs3AguGJ8AyLfcYmag2wILmVdvvQjJeIuUsgAjh0ZLZUPLwl4kZkUOEpZstFQC9no838MniPLztlJFnyCmiBbvLqezNH/uyXtwSFq84zPSRm/3vPqZD8Hoyf4MBV+8WtbOIMkZC4uq+g4JCbbB63rIgA3wPoRuKfLq52+2vIxdJrwuxhzR5D0bKdJTfo8Eh5xQqicbMjAD/Jl6cEwaf5qK1d6reRAEfk83tCj8oc2va3mKH1pxTcth4F7dgkVEuWWyUBJYJbtarlVxDePvZ1fToXpA0GCra9MdLfT2hQzZYFxU0XwOQgZgMNy2B0XzERBE+eam3TMVQ/JEMx+MP5GUpTLib7HJ+EAX2lytoQnRvl5AEOU/mq63b7qjoq8XUXCLT7a/1NDjiCiIhTuSAUo7KCqJlroHR6Wn2w0U4yeKh5otM116u4gpG043waO9eg8OSy9jPE2TmOOiptPgZodjSETtrpzOval3GMZU1PJDe9zh5rFQo1+t6S/dnrKMmLih9gNKElE7v5HfYUrRUev5nd3hGjFRw0/Whe3Y4RcSYbuqv9tj5tFQq2XWc4ddTIUtp41aexxDJmw47t3a4xcQYTu3SWyPm8/DzcY7e3fZBUzccJqV3+UYUmXLOS7YHL7tgzkcsOETSYTtPld/2DfXnxR9RYqosntffbOHLSjgPmtSRJWMv9m6fthn7lFly/HSUd3kbswBTaZXGO0LhhTRYmrd4WGRBwek3U2mynF9QgJt8BGkj5fFuePZvihwNHsEzRsA51qHSocsyEg1ZxcQMHm3juAGfrD8QsDlNdUm4kAmeCuxoSHhT/Y/pyvh8YE0QYOs8OlN/JTJBNW0OgEBkgfOP0b6+PnHCP5+h8V7rclH81C3Jh+GLOs0E2W7i2bZYEMjwmIgz1AZjeO5YD+hS04+XhSPQusteyDAGptna42nTYT7bFeu1nSfHWSkH9poxzRz3t2eRDQfAQM0eDdAFXoFg7LLrI1K3iOBNqqSwQrlDy6uSaD5BxDNZIa9NXV5qc0w99XfXH/CLVLuPlN0CjNL3mcbDVZ2pyDS2ZeYcfCyOwkjGzfGe5YRBbTYUZe0Veg7H+H3PLldD0z/nKbOnqoQV4rKQvf6bRyVye4nRdJV1son5ZFkG+1Em26GbUTjwxwPDkiPc2/r9weuBARPbTb1m2ombjXjuJL1tnysbM4TCped0H4/22af4cRUG64dxj2eKxm1haedfDwgjm/Thjdor7GJVB+/mATbfGw+aAw+Nh9gaXxOImTABviUhC5IxAq/rsq7KU3TvJjGKubuMFU2Pln6HmtFA0Rzd5heYaeaMswdhppWj+buMFW2fFn6Duv5zph9xjNZtL3uTFW73snQnlW7S0gibHdt7uwuu4Ao2s3BxTSNc0QBLaZCVxjMBFAebzs1QW8WsPoLQPEAszVuBd71TEiSjQsaqT9zR7AkIy9UtOKMAsFSGKFnFmOKwkJfdnmyaGv73hwtbOTBZemhq0qXHqSaeWhJeN5mgz4JHw5KBxG5lVtuJQlFEuBz6wlHbbI/k/pD6wEZfm0JFmgURRnfl1VGRJUM7TP1WTuMviezu5+s+ig5yQPN9K0lTRTttvjxmpylLIXRjrxlyaLtHDJ1Ca2jyWSGilou8WfVhiFRsht3IuAmPhyRRr9HKxYRXTceKF/kLBcx1Vc7giUZrcMytNxCAio/ghVPneShZsrTshQNtdI/owxTNOSvKfD0oRsKJtT/eQILFk9Ayae45FNMcp0PUr58DBs0dhNCmoqUshRGO7OXUEHLsVcBrknEFMzC7eBU1DAHR2uZujlJWZiR28Wj9vFJuM2uxx8TMTs3B6jOlU/CbXZW65SKWWqb/oSE2awfwV2ZI9mg8UNTql7ahYDLjy3KvnxRbNzYPfPdvjFZtJ2n7OBuj49HxXf0DmimaPjQlHBOFiwiuiMHKUsycnP1aOpXrCiazMoj6glJb6OswrwAar8tBigsN5LeZmcuaQHJft4MbMHt9D4clK7aZs/BfoYtGYe3vSi+WTQRtVPbaOT1rQXJQ83aszo/Pom28WN7Dw9nLqx32/zGhZJx7GLDSbliK/ekBdRnLMzYKKcKMDZFDduic0vb+WcHkgR6rXHnNF4xCfNai0JhFXMwpyU0l8IoomA+3jy9wiplqdymmWO9X8ADHedYvWPcXoVhSlP5uW6m3s5jYW7LCGGdvFB45rg6Z2VGCZrOT/lOEDTQb5s10dglLI2btixjksZrrnFqu5CHOfpdV4UhQdP5uU7kDj+PJvpdyjs7yF/3DScpjoEx31e1fT/fMsILJ3BY/2/2Qe5JxGhZXTzGPeuiR7eXWDLTqR9EdcGKymN4deEGpEnXQ2KqUrFiFzTNMGZu1FeT50QXvfzUe6AnTrsves8wvWeo3nNM7zmq9wLTe4HqvcT0XqJ6rzC9V6jea0zvNar3I6b3I6onNQ6zntw2zHpfML0vsp6bcIC+GAFU1O224O6CrIeUVN9V/dkM5S2vuKBQNamxWXBya/Oua8/vq4650XwSXGCwnpjEBSincYr2eyU87AUlq11OktLlJKrMsXDlXoWPlFTHmKzYZzSAQrpyUleYqAd1e9DezoKTqsyCk2vMqih8RFdF8Sv6b3aK9sREVxgVN5yoWLdf3DKs3LPxkeJ25GW/0If2WJUfu+miBNvdV8yBu9GFY4qu8p73yQPf4u62LuvzkGGJbst5dbFP7CNRVXygQDE0LtBwgSCIHlOcJeEWlkndh4q65OlswYDkgE4KA5WucJDB14VPf4WnDSXtCA7oT2uTy1svnJJYXCgS7LUd4wF9NgJwDMOtCOhbjCxPcvybfRAqkkMgKtJ3z2Hkb96H9ig3XzNIPjgxBQKXuww+Uj68MEZJlVPpAWVNFwkVkVxwsuJ4HONTyxwDnCVXIKh53ba1GzhAugtY0vaXKeVyiNEadX4ZMJGHVv9+kzrjv8l9cSQk9qilCIa9rJ3YeynLPlKxDX06m3M9rUly8hRF9GnqaTwtaC8wcQPzGAdRLuANJyu6sIRy+7LhZMV+cFfKNubc37bCFyYCIxu4gdzPKETtV3OWxX41Z0QLKMUZpdodL0uuUFF3inQGFOEGRDdty6I+UlS1pitvP9vBnTIWvu8hVlZeb7uXZFegrImNSj/Do9Jt966guOLQPbHIpEaIxZT9Tw40K5ilgZsbXUFeX85S9yBGK/ZsSvtgfH0PLzu48YfcWmw4eWukGZAXcIHJeuMoBlFcgaCmNH24wtDtoNMIV/6Ap3jUYQ6XaE0vNcYUA3YZwwxqTDYC7AF0RkIsruwmlMA3huSgTkil3JCoKvA2ekjNVuWL9PUKsMj2YbjGB1hxNyoyq3SNzSfNMGlAPcPkMfUMfDu0+SD2vqIDgprIjNG15tbe690zvxxT6TqFY99h6hNlT/H22NkCvTj2etpbAjznDShq+ndfAsoxXNQXb7ecdNGLLa/BCyFDVbBuxvc6YlUkwxLd+EshJ23oPshr5E5FTw8sjV1rGzmWwk3xdtIk2as9AlV9Rolqy+Qie0ZqkvShKl0guTFc1sfudZrVVXc5RXAk9QlB9EhuAwRsSI7oJF2QN2mDd+NdI1e8zYr47W4+FiiHCA2rx/e/KawoKuob3gKHm6Y81DG+Bg73pJioq3cdHG4YkVCv6DY43I8g4p7KZiHLQx2p6+Bw3xwbdY+uhcONCSLqGV4Nh1umPNjRux9O4RexULf4ejjckWLCruF1CgrTlAh7BtfEKSwTHuzoB7JWGMY03C+4K07jmBBxz/C2OI1pyhRdvcu5AKcIDai7hSegK7EBFZpQgn2wrM1d3TUrArd2jSBx/sSBgNkT4MamTQ8cO81v/ZuDOQ/M1YKTbghGtRX1d08bJNxMMgtDl5LMMPF5TTDgieG7ma41u5mux3YMfGYeFNPVPC91e+rHYocMQjigL4RvX3SxyO0rUK4TMxCpFVio81AXrBk7923leSpHxYxIjgb6QWWniXI8Yac9Ibysj8RU5VWJDUcr/is4eu94//znwQzmn/88z9c6mvoH0x37H8zlwMS5cJyCpEg5sd/MaVqkpU78P35SHKeF+6IfTDfQgdBnjSJFS+6PnxY34+mGL/M0Nysfg0X1Z8WlOdjOtWOHMVVjx5Rc8VlNMhzR63lRV/e2GDpzyHy3VosQKiq/KDrXkTiZxhztKRMyZhVP0KL+y8JURXseqlP1RzYIyKqfoEX9V0Vdn6CCCZC5N8bby/nhV/JZur9LqTqb8s4cbZ+p+Ddd2wx/7qw50K/4Qi9GYDEBJc9jZ863iOgIBEVPbXNsEdERCIq2dW1OBlGdkKDsuWrs0COyExKU7auDvavKO0R4wcLS49uPKY9QVtivvefpe5ypgGVt+t6S1XsmFjNEysLNfEKC1VpBktoaXIaV21ByOfRTT6jKvovm3BVPHz8lT9Ju5GKBSTmYceTB11ROPPh6sKXDkedyPbkFJj4t+8XhyG6pJ7fAQDkpswtMkvtP0yByC0xsuwz0KBaY2GqVA1J2C0yUu3ddV0ueKfHlZphc012X0HttTq2bDOz/PP45ZD/lAjCFsy1zKzCrbIhQ8MlTP2fLxbZrUMY4jNr2/nq6BCNK9YuXsgkdbQw1zEcbI8wzQZFpLyYUcihtDgd6b8rahs6yETDUfPk8lMxtKyBEuU0FsSy5Mk9oZtflY0FqsorQy01VxXL0TAohmJ9HSSQzw3BKlBmEx7L0+JQQzY9OA8k3N4Ptfm4OSP2MoGztrKtjc92mG4mTlIZALqVrfDG5mYig7CsaYdGGgaFxdj8lI8x701XuQo1F+SdyWPnsKSGSDfqXJDfDYFNqb9yhCzeCBioHgebEv9hjld4ZH1cOH8XUjBF2XfkdY1LJQRgZYqNa8mzoPWrhw1kwwn0raRGyRPZRLUzxzYiQClFtJpSvxUaTq1qMhYTDHcGjUqyXbgV++vjHV09ekE83ipqbTyURMjeTRMXrnKHwNm4zJFe33e9sxRbiUIaFCsSfpIpXiD9JePBxJ3MeXPd1Q3DdVyl+ZZpUPm5lLqXZuJWpARuvMqfPxatMLaQ4lYJLJk5l1oeJT5l14uJTEkZSXErBhwwxmLXJxhbMucjxKFMvLA6l5AhmTIw/KfmAdVuMO5n1YeJOEjZCvEneBS0zPs4k75GLM5mz4eJL5pzY+JKpkRhXUvIh40rmfbLxJFOfMd5i/qs3/sx89Er3+3z5Z7576aOYHub0PuLTHSSe+8aTBLDnJnIF4yRKpf/4ctEpqedFR6dM1egxY6pY3tryTn6EHop7hGPDMH8yxOeXgNkyTNDok2OJrCUZsDMo6mygTuLRjVip7+qhuKSVY0aS+TfmAdIE5lnOjLX/KGqvSFGUGEvSmpkRJSEZvZ+ScASX5b1KJGp7WFm4s+55RJeoZYQ9LCo8tGfXGQWlZzQoPn5nxh4oJr/hRQOvHy1pe1CN7Nu2F5MdwVF5rEwCsE5akfaNwDXbdBzSsKXLxh8lvikj2AtOIDYePlYsC78/JQn7WJUwUsYxHjZwbwIq7rAqYU3KFzxbOcY9hsyc7ILgOope0zVuXGQSGEO5tHXVUJWmZq7ISb+wOQ7bFehaZuLT/cpkng7HG7xd2TC8RD+ia5ufm6F7YPM4Y6Q8/TJ26QSlCcRJvWsb4qagRMyHsXKX0zlf2u5XprQPl9P5zdE2w5um/+pP6cUVLQIy1cwhx+rCi40QQeavQWwKSuWvSTCKl8//NE3BjTsZzp0tjdvkFyl/smXbMR2fDSMk8doVNq8zQiQZdvFiQTAi9lQNg+2yi/HL76HE88z+lHWu9fPliwv1lK9fq27CYWqdmZf/FOohg9FetlL6c0m4D8PmPLcVK4VVQuIc1ll6XD+icK1A29h1WQ82IFiChztcrtP3GIL2vEitUg84jL51Xwdc2odzqq4F/HkiIaoenFP9Vg0K0Q3NaN5Wx1vbD1P3GC8Hisa4VPOKA24QMRjtk/n2rjNf3Wl+XD4lMQ7nbfiDO6Qk2UH7FCga57LFncSrUUriHLr22Nm+X9oOhQ3NBLymN13vFPAYH7dDHX8kHprR7Odv0Ljqi4tTNMBF9+YRLM7j9jK4twgv/4jBaY9jH31dInmij1Yf1lU+44QkOrgvqTb1HkfUn6YjtFkIWJxHEMJN4ULxOJ+HppxnIxUmCUlw0EnLmvfrBba4csJh9L8Gl9XiHiRP9MFr6Vewdf663hqrTbvHSfT9jdDpVTX+jAV9RU06W5FG9oqTRwf1ehaKCCG3Uk0g2lZgMX7rh49dIBsPWj0QM26dUP9+MWMRSWoLjhHMXKXjPw7mCp30mRwtMzA/Wm5MfrQDtq86AgqSx2Nnj25S47ozB24dkgAL0tOqlPBgIyAvuXxg3YbJmzA8G6GboAVxeWnMR/Fi4rLuhhGExiUtsQw3mCAX31lIaVFXFqZC4dosqZMuzhIy/FbbDcMLvWNntmeAIGFvzKWGiiiEgrJigQVIXvTnmxs7zZG5Z+4mlljlFC7Ig8ctEigvCx23CHG84AczzhcJa7gRkJf8dRunv6umEA/jDQfcyg5L22P30XYu0Iw58nVaIgvWVXMZbP+5akrrl8+0ZMzMZ8tcwbg9CPlqD0Laf7PfoDbWw/GCv3cH2/3Utnes3IrixZb+u1wvA6QgOscvmPYuzw+AF6cYmMnb9tKMY2aNT0zCrJYarHGKOJhR2AhCPiEFtGmGrgLzMWNx4Yff721XG2bxPUMALfqhOplBVbsiDmb0yzSb6zVgSCMrsr/DHGxyQQ1VQnZkfU9+d2fyO3I2zhNjPWueusNW8/lGBL4vCTuLPi+zIzma15oi7rDE29qUtsPOjfX6wZywBpKmYrZXzb3tB7cfGaxaPkFrcWm0Hpd4U1DOZLxyDKsSExST9RpGTa1LaWo7zeu+9wvyXZ+O7/tm+Gz43YpJaivde0URMct576SmlxNSVDZYnVzAoLSi+qnq3FZXUO0Zjsn/w1QuNJnmZQ0pgo2rdp9Lw+1vCmC83CfzFRn+bTBBDgjbEMAEuekCuqvmpuX1NhwvuG6XB4aUEVYQpu6To0Rz18klgshG0xCn3XI3spG4GBFQSDgYFyOBgrLRZUqcLHGXUiL7cPrSCvVghPAyWLMOtuHX7TAfUOTnjjwcItj2Ayy6YgHhuXVEtQM4L4/FQomAjOS/1e0Xl7n8aSgfIa1B3Zr+txacoUqxTDJHMNxSUWhefFx0EhcMIiAj+Ys1zNqt+5VZtXQ/n8wZD41AE7i92MHohEmoD+NS7OOALeMkHk6vFIYiBcPSijJnaJzdFb3Smuhf5RdaCUEiXten9qskT7N4s3CdNvy4Ey4pnJX/qTpIkjOElwkjsghFkaIF8TCoCCWYhhWJRKjDw6lQ9ghxJJbm0m/Br3L5StrvJZYG8ArHUDaB7nBH0rqmkh5MlEsvr6L16HurIsHcmmQqyS1JRqLkimSqmF2QjOTmRl6oyxuKFfvQHjmVD238qU/o0mGlFSMJHfl3aUKwIsv1Z+5x/34ewoCrqSIB5+Uzl6URysxNaZFoc9NqjreReNYgue6MU0/AfNrjPUtxt4HeshT0GBZIPnyCj5DarWrGfh7s+VdmJBTimP5b5U2oXrfi3AgJZ+Sv1sVe6QsQANmnEhxrBr56FB4xWDptuEXE4E2oG/II5dz1eBm5+AY6RDvmIEbhrXOAS0hALOJL5gCTmILYeFfLAQ4eGhGP7pEDDCIGZoK22yQBsaAuiQOMKBpiF10NBzhFDMQkvAwO8AgJkIV3/xti4MER+fiyN8AipkA24dVKiEvIgEyCC90Qj4AAWfhXDiEOPh4zCG5sgywCBmYS3tAGuYQU3mZemPhc/WHfXH/6aDpzYvtUJAG2eF99s4dt/U5nR5Jh67/Zun7QGXoU3ma8l2ia2cj0+nyIOFydwNhYOsYCCZ3eJamTE0JZWe+OP07Sgwly7gY+cNiTgHnpqr+bI5nOz5nVTtCi+FsXe+xNd+TT7ANFSXmsnVtko8SQZx8ARcm/ryeZJM0NqRB9r5B9rxFOQghJ6nRAociCWsckhHPLmLTcp/BUUlbvU3o2KRKMlg+m0GJCdchxNEY6C1Ec76NoOieT+buBfXQrCJBaB/uIpAcGpKUCxcpxXOt9a+ryUpsh+RwHXzASK37KSNab60982mmOPitRj0FtGvH1CRh7EGrbkQWYAc9L9ZgUT0fzUHY+i72PQFXyugKPP8VEgZPf4VyBT2CowFconEx1gZM02A4scA/MS6PDN3zcNg+/iPYzfI4RTH6W3t2zfEo3nJDQaQT3sfnA660wSO6T7S81u1IVIiFRuXfK7f3JiF5X5V2c2ugZxUDgKcWUqWuPJD3mKDOxBm/Xea00rV20PwfyIjbpiEZXfDi+DENp4o5eanMzcZRGRDxexCsTl1e0m7eC6sxmEmsVBvoE1jNIAmQxReRUWAQE1mLa6DXlmm1VAyAgKTdY+T1mtCDcvFJ4zqCuvuRXI+vqC7MQWVf9YJvt0pb8Il+MZNb3YujvDbeZnkLL4nOgQVF2xsGCUFo9rCi8xEr4OIeqksRjvGywBSgUtTeoRhYpkwguyydXX4kOCWOHCZQVkiWavfPiLEoWPlYljKQ/xkMGH4IuTl74Q9KtYQTR1C5YSHhqHRHZCakQRdO7oUVxIcSuB5KlvnEB2DeMKJTZ/korMptgJWmkOBOCaLFsvZOUFxwsiCTXx4rC3mEtSdeDamSRJEdwUd7bGQO3zRRnlxGSoRwPNZzqmjZvEWunmSJ/BFM23QJ8ii4bVJR16xuSnsNAQkgRLDhR8LMfRVNSDcA6aSTRCQG2QJozH6sS1iQdbtqkMyg+ChRD+04hWikOFUbCAE2wSrhBNbJ4whXVb40eiilDfb8NiicZ7v9h16+kWJUwnu4NDxrg0phoEDZVFA7QSnEo5QlDNnloSlH2oSkhISiNM04UpLYr0JK57QqEKDZ2Acct/wjCtmKiCxoUR0pUMRiaoOhMSIgWxNG4eilWEIYi60VAQXLaacurTRhBCDlcH+IEQez0d4yURMHz3ylWEMZOA8dIRjT8FMYzqennL5hKHe/AgA9QEmhuijc4sZQkLD6vFKarPeaPmcw/SqtiH9r27sJcXzT9ziRiOXWUl1gQgMj7qrbcZd4xLpQMr/ResW194K8IT5GI7m9BLF2/6H2EVP4L9h9dxYbcDnFsURJTE6laZlIiJwUcnCTQXL334NK55xgKyuKvbJ7EWk1HN/KvoAcQq0H04UgeGPHReJYKpCMtWogeYzGCbw7mHNTP6A2iwOxLNBK4olt+x0qOb983jJhhB4Iy6wH5jPa9OVqxBnowvs6NuE9tnWt7NoBcciP0um1rd5sfq7eAZM3htj2gge8pNPuEhq4q3RvKrQd7KK4k6QOqcQrzx1KDlPkw+R2k0KB4/o2JUdKT8vH82xMjwaRGVT6XVqrKJ4lt723XVQeLRfOn0EzfcIGjAw0aDxhAAw4CDEgj44UUCwhj4wYKjYiD4wcaDxhg4wgKzYifTdfb8IRHrLhCGJl5MSD/3s0A5nWbEflGwQNIr9gMlfpiPoxrXqmlHDAmgEQFbeOpM86HmjgThPWZSXmwodj5JtCAeLQQpcsSQ4at0Wfko5XiezK160nBQaJIPGCAj2doAmdxnrZ7v6tubphWbQNxzeOEum7HHaV8XM8UKwv/3dQXZurSR3GtL7WeGvbzs+uoYQ/fgyEPP0Wzj36DT/3a64dzpudPQsVWfyMpqleWJGQljYCRlDgd/SIp8SCQRTJeS76kNIH7sorxNeiU87E1yGxMJ3fRPARoOQO5uB1k6rmYHWTSlwNraOIjvJz8fEwQMgN8PBAyCx/aI5r6DSonnIwyQqY5G2GETO48pYQmOYTLyc7GLyGTzsYuySTfTZ3gqffQSOLpuCiZtOdjopBJ93sDaAYIjpwNPvYKmRk57gqZpbmbgOYmhMsZyUZ1IfPARnQhkz9FE0BTH6DlxOeixZBp5yLF0El3cQXQhG9YINlkBBo60dnoM2SSl41EaLIjvJz0fHQbMvl8ZBs6C9NJcDgHARzIQO5MOp1+7lg6nfxx+wiceh8NJD4Tj4dOOxOLh066O6IJp9wDAwmnj4nS6c6fFM0kezyviSfchyNJz8QPyiSeiR2USf40XYanP8AjGcjFJsrkgItLFGUhic4SSZLxWGgNF8mHybyH4rI871ZZJuyRsV6Gwo6SgnvvFSYhgbPorDlIG1U2DDOGnj57+ZKdfmfKdALICyYhThTMz4duv0sD4wnJL4xsGDZJNzV74fUMYCQ6e2rvrfzINhT70Fy4JC457nc2Qw7ADeM3BPd2Tqj8Lortd/lZOaS0g8JHcdkLdsQnIsle+IQMvLM+jHtTHY6pzPOvYvFU/Z00rb9ipOR8su4q9qptwHnVLEcywqejCDTb/LWX5uAOVDPrNxuGeZO6S3PV/NqWd+L9CjGSez2nOE7MU98A0oNfusj56rwgmCq9QPIp8hFokg5ShQyB3PMMDmcALx+JRwzAAPIUHJHHK3yGwZn01nTlrfQJ8VFMHZ2HLky1mgBcrZoQ8qc/AsqSTD3N3cdEVNMJyn/+PRCTrN4yDUNvubagB+6e75G753v57vkeuHu+t0Mc156QoQLbxzLQFVo9eoVWD16h1X/XFVr97WXgD3wuCO7V8QLo1fYAfkQZFtuyTLRpaU1ut1I0KK7MRkKRbZiXev1dfKe3M1RwaeDfiHlG5KaFtX0wJq0q5piAWMT3H6QFTd+AkCtsF4UHLg8fLCd2CvCjKpGUItug3/wELEuvPRxVJkgWYPbQlOOLpzOjWKBZUmhpZfJxWIUaz3idLTr4yJPYvtJyb93n2+rGXXvBXxlLwrmvVT0i1us0Rhorn8K5L0z4DUw6LemnL+xFud+BbpkPQ+WEfdUUlptAGPHMl2H5WaxaDih09RaIlFVg+3iM47LYD+15mTVlqoiHYmvGOIHM5XIEsHkcEUj9CICyJPccV4D8JEeo9CxXEJusuNRTHarESZFpI3J+606Kk3M6H8idQjFb0+cCz1NIWN21/ZD4BoS1xz12wmeCxKIOXJXaEKiaOGHh49hvpHdlLTjepxmoySUTIJi7O5coh+A8d/IyJCe5n8VksQAXDJuvh6ZUFFyK5sX7wZ64TLrfmWxeTxckvh38wFB+kXsAqbyv/Uv+GMUYJupWpTgbvGK40rr+0B6ZdM2/islZDjaGCwqBlA+R9YKNPUwCU6ConVwnx8iTWMlhaD/WpnLhFti4MQGM+eIP7bTJ2G0LDyLQE4I+kJG8JrdxBjnP32GWlqiHZcoyQsGq8W5MwIKioH7h/knZLMWjTvFGR9mLYqBu3hZF2SgCox7RXkLZhyDgXmATkcWjTtTGPNkvx0Jdo610siFBQL3CrW+yVYqHnbz9aoBPhEZd4m1lshPFgN3CTWCAWUqAvYJNW4BVgoed/G1WgFEMx32CHVGIU0LAvcK9S4hZyhC//2fV1BMJ5/oDZ9XUEwnn+gZJGHGuj5mA2c5mgganAHkiYrlFLAdsNrBOWpkbmshaenevMXU3QolvB7UZKBKk9wIRWnhjuKcVRBslfWvk3+rBCocwSfd+Cj7GvP4LgnklF8jU1WTWkSMgItmeTq0YLpJCa1deF42Ptjm4Vxm0DOB7PaN7yWTXiLDbF7WTAnFuMew097IzLK6V+Wqq4X3bTZUon/gAxqR9xn2y5sBMf/soRiyO0BfP7lCx+YLZnTDOHrAqSBO48oN3/eK7fSfkdCKUbpl8hNQozSESiEX5TBKz6/NEIvGJPRLPV8zuJLaBHoirlG4HqbSTygMlUv/6n3/9f3EqcvI="
assets/search.js CHANGED
The diff for this file is too large to render. See raw diff
 
classes/types.ActionBase.html CHANGED
The diff for this file is too large to render. See raw diff
 
classes/types.BrokerBase.html CHANGED
The diff for this file is too large to render. See raw diff
 
classes/types.MarkdownFileBase.html CHANGED
@@ -11,7 +11,7 @@
11
  <p>File format: ./dump/markdown/{markdownName}.jsonl
12
  Each line contains: markdownName, data, symbol, strategyName, exchangeName, frameName, signalId, timestamp</p>
13
  <p>Use this adapter for centralized logging and post-processing with JSONL tools.</p>
14
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TMarkdownBase.html" class="tsd-signature-type tsd-kind-type-alias">TMarkdownBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16943">types.d.ts:16943</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MarkdownFileBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MarkdownFileBase.html#_basedir" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_base<wbr/>Dir</span></a>
16
  <a href="types.MarkdownFileBase.html#_filepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a>
17
  <a href="types.MarkdownFileBase.html#_stream" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a>
@@ -22,16 +22,16 @@ Each line contains: markdownName, data, symbol, strategyName, exchangeName, fram
22
  <a href="types.MarkdownFileBase.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormarkdownfilebase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MarkdownFileBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.MarkdownFileBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFileBase</a><a href="#constructormarkdownfilebase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new JSONL markdown adapter instance.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">markdownName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of markdown report (backtest, live, walker, etc.)</p>
25
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.MarkdownFileBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFileBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16956">types.d.ts:16956</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_base<wbr/>Dir</span><a href="#_basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Base directory for all JSONL markdown files</p>
26
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16950">types.d.ts:16950</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_filepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_file<wbr/>Path</span><a href="#_filepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_filePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Absolute path to the JSONL file for this markdown type</p>
27
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16946">types.d.ts:16946</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_stream</span><a href="#_stream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WriteStream</span></div><div class="tsd-comment tsd-typography"><p>WriteStream instance for append-only writes, null until initialized</p>
28
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16948">types.d.ts:16948</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Singleshot initialization function that creates directory and stream.
29
  Protected by singleshot to ensure one-time execution.
30
  Sets up error handler that emits to exitEmitter.</p>
31
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16962">types.d.ts:16962</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="write_safe_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span><a href="#write_safe_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WRITE_SAFE_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">symbol</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Timeout-protected write function with backpressure handling.
32
  Waits for drain event if write buffer is full.
33
  Times out after 15 seconds and returns TIMEOUT_SYMBOL.</p>
34
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16968">types.d.ts:16968</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="markdownname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>markdown<wbr/>Name</span><a href="#markdownname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16944">types.d.ts:16944</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dump" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dump</span><a href="#dump" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dump-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dump</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#dump-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes markdown content to JSONL file with metadata.
35
  Appends a single line with JSON object containing:</p>
36
  <ul>
37
  <li>markdownName: Type of report</li>
@@ -42,10 +42,10 @@ Appends a single line with JSON object containing:</p>
42
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown content to write</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Path and metadata options</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if stream not initialized or write timeout exceeded</p>
45
- </div></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.dump</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16988">types.d.ts:16988</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the JSONL file and write stream.
46
  Safe to call multiple times - singleshot ensures one-time execution.</p>
47
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
48
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16975">types.d.ts:16975</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_base<wbr/>Dir</span></a><a href="#_filepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a><a href="#_stream" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a><a href="#wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#write_safe_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span></a><a href="#markdownname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
49
 
50
  <!-- Yandex.Metrika counter -->
51
  <script type="text/javascript">
 
11
  <p>File format: ./dump/markdown/{markdownName}.jsonl
12
  Each line contains: markdownName, data, symbol, strategyName, exchangeName, frameName, signalId, timestamp</p>
13
  <p>Use this adapter for centralized logging and post-processing with JSONL tools.</p>
14
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TMarkdownBase.html" class="tsd-signature-type tsd-kind-type-alias">TMarkdownBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17477">types.d.ts:17477</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MarkdownFileBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MarkdownFileBase.html#_basedir" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_base<wbr/>Dir</span></a>
16
  <a href="types.MarkdownFileBase.html#_filepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a>
17
  <a href="types.MarkdownFileBase.html#_stream" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a>
 
22
  <a href="types.MarkdownFileBase.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormarkdownfilebase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MarkdownFileBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.MarkdownFileBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFileBase</a><a href="#constructormarkdownfilebase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new JSONL markdown adapter instance.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">markdownName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of markdown report (backtest, live, walker, etc.)</p>
25
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.MarkdownFileBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFileBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17490">types.d.ts:17490</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_base<wbr/>Dir</span><a href="#_basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Base directory for all JSONL markdown files</p>
26
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17484">types.d.ts:17484</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_filepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_file<wbr/>Path</span><a href="#_filepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_filePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Absolute path to the JSONL file for this markdown type</p>
27
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17480">types.d.ts:17480</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_stream</span><a href="#_stream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WriteStream</span></div><div class="tsd-comment tsd-typography"><p>WriteStream instance for append-only writes, null until initialized</p>
28
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17482">types.d.ts:17482</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Singleshot initialization function that creates directory and stream.
29
  Protected by singleshot to ensure one-time execution.
30
  Sets up error handler that emits to exitEmitter.</p>
31
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17496">types.d.ts:17496</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="write_safe_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span><a href="#write_safe_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WRITE_SAFE_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">line</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">symbol</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Timeout-protected write function with backpressure handling.
32
  Waits for drain event if write buffer is full.
33
  Times out after 15 seconds and returns TIMEOUT_SYMBOL.</p>
34
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17502">types.d.ts:17502</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="markdownname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>markdown<wbr/>Name</span><a href="#markdownname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17478">types.d.ts:17478</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dump" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dump</span><a href="#dump" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dump-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dump</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#dump-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes markdown content to JSONL file with metadata.
35
  Appends a single line with JSON object containing:</p>
36
  <ul>
37
  <li>markdownName: Type of report</li>
 
42
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown content to write</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Path and metadata options</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if stream not initialized or write timeout exceeded</p>
45
+ </div></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.dump</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17522">types.d.ts:17522</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the JSONL file and write stream.
46
  Safe to call multiple times - singleshot ensures one-time execution.</p>
47
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
48
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17509">types.d.ts:17509</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_base<wbr/>Dir</span></a><a href="#_filepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a><a href="#_stream" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a><a href="#wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#write_safe_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span></a><a href="#markdownname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
49
 
50
  <!-- Yandex.Metrika counter -->
51
  <script type="text/javascript">
classes/types.MarkdownFolderBase.html CHANGED
@@ -10,22 +10,22 @@
10
  <p>File format: {options.path}/{options.file}
11
  Example: ./dump/backtest/BTCUSDT_my-strategy_binance_2024-Q1_backtest-1736601234567.md</p>
12
  <p>Use this adapter (default) for organized report directories and manual review.</p>
13
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TMarkdownBase.html" class="tsd-signature-type tsd-kind-type-alias">TMarkdownBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17005">types.d.ts:17005</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#markdownname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#dump" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a>
16
  <a href="types.MarkdownFolderBase.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
17
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormarkdownfolderbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MarkdownFolderBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.MarkdownFolderBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFolderBase</a><a href="#constructormarkdownfolderbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new folder-based markdown adapter instance.</p>
18
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">markdownName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of markdown report (backtest, live, walker, etc.)</p>
19
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.MarkdownFolderBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFolderBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17012">types.d.ts:17012</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="markdownname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>markdown<wbr/>Name</span><a href="#markdownname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17006">types.d.ts:17006</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dump" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dump</span><a href="#dump" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dump-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dump</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#dump-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes markdown content to a separate file.
20
  Creates directory structure automatically.
21
  File path is determined by options.path and options.file.</p>
22
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown content to write</p>
23
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Path and file options for the dump</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if directory creation or file write fails</p>
25
- </div></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.dump</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17029">types.d.ts:17029</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op initialization for folder adapter.
26
  This adapter doesn't need initialization since it uses direct writeFile.</p>
27
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves immediately</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17019">types.d.ts:17019</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#markdownname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
29
 
30
  <!-- Yandex.Metrika counter -->
31
  <script type="text/javascript">
 
10
  <p>File format: {options.path}/{options.file}
11
  Example: ./dump/backtest/BTCUSDT_my-strategy_binance_2024-Q1_backtest-1736601234567.md</p>
12
  <p>Use this adapter (default) for organized report directories and manual review.</p>
13
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TMarkdownBase.html" class="tsd-signature-type tsd-kind-type-alias">TMarkdownBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17539">types.d.ts:17539</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#markdownname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.MarkdownFolderBase.html#dump" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a>
16
  <a href="types.MarkdownFolderBase.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
17
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormarkdownfolderbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MarkdownFolderBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.MarkdownFolderBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFolderBase</a><a href="#constructormarkdownfolderbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new folder-based markdown adapter instance.</p>
18
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">markdownName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of markdown report (backtest, live, walker, etc.)</p>
19
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.MarkdownFolderBase.html" class="tsd-signature-type tsd-kind-class">MarkdownFolderBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17546">types.d.ts:17546</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="markdownname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>markdown<wbr/>Name</span><a href="#markdownname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">markdownName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IMarkdownTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17540">types.d.ts:17540</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dump" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dump</span><a href="#dump" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dump-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dump</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#dump-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes markdown content to a separate file.
20
  Creates directory structure automatically.
21
  File path is determined by options.path and options.file.</p>
22
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown content to write</p>
23
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IMarkdownDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IMarkdownDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Path and file options for the dump</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if directory creation or file write fails</p>
25
+ </div></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.dump</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17563">types.d.ts:17563</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op initialization for folder adapter.
26
  This adapter doesn't need initialization since it uses direct writeFile.</p>
27
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves immediately</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMarkdownBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17553">types.d.ts:17553</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#markdownname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>markdown<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
29
 
30
  <!-- Yandex.Metrika counter -->
31
  <script type="text/javascript">
classes/types.MemoryBacktestAdapter.html CHANGED
@@ -8,7 +8,7 @@
8
  <li>Memoized instances per (signalId, bucketName) pair; cleared via disposeSignal() from MemoryAdapter</li>
9
  </ul>
10
  <p>Use this adapter for backtest memory storage.</p>
11
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TMemoryInstance</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25790">types.d.ts:25790</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MemoryBacktestAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MemoryBacktestAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
13
  <a href="types.MemoryBacktestAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
14
  <a href="types.MemoryBacktestAdapter.html#listmemory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a>
@@ -23,37 +23,37 @@
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormemorybacktestadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MemoryBacktestAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.MemoryBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryBacktestAdapter</a><a href="#constructormemorybacktestadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.MemoryBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryBacktestAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
24
  Call this when process.cwd() changes between strategy iterations
25
  so new instances are created with the updated base path.</p>
26
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25902">types.d.ts:25902</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
27
  Called by MemoryAdapter when a signal is cancelled or closed.</p>
28
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
29
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25798">types.d.ts:25798</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="listmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory</span><a href="#listmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">listMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>List all entries in memory.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the list is happening (look-ahead guard)</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of all stored entries</p>
34
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.listMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25842">types.d.ts:25842</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="readmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory</span><a href="#readmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read a single entry from memory.</p>
35
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Unique entry identifier</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Entry value</p>
40
  <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entry not found</p>
41
- </div></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.readMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25872">types.d.ts:25872</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="removememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory</span><a href="#removememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">removeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Remove an entry from memory.</p>
42
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.removeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25857">types.d.ts:25857</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="searchmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>search<wbr/>Memory</span><a href="#searchmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">searchMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Search memory using BM25 full-text scoring.</p>
43
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Search query string</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SearchSettings</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
46
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the search is happening (look-ahead guard)</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Matching entries sorted by relevance score</p>
48
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.searchMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25824">types.d.ts:25824</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
49
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25891">types.d.ts:25891</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory BM25 adapter (default).
50
  All data lives in process memory only.</p>
51
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25882">types.d.ts:25882</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usememoryadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Memory<wbr/>Adapter</span><a href="#usememoryadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useMemoryAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom memory adapter implementation.</p>
52
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom memory instance</p>
53
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25896">types.d.ts:25896</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter.
54
  Data is persisted to ./dump/memory/<signalId>/<bucketName>/.</p>
55
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25887">types.d.ts:25887</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="writememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory</span><a href="#writememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">writeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Write a value to memory.</p>
56
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.writeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25808">types.d.ts:25808</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#listmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a><a href="#readmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>read<wbr/>Memory</span></a><a href="#removememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>remove<wbr/>Memory</span></a><a href="#searchmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>search<wbr/>Memory</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usememoryadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Memory<wbr/>Adapter</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#writememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>write<wbr/>Memory</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
57
 
58
  <!-- Yandex.Metrika counter -->
59
  <script type="text/javascript">
 
8
  <li>Memoized instances per (signalId, bucketName) pair; cleared via disposeSignal() from MemoryAdapter</li>
9
  </ul>
10
  <p>Use this adapter for backtest memory storage.</p>
11
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TMemoryInstance</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26414">types.d.ts:26414</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MemoryBacktestAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MemoryBacktestAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
13
  <a href="types.MemoryBacktestAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
14
  <a href="types.MemoryBacktestAdapter.html#listmemory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a>
 
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormemorybacktestadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MemoryBacktestAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.MemoryBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryBacktestAdapter</a><a href="#constructormemorybacktestadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.MemoryBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryBacktestAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
24
  Call this when process.cwd() changes between strategy iterations
25
  so new instances are created with the updated base path.</p>
26
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26526">types.d.ts:26526</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
27
  Called by MemoryAdapter when a signal is cancelled or closed.</p>
28
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
29
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26422">types.d.ts:26422</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="listmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory</span><a href="#listmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">listMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>List all entries in memory.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the list is happening (look-ahead guard)</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of all stored entries</p>
34
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.listMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26466">types.d.ts:26466</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="readmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory</span><a href="#readmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read a single entry from memory.</p>
35
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Unique entry identifier</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Entry value</p>
40
  <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entry not found</p>
41
+ </div></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.readMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26496">types.d.ts:26496</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="removememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory</span><a href="#removememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">removeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Remove an entry from memory.</p>
42
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.removeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26481">types.d.ts:26481</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="searchmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>search<wbr/>Memory</span><a href="#searchmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">searchMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Search memory using BM25 full-text scoring.</p>
43
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Search query string</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SearchSettings</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
46
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the search is happening (look-ahead guard)</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Matching entries sorted by relevance score</p>
48
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.searchMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26448">types.d.ts:26448</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
49
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26515">types.d.ts:26515</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory BM25 adapter (default).
50
  All data lives in process memory only.</p>
51
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26506">types.d.ts:26506</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usememoryadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Memory<wbr/>Adapter</span><a href="#usememoryadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useMemoryAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom memory adapter implementation.</p>
52
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom memory instance</p>
53
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26520">types.d.ts:26520</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter.
54
  Data is persisted to ./dump/memory/<signalId>/<bucketName>/.</p>
55
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26511">types.d.ts:26511</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="writememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory</span><a href="#writememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">writeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Write a value to memory.</p>
56
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.writeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26432">types.d.ts:26432</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#listmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a><a href="#readmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>read<wbr/>Memory</span></a><a href="#removememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>remove<wbr/>Memory</span></a><a href="#searchmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>search<wbr/>Memory</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usememoryadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Memory<wbr/>Adapter</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#writememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>write<wbr/>Memory</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
57
 
58
  <!-- Yandex.Metrika counter -->
59
  <script type="text/javascript">
classes/types.MemoryLiveAdapter.html CHANGED
@@ -8,7 +8,7 @@
8
  <li>Memoized instances per (signalId, bucketName) pair; cleared via disposeSignal() from MemoryAdapter</li>
9
  </ul>
10
  <p>Use this adapter for live trading memory storage.</p>
11
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TMemoryInstance</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25916">types.d.ts:25916</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MemoryLiveAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MemoryLiveAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
13
  <a href="types.MemoryLiveAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
14
  <a href="types.MemoryLiveAdapter.html#listmemory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a>
@@ -23,37 +23,37 @@
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormemoryliveadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MemoryLiveAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.MemoryLiveAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryLiveAdapter</a><a href="#constructormemoryliveadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.MemoryLiveAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryLiveAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
24
  Call this when process.cwd() changes between strategy iterations
25
  so new instances are created with the updated base path.</p>
26
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L26028">types.d.ts:26028</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
27
  Called by MemoryAdapter when a signal is cancelled or closed.</p>
28
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
29
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25924">types.d.ts:25924</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="listmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory</span><a href="#listmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">listMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>List all entries in memory.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the list is happening (look-ahead guard)</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of all stored entries</p>
34
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.listMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25968">types.d.ts:25968</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="readmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory</span><a href="#readmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read a single entry from memory.</p>
35
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Unique entry identifier</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Entry value</p>
40
  <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entry not found</p>
41
- </div></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.readMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25998">types.d.ts:25998</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="removememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory</span><a href="#removememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">removeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Remove an entry from memory.</p>
42
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.removeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25983">types.d.ts:25983</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="searchmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>search<wbr/>Memory</span><a href="#searchmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">searchMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Search memory using BM25 full-text scoring.</p>
43
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Search query string</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SearchSettings</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
46
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the search is happening (look-ahead guard)</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Matching entries sorted by relevance score</p>
48
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.searchMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25950">types.d.ts:25950</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
49
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L26017">types.d.ts:26017</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory BM25 adapter.
50
  All data lives in process memory only.</p>
51
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L26008">types.d.ts:26008</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usememoryadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Memory<wbr/>Adapter</span><a href="#usememoryadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useMemoryAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom memory adapter implementation.</p>
52
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom memory instance</p>
53
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L26022">types.d.ts:26022</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter (default).
54
  Data is persisted to ./dump/memory/<signalId>/<bucketName>/.</p>
55
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L26013">types.d.ts:26013</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="writememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory</span><a href="#writememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">writeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Write a value to memory.</p>
56
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.writeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L25934">types.d.ts:25934</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#listmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a><a href="#readmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>read<wbr/>Memory</span></a><a href="#removememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>remove<wbr/>Memory</span></a><a href="#searchmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>search<wbr/>Memory</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usememoryadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Memory<wbr/>Adapter</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#writememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>write<wbr/>Memory</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
57
 
58
  <!-- Yandex.Metrika counter -->
59
  <script type="text/javascript">
 
8
  <li>Memoized instances per (signalId, bucketName) pair; cleared via disposeSignal() from MemoryAdapter</li>
9
  </ul>
10
  <p>Use this adapter for live trading memory storage.</p>
11
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TMemoryInstance</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26540">types.d.ts:26540</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.MemoryLiveAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.MemoryLiveAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
13
  <a href="types.MemoryLiveAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
14
  <a href="types.MemoryLiveAdapter.html#listmemory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a>
 
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructormemoryliveadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">MemoryLiveAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.MemoryLiveAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryLiveAdapter</a><a href="#constructormemoryliveadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.MemoryLiveAdapter.html" class="tsd-signature-type tsd-kind-class">MemoryLiveAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
24
  Call this when process.cwd() changes between strategy iterations
25
  so new instances are created with the updated base path.</p>
26
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26652">types.d.ts:26652</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
27
  Called by MemoryAdapter when a signal is cancelled or closed.</p>
28
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
29
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26548">types.d.ts:26548</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="listmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory</span><a href="#listmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">listMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>List all entries in memory.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the list is happening (look-ahead guard)</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of all stored entries</p>
34
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.listMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26592">types.d.ts:26592</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="readmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory</span><a href="#readmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read a single entry from memory.</p>
35
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Unique entry identifier</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Entry value</p>
40
  <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entry not found</p>
41
+ </div></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.readMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26622">types.d.ts:26622</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="removememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory</span><a href="#removememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">removeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Remove an entry from memory.</p>
42
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.removeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26607">types.d.ts:26607</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="searchmemory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>search<wbr/>Memory</span><a href="#searchmemory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">searchMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Search memory using BM25 full-text scoring.</p>
43
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">SearchSettings</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">query</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Search query string</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><code class="tsd-tag">Optional</code><span class="tsd-kind-property">settings</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">SearchSettings</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
46
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the search is happening (look-ahead guard)</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">score</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Matching entries sorted by relevance score</p>
48
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.searchMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26574">types.d.ts:26574</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
49
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26641">types.d.ts:26641</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory BM25 adapter.
50
  All data lives in process memory only.</p>
51
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26632">types.d.ts:26632</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usememoryadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Memory<wbr/>Adapter</span><a href="#usememoryadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useMemoryAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom memory adapter implementation.</p>
52
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TMemoryInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TMemoryInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom memory instance</p>
53
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26646">types.d.ts:26646</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter (default).
54
  Data is persisted to ./dump/memory/<signalId>/<bucketName>/.</p>
55
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26637">types.d.ts:26637</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="writememory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory</span><a href="#writememory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">writeMemory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">T</a><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Write a value to memory.</p>
56
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TMemoryInstance.writeMemory</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L26558">types.d.ts:26558</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#listmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>list<wbr/>Memory</span></a><a href="#readmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>read<wbr/>Memory</span></a><a href="#removememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>remove<wbr/>Memory</span></a><a href="#searchmemory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>search<wbr/>Memory</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usememoryadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Memory<wbr/>Adapter</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#writememory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>write<wbr/>Memory</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
57
 
58
  <!-- Yandex.Metrika counter -->
59
  <script type="text/javascript">
classes/types.Performance.html CHANGED
@@ -9,7 +9,7 @@
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">import</span><span class="hl-2"> { </span><span class="hl-5">Performance</span><span class="hl-2">, </span><span class="hl-5">listenPerformance</span><span class="hl-2"> } </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;backtest-kit&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-0">// Subscribe to performance events</span><br/><span class="hl-1">listenPerformance</span><span class="hl-2">((</span><span class="hl-5">event</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3">: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">duration</span><span class="hl-11">.</span><span class="hl-1">toFixed</span><span class="hl-11">(</span><span class="hl-8">2</span><span class="hl-11">)</span><span class="hl-4">}</span><span class="hl-3">ms`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Run bt...</span><br/><br/><span class="hl-0">// Get aggregated statistics</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">stats</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getData</span><span class="hl-2">(</span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;Total time:&quot;</span><span class="hl-2">, </span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">totalDuration</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;Slowest operations:&quot;</span><span class="hl-2">, </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">sort</span><span class="hl-2">((</span><span class="hl-5">a</span><span class="hl-2">, </span><span class="hl-5">b</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">b</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> - </span><span class="hl-5">a</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">slice</span><span class="hl-2">(</span><span class="hl-8">0</span><span class="hl-2">, </span><span class="hl-8">5</span><span class="hl-2">));</span><br/><br/><span class="hl-0">// Generate and save report</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L21552">types.d.ts:21552</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.Performance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.Performance.html#dump" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a>
14
  <a href="types.Performance.html#getdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Data</span></a>
15
  <a href="types.Performance.html#getreport" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Report</span></a>
@@ -22,7 +22,7 @@ Default path: ./dump/performance/{strategyName}.md</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-1" class="tsd-anchor"></a>Example<a href="#example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-0">// Save to default path: ./dump/performance/my-strategy.md</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Save to custom path: ./reports/perf/my-strategy.md</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;./reports/perf&quot;</span><span class="hl-2">);</span>
23
  </code><button type="button">Copy</button></pre>
24
 
25
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L21635">types.d.ts:21635</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>get<wbr/>Data</span><a href="#getdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.PerformanceStatisticsModel.html" class="tsd-signature-type tsd-kind-interface">PerformanceStatisticsModel</a><span class="tsd-signature-symbol">&gt;</span><a href="#getdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets aggregated performance statistics for a symbol-strategy pair.</p>
26
  <p>Returns detailed metrics grouped by operation type:</p>
27
  <ul>
28
  <li>Count, total duration, average, min, max</li>
@@ -34,7 +34,7 @@ Default path: ./dump/performance/{strategyName}.md</p>
34
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-2" class="tsd-anchor"></a>Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">stats</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getData</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Find slowest operation type</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">slowest</span><span class="hl-2"> = </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">sort</span><span class="hl-2">((</span><span class="hl-5">a</span><span class="hl-2">, </span><span class="hl-5">b</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">b</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> - </span><span class="hl-5">a</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2">)[</span><span class="hl-8">0</span><span class="hl-2">];</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`Slowest: </span><span class="hl-4">${</span><span class="hl-5">slowest</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3"> (</span><span class="hl-4">${</span><span class="hl-5">slowest</span><span class="hl-11">.</span><span class="hl-5">avgDuration</span><span class="hl-11">.</span><span class="hl-1">toFixed</span><span class="hl-11">(</span><span class="hl-8">2</span><span class="hl-11">)</span><span class="hl-4">}</span><span class="hl-3">ms avg)`</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Check for outliers</span><br/><span class="hl-6">for</span><span class="hl-2"> (</span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">metric</span><span class="hl-2"> </span><span class="hl-4">of</span><span class="hl-2"> </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)) {</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">metric</span><span class="hl-2">.</span><span class="hl-5">p99</span><span class="hl-2"> &gt; </span><span class="hl-5">metric</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> * </span><span class="hl-8">5</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">warn</span><span class="hl-2">(</span><span class="hl-3">`High variance in </span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3">: P99=</span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">p99</span><span class="hl-4">}</span><span class="hl-3">ms, Avg=</span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">avgDuration</span><span class="hl-4">}</span><span class="hl-3">ms`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span>
35
  </code><button type="button">Copy</button></pre>
36
 
37
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L21582">types.d.ts:21582</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getreport" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>get<wbr/>Report</span><a href="#getreport" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getreport-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getReport</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">columns</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Columns$8</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#getreport-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Generates markdown report with performance analysis.</p>
38
  <p>Report includes:</p>
39
  <ul>
40
  <li>Time distribution across operation types</li>
@@ -47,7 +47,7 @@ Default path: ./dump/performance/{strategyName}.md</p>
47
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-3" class="tsd-anchor"></a>Example<a href="#example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">markdown</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getReport</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">markdown</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Or save to file</span><br/><span class="hl-6">import</span><span class="hl-2"> </span><span class="hl-5">fs</span><span class="hl-2"> </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;fs/promises&quot;</span><span class="hl-2">;</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">fs</span><span class="hl-2">.</span><span class="hl-1">writeFile</span><span class="hl-2">(</span><span class="hl-3">&quot;performance-report.md&quot;</span><span class="hl-2">, </span><span class="hl-5">markdown</span><span class="hl-2">);</span>
48
  </code><button type="button">Copy</button></pre>
49
 
50
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L21610">types.d.ts:21610</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#getdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Data</span></a><a href="#getreport" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Report</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
51
 
52
  <!-- Yandex.Metrika counter -->
53
  <script type="text/javascript">
 
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">import</span><span class="hl-2"> { </span><span class="hl-5">Performance</span><span class="hl-2">, </span><span class="hl-5">listenPerformance</span><span class="hl-2"> } </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;backtest-kit&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-0">// Subscribe to performance events</span><br/><span class="hl-1">listenPerformance</span><span class="hl-2">((</span><span class="hl-5">event</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3">: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">duration</span><span class="hl-11">.</span><span class="hl-1">toFixed</span><span class="hl-11">(</span><span class="hl-8">2</span><span class="hl-11">)</span><span class="hl-4">}</span><span class="hl-3">ms`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Run bt...</span><br/><br/><span class="hl-0">// Get aggregated statistics</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">stats</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getData</span><span class="hl-2">(</span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;Total time:&quot;</span><span class="hl-2">, </span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">totalDuration</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;Slowest operations:&quot;</span><span class="hl-2">, </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">sort</span><span class="hl-2">((</span><span class="hl-5">a</span><span class="hl-2">, </span><span class="hl-5">b</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">b</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> - </span><span class="hl-5">a</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">slice</span><span class="hl-2">(</span><span class="hl-8">0</span><span class="hl-2">, </span><span class="hl-8">5</span><span class="hl-2">));</span><br/><br/><span class="hl-0">// Generate and save report</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L22176">types.d.ts:22176</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.Performance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.Performance.html#dump" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a>
14
  <a href="types.Performance.html#getdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Data</span></a>
15
  <a href="types.Performance.html#getreport" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Report</span></a>
 
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-1" class="tsd-anchor"></a>Example<a href="#example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-0">// Save to default path: ./dump/performance/my-strategy.md</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Save to custom path: ./reports/perf/my-strategy.md</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">dump</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;./reports/perf&quot;</span><span class="hl-2">);</span>
23
  </code><button type="button">Copy</button></pre>
24
 
25
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L22259">types.d.ts:22259</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>get<wbr/>Data</span><a href="#getdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.PerformanceStatisticsModel.html" class="tsd-signature-type tsd-kind-interface">PerformanceStatisticsModel</a><span class="tsd-signature-symbol">&gt;</span><a href="#getdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets aggregated performance statistics for a symbol-strategy pair.</p>
26
  <p>Returns detailed metrics grouped by operation type:</p>
27
  <ul>
28
  <li>Count, total duration, average, min, max</li>
 
34
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-2" class="tsd-anchor"></a>Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">stats</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getData</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Find slowest operation type</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">slowest</span><span class="hl-2"> = </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">sort</span><span class="hl-2">((</span><span class="hl-5">a</span><span class="hl-2">, </span><span class="hl-5">b</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">b</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> - </span><span class="hl-5">a</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2">)[</span><span class="hl-8">0</span><span class="hl-2">];</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`Slowest: </span><span class="hl-4">${</span><span class="hl-5">slowest</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3"> (</span><span class="hl-4">${</span><span class="hl-5">slowest</span><span class="hl-11">.</span><span class="hl-5">avgDuration</span><span class="hl-11">.</span><span class="hl-1">toFixed</span><span class="hl-11">(</span><span class="hl-8">2</span><span class="hl-11">)</span><span class="hl-4">}</span><span class="hl-3">ms avg)`</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Check for outliers</span><br/><span class="hl-6">for</span><span class="hl-2"> (</span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">metric</span><span class="hl-2"> </span><span class="hl-4">of</span><span class="hl-2"> </span><span class="hl-5">Object</span><span class="hl-2">.</span><span class="hl-1">values</span><span class="hl-2">(</span><span class="hl-5">stats</span><span class="hl-2">.</span><span class="hl-5">metricStats</span><span class="hl-2">)) {</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">metric</span><span class="hl-2">.</span><span class="hl-5">p99</span><span class="hl-2"> &gt; </span><span class="hl-5">metric</span><span class="hl-2">.</span><span class="hl-5">avgDuration</span><span class="hl-2"> * </span><span class="hl-8">5</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">warn</span><span class="hl-2">(</span><span class="hl-3">`High variance in </span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">metricType</span><span class="hl-4">}</span><span class="hl-3">: P99=</span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">p99</span><span class="hl-4">}</span><span class="hl-3">ms, Avg=</span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-11">.</span><span class="hl-5">avgDuration</span><span class="hl-4">}</span><span class="hl-3">ms`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span>
35
  </code><button type="button">Copy</button></pre>
36
 
37
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L22206">types.d.ts:22206</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="getreport" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>get<wbr/>Report</span><a href="#getreport" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="getreport-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getReport</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">columns</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Columns$8</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#getreport-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Generates markdown report with performance analysis.</p>
38
  <p>Report includes:</p>
39
  <ul>
40
  <li>Time distribution across operation types</li>
 
47
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example-3" class="tsd-anchor"></a>Example<a href="#example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">markdown</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">Performance</span><span class="hl-2">.</span><span class="hl-1">getReport</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">);</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">markdown</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Or save to file</span><br/><span class="hl-6">import</span><span class="hl-2"> </span><span class="hl-5">fs</span><span class="hl-2"> </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;fs/promises&quot;</span><span class="hl-2">;</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">fs</span><span class="hl-2">.</span><span class="hl-1">writeFile</span><span class="hl-2">(</span><span class="hl-3">&quot;performance-report.md&quot;</span><span class="hl-2">, </span><span class="hl-5">markdown</span><span class="hl-2">);</span>
48
  </code><button type="button">Copy</button></pre>
49
 
50
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L22234">types.d.ts:22234</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dump" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dump</span></a><a href="#getdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Data</span></a><a href="#getreport" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Report</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
51
 
52
  <!-- Yandex.Metrika counter -->
53
  <script type="text/javascript">
classes/types.PersistBase.html CHANGED
@@ -9,7 +9,7 @@
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">persist</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistBase</span><span class="hl-2">(</span><span class="hl-3">&quot;my-entity&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;./data&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">writeValue</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">, { </span><span class="hl-5">data:</span><span class="hl-2"> </span><span class="hl-3">&quot;value&quot;</span><span class="hl-2"> });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">value</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">readValue</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div></section> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="entityname" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">EntityName</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</span></span></li></ul></section> <section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistBase.html" class="tsd-signature-type tsd-kind-interface">IPersistBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13782">types.d.ts:13782</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistBase.html#_directory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_directory</span></a>
14
  <a href="types.PersistBase.html#base_wait_for_init_symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a>
15
  <a href="types.PersistBase.html#basedir" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a>
@@ -23,32 +23,32 @@
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistBase</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">entityName</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">baseDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistBase.html" class="tsd-signature-type tsd-kind-class">PersistBase</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">&gt;</span><a href="#constructorpersistbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new persistence instance.</p>
24
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="constructorpersistbaseentityname" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">EntityName</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityName</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a></span><div class="tsd-comment tsd-typography"><p>Unique entity type identifier</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">baseDir</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base directory for all entities (default: ./dump/data)</p>
26
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistBase.html" class="tsd-signature-type tsd-kind-class">PersistBase</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13793">types.d.ts:13793</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_directory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_directory</span><a href="#_directory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_directory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Computed directory path for entity storage</p>
27
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13786">types.d.ts:13786</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="base_wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#base_wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[BASE_WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13801">types.d.ts:13801</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>base<wbr/>Dir</span><a href="#basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13784">types.d.ts:13784</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="entityname-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>entity<wbr/>Name</span><a href="#entityname-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">entityName</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13783">types.d.ts:13783</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="_getfilepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_get<wbr/>File<wbr/>Path</span><a href="#_getfilepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="_getfilepath-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_getFilePath</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#_getfilepath-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Computes file path for entity ID.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Entity identifier</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>Full file path to entity JSON file</p>
30
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13800">types.d.ts:13800</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="hasvalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Value</span><a href="#hasvalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="hasvalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">hasValue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#hasvalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Check if entity exists in storage.</p>
31
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to true if exists, false otherwise</p>
33
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#hasvalue">hasValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13804">types.d.ts:13804</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="keys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>keys</span><a href="#keys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="keys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">keys</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">&gt;</span><a href="#keys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Async generator yielding all entity IDs.
34
  Sorted alphanumerically.
35
  Used internally by waitForInit for validation.</p>
36
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding entity IDs</p>
37
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if reading fails</p>
38
- </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#keys">keys</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13814">types.d.ts:13814</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readvalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Value</span><a href="#readvalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readvalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readValue</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">IEntity</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">IEntity</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#readvalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Read entity from persistence storage.</p>
39
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="readvaluet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">IEntity</span> = <span class="tsd-signature-type">IEntity</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entity data</p>
41
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-1" class="tsd-anchor"></a>Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entity not found or read fails</p>
42
- </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#readvalue">readValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13803">types.d.ts:13803</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initialize persistence directory and validate existing files.
43
  Uses singleshot to ensure one-time execution.</p>
44
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
46
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13802">types.d.ts:13802</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writevalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Value</span><a href="#writevalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writevalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeValue</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">IEntity</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">IEntity</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">entity</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writevalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Write entity to storage with atomic file writes.</p>
47
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="writevaluet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">IEntity</span> = <span class="tsd-signature-type">IEntity</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
48
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">entity</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a></span><div class="tsd-comment tsd-typography"><p>Entity data to persist</p>
49
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
50
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-2" class="tsd-anchor"></a>Throws<a href="#throws-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if write fails</p>
51
- </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#writevalue">writeValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13805">types.d.ts:13805</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_directory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_directory</span></a><a href="#base_wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a><a href="#entityname-1" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>entity<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#_getfilepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_get<wbr/>File<wbr/>Path</span></a><a href="#hasvalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Value</span></a><a href="#keys" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>keys</span></a><a href="#readvalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Value</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writevalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Value</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
 
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">persist</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistBase</span><span class="hl-2">(</span><span class="hl-3">&quot;my-entity&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;./data&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">writeValue</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">, { </span><span class="hl-5">data:</span><span class="hl-2"> </span><span class="hl-3">&quot;value&quot;</span><span class="hl-2"> });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">value</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">persist</span><span class="hl-2">.</span><span class="hl-1">readValue</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div></section> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="entityname" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">EntityName</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</span></span></li></ul></section> <section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistBase.html" class="tsd-signature-type tsd-kind-interface">IPersistBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14304">types.d.ts:14304</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistBase.html#_directory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_directory</span></a>
14
  <a href="types.PersistBase.html#base_wait_for_init_symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a>
15
  <a href="types.PersistBase.html#basedir" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a>
 
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistBase</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">entityName</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">baseDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistBase.html" class="tsd-signature-type tsd-kind-class">PersistBase</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">&gt;</span><a href="#constructorpersistbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new persistence instance.</p>
24
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="constructorpersistbaseentityname" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">EntityName</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityName</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a></span><div class="tsd-comment tsd-typography"><p>Unique entity type identifier</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">baseDir</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base directory for all entities (default: ./dump/data)</p>
26
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistBase.html" class="tsd-signature-type tsd-kind-class">PersistBase</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14315">types.d.ts:14315</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_directory" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_directory</span><a href="#_directory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_directory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Computed directory path for entity storage</p>
27
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14308">types.d.ts:14308</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="base_wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#base_wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[BASE_WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14323">types.d.ts:14323</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>base<wbr/>Dir</span><a href="#basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14306">types.d.ts:14306</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="entityname-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>entity<wbr/>Name</span><a href="#entityname-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">entityName</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#constructorpersistbaseentityname">EntityName</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14305">types.d.ts:14305</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="_getfilepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_get<wbr/>File<wbr/>Path</span><a href="#_getfilepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="_getfilepath-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_getFilePath</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#_getfilepath-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Computes file path for entity ID.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Entity identifier</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>Full file path to entity JSON file</p>
30
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14322">types.d.ts:14322</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="hasvalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Value</span><a href="#hasvalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="hasvalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">hasValue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#hasvalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Check if entity exists in storage.</p>
31
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to true if exists, false otherwise</p>
33
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#hasvalue">hasValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14326">types.d.ts:14326</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="keys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>keys</span><a href="#keys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="keys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">keys</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">&gt;</span><a href="#keys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Async generator yielding all entity IDs.
34
  Sorted alphanumerically.
35
  Used internally by waitForInit for validation.</p>
36
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding entity IDs</p>
37
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if reading fails</p>
38
+ </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#keys">keys</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14336">types.d.ts:14336</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readvalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Value</span><a href="#readvalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readvalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readValue</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">IEntity</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">IEntity</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#readvalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Read entity from persistence storage.</p>
39
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="readvaluet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">IEntity</span> = <span class="tsd-signature-type">IEntity</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#readvaluet">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entity data</p>
41
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-1" class="tsd-anchor"></a>Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if entity not found or read fails</p>
42
+ </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#readvalue">readValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14325">types.d.ts:14325</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initialize persistence directory and validate existing files.
43
  Uses singleshot to ensure one-time execution.</p>
44
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
46
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14324">types.d.ts:14324</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writevalue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Value</span><a href="#writevalue" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writevalue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeValue</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">IEntity</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">IEntity</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">entityId</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">entity</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writevalue-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Write entity to storage with atomic file writes.</p>
47
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="writevaluet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">IEntity</span> = <span class="tsd-signature-type">IEntity</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">entityId</span>: <a href="../types/types.EntityId.html" class="tsd-signature-type tsd-kind-type-alias">EntityId</a></span><div class="tsd-comment tsd-typography"><p>Unique entity identifier</p>
48
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">entity</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.PersistBase.html#writevaluet">T</a></span><div class="tsd-comment tsd-typography"><p>Entity data to persist</p>
49
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
50
  <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws-2" class="tsd-anchor"></a>Throws<a href="#throws-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if write fails</p>
51
+ </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBase.html">IPersistBase</a>.<a href="../interfaces/types.IPersistBase.html#writevalue">writeValue</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14327">types.d.ts:14327</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_directory" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_directory</span></a><a href="#base_wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a><a href="#entityname-1" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>entity<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#_getfilepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_get<wbr/>File<wbr/>Path</span></a><a href="#hasvalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Value</span></a><a href="#keys" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>keys</span></a><a href="#readvalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Value</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writevalue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Value</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
classes/types.PersistBreakevenInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistBreakevenInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeBreakevenData</span><span class="hl-2">(</span><span class="hl-5">breakevenData</span><span class="hl-2">, </span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readBreakevenData</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistBreakevenInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistBreakevenInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14764">types.d.ts:14764</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistBreakevenInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistBreakevenInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistBreakevenInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistBreakevenInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -19,17 +19,17 @@
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistBreakevenInstance.html" class="tsd-signature-type tsd-kind-class">PersistBreakevenInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14777">types.d.ts:14777</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14767">types.d.ts:14767</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14766">types.d.ts:14766</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14765">types.d.ts:14765</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readbreakevendata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Breakeven<wbr/>Data</span><a href="#readbreakevendata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readbreakevendata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readBreakevenData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readbreakevendata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the breakeven data for the given signal using <code>signalId</code> as the entity key.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to breakeven data record (empty object if not found)</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#readbreakevendata">readBreakevenData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14791">types.d.ts:14791</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14784">types.d.ts:14784</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writebreakevendata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Breakeven<wbr/>Data</span><a href="#writebreakevendata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writebreakevendata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeBreakevenData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writebreakevendata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the breakeven data for the given signal using <code>signalId</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a></span><div class="tsd-comment tsd-typography"><p>Breakeven data record to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
32
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#writebreakevendata">writeBreakevenData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14800">types.d.ts:14800</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readbreakevendata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Breakeven<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writebreakevendata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Breakeven<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
33
 
34
  <!-- Yandex.Metrika counter -->
35
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistBreakevenInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeBreakevenData</span><span class="hl-2">(</span><span class="hl-5">breakevenData</span><span class="hl-2">, </span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readBreakevenData</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistBreakevenInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistBreakevenInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15298">types.d.ts:15298</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistBreakevenInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistBreakevenInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistBreakevenInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistBreakevenInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistBreakevenInstance.html" class="tsd-signature-type tsd-kind-class">PersistBreakevenInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15311">types.d.ts:15311</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15301">types.d.ts:15301</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15300">types.d.ts:15300</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15299">types.d.ts:15299</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readbreakevendata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Breakeven<wbr/>Data</span><a href="#readbreakevendata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readbreakevendata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readBreakevenData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readbreakevendata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the breakeven data for the given signal using <code>signalId</code> as the entity key.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to breakeven data record (empty object if not found)</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#readbreakevendata">readBreakevenData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15325">types.d.ts:15325</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15318">types.d.ts:15318</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writebreakevendata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Breakeven<wbr/>Data</span><a href="#writebreakevendata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writebreakevendata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeBreakevenData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writebreakevendata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the breakeven data for the given signal using <code>signalId</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.BreakevenData.html" class="tsd-signature-type tsd-kind-type-alias">BreakevenData</a></span><div class="tsd-comment tsd-typography"><p>Breakeven data record to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
32
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistBreakevenInstance.html">IPersistBreakevenInstance</a>.<a href="../interfaces/types.IPersistBreakevenInstance.html#writebreakevendata">writeBreakevenData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15334">types.d.ts:15334</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readbreakevendata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Breakeven<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writebreakevendata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Breakeven<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
33
 
34
  <!-- Yandex.Metrika counter -->
35
  <script type="text/javascript">
classes/types.PersistCandleInstance.html CHANGED
@@ -9,7 +9,7 @@
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistCandleInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeCandlesData</span><span class="hl-2">(</span><span class="hl-5">candles</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">cached</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readCandlesData</span><span class="hl-2">(</span><span class="hl-8">100</span><span class="hl-2">, </span><span class="hl-5">since</span><span class="hl-2">, </span><span class="hl-5">until</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistCandleInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistCandleInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14973">types.d.ts:14973</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistCandleInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistCandleInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
14
  <a href="types.PersistCandleInstance.html#interval" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>interval</span></a>
15
  <a href="types.PersistCandleInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -20,7 +20,7 @@
20
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">interval</span>: <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a></span><div class="tsd-comment tsd-typography"><p>Candle interval (1m, 5m, 1h, etc.)</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
23
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistCandleInstance.html" class="tsd-signature-type tsd-kind-class">PersistCandleInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14986">types.d.ts:14986</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14976">types.d.ts:14976</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="interval" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>interval</span><a href="#interval" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">interval</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14975">types.d.ts:14975</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14974">types.d.ts:14974</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readcandlesdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Candles<wbr/>Data</span><a href="#readcandlesdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readcandlesdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readCandlesData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">limit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">sinceTimestamp</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_untilTimestamp</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#readcandlesdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads cached candles for the requested window.
24
  Computes expected timestamps (sinceTimestamp + i * stepMs) and reads each
25
  by timestamp key. Returns null on ANY missing timestamp (cache miss).
26
  Invalid cached candles emit a warning via errorEmitter and are treated as miss.</p>
@@ -28,15 +28,15 @@ Invalid cached candles emit a warning via errorEmitter and are treated as miss.<
28
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">sinceTimestamp</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Aligned start timestamp (openTime of first candle)</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_untilTimestamp</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Reserved for API compatibility, unused</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to candles in order, or null on cache miss</p>
31
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#readcandlesdata">readCandlesData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15005">types.d.ts:15005</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
34
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14993">types.d.ts:14993</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writecandlesdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Candles<wbr/>Data</span><a href="#writecandlesdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writecandlesdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeCandlesData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">candles</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writecandlesdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes candles to cache.
35
  Skips incomplete candles (closeTime &gt; now) and existing keys to keep
36
  the cache append-only for fully closed candles.</p>
37
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">candles</span>: <a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>Array of candle data to cache</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
39
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#writecandlesdata">writeCandlesData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15014">types.d.ts:15014</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#interval" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>interval</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readcandlesdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Candles<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writecandlesdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Candles<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
40
 
41
  <!-- Yandex.Metrika counter -->
42
  <script type="text/javascript">
 
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistCandleInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeCandlesData</span><span class="hl-2">(</span><span class="hl-5">candles</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">cached</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readCandlesData</span><span class="hl-2">(</span><span class="hl-8">100</span><span class="hl-2">, </span><span class="hl-5">since</span><span class="hl-2">, </span><span class="hl-5">until</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistCandleInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistCandleInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15507">types.d.ts:15507</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistCandleInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistCandleInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
14
  <a href="types.PersistCandleInstance.html#interval" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>interval</span></a>
15
  <a href="types.PersistCandleInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
20
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">interval</span>: <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a></span><div class="tsd-comment tsd-typography"><p>Candle interval (1m, 5m, 1h, etc.)</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
23
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistCandleInstance.html" class="tsd-signature-type tsd-kind-class">PersistCandleInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15520">types.d.ts:15520</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15510">types.d.ts:15510</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="interval" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>interval</span><a href="#interval" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">interval</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15509">types.d.ts:15509</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15508">types.d.ts:15508</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readcandlesdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Candles<wbr/>Data</span><a href="#readcandlesdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readcandlesdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readCandlesData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">limit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">sinceTimestamp</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_untilTimestamp</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#readcandlesdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads cached candles for the requested window.
24
  Computes expected timestamps (sinceTimestamp + i * stepMs) and reads each
25
  by timestamp key. Returns null on ANY missing timestamp (cache miss).
26
  Invalid cached candles emit a warning via errorEmitter and are treated as miss.</p>
 
28
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">sinceTimestamp</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Aligned start timestamp (openTime of first candle)</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_untilTimestamp</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Reserved for API compatibility, unused</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to candles in order, or null on cache miss</p>
31
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#readcandlesdata">readCandlesData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15539">types.d.ts:15539</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
34
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15527">types.d.ts:15527</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writecandlesdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Candles<wbr/>Data</span><a href="#writecandlesdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writecandlesdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeCandlesData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">candles</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writecandlesdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes candles to cache.
35
  Skips incomplete candles (closeTime &gt; now) and existing keys to keep
36
  the cache append-only for fully closed candles.</p>
37
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">candles</span>: <a href="../interfaces/types.ICandleData.html" class="tsd-signature-type tsd-kind-interface">ICandleData</a><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>Array of candle data to cache</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
39
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistCandleInstance.html">IPersistCandleInstance</a>.<a href="../interfaces/types.IPersistCandleInstance.html#writecandlesdata">writeCandlesData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15548">types.d.ts:15548</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#interval" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>interval</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readcandlesdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Candles<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writecandlesdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Candles<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
40
 
41
  <!-- Yandex.Metrika counter -->
42
  <script type="text/javascript">
classes/types.PersistIntervalInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistIntervalInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-interval-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeIntervalData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;x&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> {}, </span><span class="hl-5">removed:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> }, </span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">marker</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readIntervalData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">removeIntervalData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistIntervalInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistIntervalInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15842">types.d.ts:15842</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#bucket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#listintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Interval<wbr/>Data</span></a>
14
  <a href="types.PersistIntervalInstance.html#readintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Interval<wbr/>Data</span></a>
@@ -17,23 +17,23 @@
17
  <a href="types.PersistIntervalInstance.html#writeintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Interval<wbr/>Data</span></a>
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistintervalinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistIntervalInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistIntervalInstance.html" class="tsd-signature-type tsd-kind-class">PersistIntervalInstance</a><a href="#constructorpersistintervalinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new interval marker persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">bucket</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker bucket identifier</p>
20
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistIntervalInstance.html" class="tsd-signature-type tsd-kind-class">PersistIntervalInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15851">types.d.ts:15851</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket</span><a href="#bucket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15843">types.d.ts:15843</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="listintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Interval<wbr/>Data</span><a href="#listintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listIntervalData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#listintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all markers in the bucket, yielding keys of non-removed markers only.</p>
21
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding marker keys</p>
22
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#listintervaldata">listIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15887">types.d.ts:15887</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Interval<wbr/>Data</span><a href="#readintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an interval marker by key. Returns null if marker is missing or soft-deleted.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to stored data, or null</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#readintervaldata">readIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15865">types.d.ts:15865</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removeintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Interval<wbr/>Data</span><a href="#removeintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removeintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removeintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes a marker by writing <code>removed: true</code> flag while preserving the file.
26
  Subsequent reads will return null, allowing the interval to fire again.</p>
27
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
28
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
29
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#removeintervaldata">removeIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15881">types.d.ts:15881</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
30
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
32
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15858">types.d.ts:15858</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writeintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Interval<wbr/>Data</span><a href="#writeintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writeintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writeintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes an interval marker under the given key.</p>
33
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a></span><div class="tsd-comment tsd-typography"><p>Data to store</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
36
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#writeintervaldata">writeIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15873">types.d.ts:15873</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#listintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Interval<wbr/>Data</span></a><a href="#readintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Interval<wbr/>Data</span></a><a href="#removeintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Interval<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writeintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Interval<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
37
 
38
  <!-- Yandex.Metrika counter -->
39
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistIntervalInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-interval-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeIntervalData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;x&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> {}, </span><span class="hl-5">removed:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> }, </span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">marker</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readIntervalData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">removeIntervalData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistIntervalInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistIntervalInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16376">types.d.ts:16376</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#bucket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistIntervalInstance.html#listintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Interval<wbr/>Data</span></a>
14
  <a href="types.PersistIntervalInstance.html#readintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Interval<wbr/>Data</span></a>
 
17
  <a href="types.PersistIntervalInstance.html#writeintervaldata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Interval<wbr/>Data</span></a>
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistintervalinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistIntervalInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistIntervalInstance.html" class="tsd-signature-type tsd-kind-class">PersistIntervalInstance</a><a href="#constructorpersistintervalinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new interval marker persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">bucket</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker bucket identifier</p>
20
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistIntervalInstance.html" class="tsd-signature-type tsd-kind-class">PersistIntervalInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16385">types.d.ts:16385</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket</span><a href="#bucket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16377">types.d.ts:16377</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="listintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Interval<wbr/>Data</span><a href="#listintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listIntervalData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#listintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all markers in the bucket, yielding keys of non-removed markers only.</p>
21
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding marker keys</p>
22
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#listintervaldata">listIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16421">types.d.ts:16421</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Interval<wbr/>Data</span><a href="#readintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads an interval marker by key. Returns null if marker is missing or soft-deleted.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to stored data, or null</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#readintervaldata">readIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16399">types.d.ts:16399</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removeintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Interval<wbr/>Data</span><a href="#removeintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removeintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removeintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes a marker by writing <code>removed: true</code> flag while preserving the file.
26
  Subsequent reads will return null, allowing the interval to fire again.</p>
27
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
28
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
29
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#removeintervaldata">removeIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16415">types.d.ts:16415</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
30
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
32
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16392">types.d.ts:16392</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writeintervaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Interval<wbr/>Data</span><a href="#writeintervaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writeintervaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeIntervalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writeintervaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes an interval marker under the given key.</p>
33
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.IntervalData.html" class="tsd-signature-type tsd-kind-type-alias">IntervalData</a></span><div class="tsd-comment tsd-typography"><p>Data to store</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Marker key within the bucket</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
36
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistIntervalInstance.html">IPersistIntervalInstance</a>.<a href="../interfaces/types.IPersistIntervalInstance.html#writeintervaldata">writeIntervalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16407">types.d.ts:16407</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#listintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Interval<wbr/>Data</span></a><a href="#readintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Interval<wbr/>Data</span></a><a href="#removeintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Interval<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writeintervaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Interval<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
37
 
38
  <!-- Yandex.Metrika counter -->
39
  <script type="text/javascript">
classes/types.PersistLogInstance.html CHANGED
@@ -9,22 +9,22 @@
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistLogInstance</span><span class="hl-2">();</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeLogData</span><span class="hl-2">(</span><span class="hl-5">entries</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readLogData</span><span class="hl-2">();</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistLogInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistLogInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15472">types.d.ts:15472</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistLogInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistLogInstance.html#readlogdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Log<wbr/>Data</span></a>
14
  <a href="types.PersistLogInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistLogInstance.html#writelogdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Log<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistloginstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistLogInstance</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistLogInstance.html" class="tsd-signature-type tsd-kind-class">PersistLogInstance</a><a href="#constructorpersistloginstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new log persistence instance.
17
  No context parameters — there is a single global log storage.</p>
18
- </div><h4 class="tsd-returns-title">Returns <a href="types.PersistLogInstance.html" class="tsd-signature-type tsd-kind-class">PersistLogInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15479">types.d.ts:15479</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readlogdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Log<wbr/>Data</span><a href="#readlogdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readlogdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readLogData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readlogdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted log entries by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of log entries</p>
20
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#readlogdata">readLogData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15492">types.d.ts:15492</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15486">types.d.ts:15486</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writelogdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Log<wbr/>Data</span><a href="#writelogdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writelogdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeLogData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">logData</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writelogdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes log entries append-only — skips entries whose id already exists
24
  so the log file is never overwritten.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">logData</span>: <a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a></span><div class="tsd-comment tsd-typography"><p>Log entries to persist</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
27
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#writelogdata">writeLogData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15500">types.d.ts:15500</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readlogdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Log<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writelogdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Log<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
28
 
29
  <!-- Yandex.Metrika counter -->
30
  <script type="text/javascript">
 
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistLogInstance</span><span class="hl-2">();</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeLogData</span><span class="hl-2">(</span><span class="hl-5">entries</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readLogData</span><span class="hl-2">();</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistLogInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistLogInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16006">types.d.ts:16006</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistLogInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistLogInstance.html#readlogdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Log<wbr/>Data</span></a>
14
  <a href="types.PersistLogInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistLogInstance.html#writelogdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Log<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistloginstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistLogInstance</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistLogInstance.html" class="tsd-signature-type tsd-kind-class">PersistLogInstance</a><a href="#constructorpersistloginstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new log persistence instance.
17
  No context parameters — there is a single global log storage.</p>
18
+ </div><h4 class="tsd-returns-title">Returns <a href="types.PersistLogInstance.html" class="tsd-signature-type tsd-kind-class">PersistLogInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16013">types.d.ts:16013</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readlogdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Log<wbr/>Data</span><a href="#readlogdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readlogdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readLogData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readlogdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted log entries by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of log entries</p>
20
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#readlogdata">readLogData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16026">types.d.ts:16026</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16020">types.d.ts:16020</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writelogdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Log<wbr/>Data</span><a href="#writelogdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writelogdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeLogData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">logData</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writelogdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes log entries append-only — skips entries whose id already exists
24
  so the log file is never overwritten.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">logData</span>: <a href="../types/types.LogData.html" class="tsd-signature-type tsd-kind-type-alias">LogData</a></span><div class="tsd-comment tsd-typography"><p>Log entries to persist</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
27
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistLogInstance.html">IPersistLogInstance</a>.<a href="../interfaces/types.IPersistLogInstance.html#writelogdata">writeLogData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16034">types.d.ts:16034</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readlogdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Log<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writelogdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Log<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
28
 
29
  <!-- Yandex.Metrika counter -->
30
  <script type="text/javascript">
classes/types.PersistMeasureInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistMeasureInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeMeasureData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;x&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> {}, </span><span class="hl-5">removed:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> }, </span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">data</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readMeasureData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">removeMeasureData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistMeasureInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistMeasureInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15642">types.d.ts:15642</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#bucket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#listmeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Measure<wbr/>Data</span></a>
14
  <a href="types.PersistMeasureInstance.html#readmeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Measure<wbr/>Data</span></a>
@@ -17,22 +17,22 @@
17
  <a href="types.PersistMeasureInstance.html#writemeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Measure<wbr/>Data</span></a>
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistmeasureinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistMeasureInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistMeasureInstance.html" class="tsd-signature-type tsd-kind-class">PersistMeasureInstance</a><a href="#constructorpersistmeasureinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new measure cache persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">bucket</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache bucket identifier</p>
20
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistMeasureInstance.html" class="tsd-signature-type tsd-kind-class">PersistMeasureInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15651">types.d.ts:15651</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket</span><a href="#bucket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15643">types.d.ts:15643</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="listmeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Measure<wbr/>Data</span><a href="#listmeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listmeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listMeasureData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#listmeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all entries in the bucket, yielding keys of non-removed entries only.</p>
21
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding entry keys</p>
22
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#listmeasuredata">listMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15686">types.d.ts:15686</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readmeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Measure<wbr/>Data</span><a href="#readmeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readmeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readmeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a measure entry by key. Returns null if entry is missing or soft-deleted.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entry data, or null</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#readmeasuredata">readMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15665">types.d.ts:15665</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removemeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Measure<wbr/>Data</span><a href="#removemeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removemeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removemeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes an entry by writing <code>removed: true</code> flag while preserving the file.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#removemeasuredata">removeMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15680">types.d.ts:15680</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
31
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15658">types.d.ts:15658</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writemeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Measure<wbr/>Data</span><a href="#writemeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writemeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writemeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes a measure entry under the given key.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a></span><div class="tsd-comment tsd-typography"><p>Data to cache</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
35
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#writemeasuredata">writeMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15673">types.d.ts:15673</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#listmeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Measure<wbr/>Data</span></a><a href="#readmeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Measure<wbr/>Data</span></a><a href="#removemeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Measure<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writemeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Measure<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
36
 
37
  <!-- Yandex.Metrika counter -->
38
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistMeasureInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeMeasureData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;x&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> {}, </span><span class="hl-5">removed:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> }, </span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">data</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readMeasureData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">removeMeasureData</span><span class="hl-2">(</span><span class="hl-3">&quot;key1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistMeasureInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistMeasureInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16176">types.d.ts:16176</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#bucket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistMeasureInstance.html#listmeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Measure<wbr/>Data</span></a>
14
  <a href="types.PersistMeasureInstance.html#readmeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Measure<wbr/>Data</span></a>
 
17
  <a href="types.PersistMeasureInstance.html#writemeasuredata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Measure<wbr/>Data</span></a>
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistmeasureinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistMeasureInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistMeasureInstance.html" class="tsd-signature-type tsd-kind-class">PersistMeasureInstance</a><a href="#constructorpersistmeasureinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new measure cache persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">bucket</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache bucket identifier</p>
20
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistMeasureInstance.html" class="tsd-signature-type tsd-kind-class">PersistMeasureInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16185">types.d.ts:16185</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket</span><a href="#bucket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16177">types.d.ts:16177</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="listmeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Measure<wbr/>Data</span><a href="#listmeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listmeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listMeasureData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#listmeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all entries in the bucket, yielding keys of non-removed entries only.</p>
21
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding entry keys</p>
22
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#listmeasuredata">listMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16220">types.d.ts:16220</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readmeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Measure<wbr/>Data</span><a href="#readmeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readmeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readmeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a measure entry by key. Returns null if entry is missing or soft-deleted.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entry data, or null</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#readmeasuredata">readMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16199">types.d.ts:16199</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removemeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Measure<wbr/>Data</span><a href="#removemeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removemeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removemeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes an entry by writing <code>removed: true</code> flag while preserving the file.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#removemeasuredata">removeMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16214">types.d.ts:16214</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
31
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16192">types.d.ts:16192</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writemeasuredata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Measure<wbr/>Data</span><a href="#writemeasuredata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writemeasuredata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeMeasureData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writemeasuredata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes a measure entry under the given key.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.MeasureData.html" class="tsd-signature-type tsd-kind-type-alias">MeasureData</a></span><div class="tsd-comment tsd-typography"><p>Data to cache</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Cache key within the bucket</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
35
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMeasureInstance.html">IPersistMeasureInstance</a>.<a href="../interfaces/types.IPersistMeasureInstance.html#writemeasuredata">writeMeasureData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16207">types.d.ts:16207</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#listmeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Measure<wbr/>Data</span></a><a href="#readmeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Measure<wbr/>Data</span></a><a href="#removemeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Measure<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writemeasuredata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Measure<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
36
 
37
  <!-- Yandex.Metrika counter -->
38
  <script type="text/javascript">
classes/types.PersistMemoryInstance.html CHANGED
@@ -9,7 +9,7 @@
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistMemoryInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-1&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;context-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeMemoryData</span><span class="hl-2">(</span><span class="hl-5">entryData</span><span class="hl-2">, </span><span class="hl-3">&quot;memory-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">data</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readMemoryData</span><span class="hl-2">(</span><span class="hl-3">&quot;memory-id-1&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistMemoryInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistMemoryInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16066">types.d.ts:16066</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#bucketname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a>
14
  <a href="types.PersistMemoryInstance.html#signalid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#dispose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a>
@@ -22,28 +22,28 @@
22
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistmemoryinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistMemoryInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistMemoryInstance.html" class="tsd-signature-type tsd-kind-class">PersistMemoryInstance</a><a href="#constructorpersistmemoryinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new memory persistence instance.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier (entity folder name)</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">bucketName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Bucket name (subfolder under memory/)</p>
25
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistMemoryInstance.html" class="tsd-signature-type tsd-kind-class">PersistMemoryInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16077">types.d.ts:16077</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucketname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket<wbr/>Name</span><a href="#bucketname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16068">types.d.ts:16068</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="signalid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>signal<wbr/>Id</span><a href="#signalid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16067">types.d.ts:16067</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
26
  Resource cleanup (memo cache invalidation) is handled by PersistMemoryUtils.dispose().</p>
27
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16128">types.d.ts:16128</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="hasmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Memory<wbr/>Data</span><a href="#hasmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="hasmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">hasMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#hasmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Checks whether a memory entry exists on disk (regardless of removed flag).</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to true if entry file exists</p>
30
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#hasmemorydata">hasMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16098">types.d.ts:16098</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="listmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory<wbr/>Data</span><a href="#listmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listMemoryData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#listmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all memory entries in the bucket, yielding id + data tuples
31
  for non-removed entries only.</p>
32
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding <code>{ memoryId, data }</code> tuples</p>
33
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#listmemorydata">listMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16120">types.d.ts:16120</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory<wbr/>Data</span><a href="#readmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a memory entry by id. Returns null if entry is missing or soft-deleted.</p>
34
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entry data, or null</p>
36
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#readmemorydata">readMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16091">types.d.ts:16091</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removememorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory<wbr/>Data</span><a href="#removememorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removememorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removememorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes a memory entry by writing <code>removed: true</code> flag.</p>
37
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
39
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#removememorydata">removeMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16113">types.d.ts:16113</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
40
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
42
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16084">types.d.ts:16084</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writememorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory<wbr/>Data</span><a href="#writememorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writememorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writememorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes a memory entry under the given id.</p>
43
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a></span><div class="tsd-comment tsd-typography"><p>Entry data to persist</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
46
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#writememorydata">writeMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16106">types.d.ts:16106</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucketname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a><a href="#signalid" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#hasmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Memory<wbr/>Data</span></a><a href="#listmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Memory<wbr/>Data</span></a><a href="#readmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Memory<wbr/>Data</span></a><a href="#removememorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Memory<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writememorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Memory<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
47
 
48
  <!-- Yandex.Metrika counter -->
49
  <script type="text/javascript">
 
9
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistMemoryInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-1&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;context-bucket&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeMemoryData</span><span class="hl-2">(</span><span class="hl-5">entryData</span><span class="hl-2">, </span><span class="hl-3">&quot;memory-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">data</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readMemoryData</span><span class="hl-2">(</span><span class="hl-3">&quot;memory-id-1&quot;</span><span class="hl-2">);</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistMemoryInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistMemoryInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16600">types.d.ts:16600</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#bucketname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a>
14
  <a href="types.PersistMemoryInstance.html#signalid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistMemoryInstance.html#dispose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a>
 
22
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistmemoryinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistMemoryInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistMemoryInstance.html" class="tsd-signature-type tsd-kind-class">PersistMemoryInstance</a><a href="#constructorpersistmemoryinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new memory persistence instance.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier (entity folder name)</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">bucketName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Bucket name (subfolder under memory/)</p>
25
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistMemoryInstance.html" class="tsd-signature-type tsd-kind-class">PersistMemoryInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16611">types.d.ts:16611</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucketname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket<wbr/>Name</span><a href="#bucketname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16602">types.d.ts:16602</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="signalid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>signal<wbr/>Id</span><a href="#signalid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16601">types.d.ts:16601</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
26
  Resource cleanup (memo cache invalidation) is handled by PersistMemoryUtils.dispose().</p>
27
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16662">types.d.ts:16662</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="hasmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has<wbr/>Memory<wbr/>Data</span><a href="#hasmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="hasmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">hasMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#hasmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Checks whether a memory entry exists on disk (regardless of removed flag).</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to true if entry file exists</p>
30
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#hasmemorydata">hasMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16632">types.d.ts:16632</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="listmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>list<wbr/>Memory<wbr/>Data</span><a href="#listmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="listmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listMemoryData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#listmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Iterates all memory entries in the bucket, yielding id + data tuples
31
  for non-removed entries only.</p>
32
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>AsyncGenerator yielding <code>{ memoryId, data }</code> tuples</p>
33
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#listmemorydata">listMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16654">types.d.ts:16654</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readmemorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Memory<wbr/>Data</span><a href="#readmemorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readmemorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readmemorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a memory entry by id. Returns null if entry is missing or soft-deleted.</p>
34
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to entry data, or null</p>
36
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#readmemorydata">readMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16625">types.d.ts:16625</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removememorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Memory<wbr/>Data</span><a href="#removememorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removememorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#removememorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Soft-deletes a memory entry by writing <code>removed: true</code> flag.</p>
37
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
38
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
39
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#removememorydata">removeMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16647">types.d.ts:16647</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
40
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
42
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16618">types.d.ts:16618</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writememorydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Memory<wbr/>Data</span><a href="#writememorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writememorydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeMemoryData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">memoryId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writememorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes a memory entry under the given id.</p>
43
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.MemoryData.html" class="tsd-signature-type tsd-kind-type-alias">MemoryData</a></span><div class="tsd-comment tsd-typography"><p>Entry data to persist</p>
44
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">memoryId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Memory entry identifier</p>
45
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
46
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistMemoryInstance.html">IPersistMemoryInstance</a>.<a href="../interfaces/types.IPersistMemoryInstance.html#writememorydata">writeMemoryData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16640">types.d.ts:16640</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucketname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a><a href="#signalid" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#hasmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has<wbr/>Memory<wbr/>Data</span></a><a href="#listmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Memory<wbr/>Data</span></a><a href="#readmemorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Memory<wbr/>Data</span></a><a href="#removememorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Memory<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writememorydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Memory<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
47
 
48
  <!-- Yandex.Metrika counter -->
49
  <script type="text/javascript">
classes/types.PersistNotificationInstance.html CHANGED
@@ -8,22 +8,22 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistNotificationInstance</span><span class="hl-2">(</span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeNotificationData</span><span class="hl-2">(</span><span class="hl-5">notifications</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readNotificationData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistNotificationInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistNotificationInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15311">types.d.ts:15311</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#readnotificationdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Notification<wbr/>Data</span></a>
14
  <a href="types.PersistNotificationInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistNotificationInstance.html#writenotificationdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Notification<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistnotificationinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistNotificationInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistNotificationInstance.html" class="tsd-signature-type tsd-kind-class">PersistNotificationInstance</a><a href="#constructorpersistnotificationinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new notification persistence instance.</p>
17
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode storage, false for live mode</p>
18
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistNotificationInstance.html" class="tsd-signature-type tsd-kind-class">PersistNotificationInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15320">types.d.ts:15320</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15312">types.d.ts:15312</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readnotificationdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Notification<wbr/>Data</span><a href="#readnotificationdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readnotificationdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readNotificationData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readnotificationdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted notifications by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of notification entries</p>
20
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#readnotificationdata">readNotificationData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15333">types.d.ts:15333</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15327">types.d.ts:15327</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writenotificationdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Notification<wbr/>Data</span><a href="#writenotificationdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writenotificationdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeNotificationData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notifications</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writenotificationdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes each notification as a separate entity keyed by <code>notification.id</code>.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notifications</span>: <a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a></span><div class="tsd-comment tsd-typography"><p>Notification entries to persist</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
26
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#writenotificationdata">writeNotificationData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15340">types.d.ts:15340</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readnotificationdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Notification<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writenotificationdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Notification<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
27
 
28
  <!-- Yandex.Metrika counter -->
29
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistNotificationInstance</span><span class="hl-2">(</span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeNotificationData</span><span class="hl-2">(</span><span class="hl-5">notifications</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readNotificationData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistNotificationInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistNotificationInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15845">types.d.ts:15845</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistNotificationInstance.html#readnotificationdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Notification<wbr/>Data</span></a>
14
  <a href="types.PersistNotificationInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistNotificationInstance.html#writenotificationdata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Notification<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistnotificationinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistNotificationInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistNotificationInstance.html" class="tsd-signature-type tsd-kind-class">PersistNotificationInstance</a><a href="#constructorpersistnotificationinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new notification persistence instance.</p>
17
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode storage, false for live mode</p>
18
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistNotificationInstance.html" class="tsd-signature-type tsd-kind-class">PersistNotificationInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15854">types.d.ts:15854</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15846">types.d.ts:15846</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readnotificationdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Notification<wbr/>Data</span><a href="#readnotificationdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readnotificationdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readNotificationData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readnotificationdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted notifications by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of notification entries</p>
20
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#readnotificationdata">readNotificationData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15867">types.d.ts:15867</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15861">types.d.ts:15861</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writenotificationdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Notification<wbr/>Data</span><a href="#writenotificationdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writenotificationdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeNotificationData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">notifications</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writenotificationdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes each notification as a separate entity keyed by <code>notification.id</code>.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">notifications</span>: <a href="../types/types.NotificationData.html" class="tsd-signature-type tsd-kind-type-alias">NotificationData</a></span><div class="tsd-comment tsd-typography"><p>Notification entries to persist</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
26
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistNotificationInstance.html">IPersistNotificationInstance</a>.<a href="../interfaces/types.IPersistNotificationInstance.html#writenotificationdata">writeNotificationData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15874">types.d.ts:15874</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readnotificationdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Notification<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writenotificationdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Notification<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
27
 
28
  <!-- Yandex.Metrika counter -->
29
  <script type="text/javascript">
classes/types.PersistPartialInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistPartialInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writePartialData</span><span class="hl-2">(</span><span class="hl-5">partialData</span><span class="hl-2">, </span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readPartialData</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistPartialInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistPartialInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14579">types.d.ts:14579</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistPartialInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistPartialInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistPartialInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistPartialInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -19,17 +19,17 @@
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistPartialInstance.html" class="tsd-signature-type tsd-kind-class">PersistPartialInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14592">types.d.ts:14592</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14582">types.d.ts:14582</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14581">types.d.ts:14581</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14580">types.d.ts:14580</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readpartialdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Partial<wbr/>Data</span><a href="#readpartialdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readpartialdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readPartialData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readpartialdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the partial data for the given signal using <code>signalId</code> as the entity key.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to partial data record (empty object if not found)</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#readpartialdata">readPartialData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14606">types.d.ts:14606</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14599">types.d.ts:14599</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writepartialdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Partial<wbr/>Data</span><a href="#writepartialdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writepartialdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writePartialData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writepartialdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the partial data for the given signal using <code>signalId</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a></span><div class="tsd-comment tsd-typography"><p>Partial data record to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
32
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#writepartialdata">writePartialData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14615">types.d.ts:14615</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readpartialdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Partial<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writepartialdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Partial<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
33
 
34
  <!-- Yandex.Metrika counter -->
35
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistPartialInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writePartialData</span><span class="hl-2">(</span><span class="hl-5">partialData</span><span class="hl-2">, </span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readPartialData</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-id-1&quot;</span><span class="hl-2">);</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistPartialInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistPartialInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15113">types.d.ts:15113</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistPartialInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistPartialInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistPartialInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistPartialInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistPartialInstance.html" class="tsd-signature-type tsd-kind-class">PersistPartialInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15126">types.d.ts:15126</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15116">types.d.ts:15116</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15115">types.d.ts:15115</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15114">types.d.ts:15114</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readpartialdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Partial<wbr/>Data</span><a href="#readpartialdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readpartialdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readPartialData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readpartialdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the partial data for the given signal using <code>signalId</code> as the entity key.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to partial data record (empty object if not found)</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#readpartialdata">readPartialData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15140">types.d.ts:15140</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15133">types.d.ts:15133</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writepartialdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Partial<wbr/>Data</span><a href="#writepartialdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writepartialdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writePartialData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writepartialdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the partial data for the given signal using <code>signalId</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.PartialData.html" class="tsd-signature-type tsd-kind-type-alias">PartialData</a></span><div class="tsd-comment tsd-typography"><p>Partial data record to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
31
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
32
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistPartialInstance.html">IPersistPartialInstance</a>.<a href="../interfaces/types.IPersistPartialInstance.html#writepartialdata">writePartialData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15149">types.d.ts:15149</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readpartialdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Partial<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writepartialdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Partial<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
33
 
34
  <!-- Yandex.Metrika counter -->
35
  <script type="text/javascript">
classes/types.PersistRecentInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistRecentInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">, </span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeRecentData</span><span class="hl-2">(</span><span class="hl-5">publicSignalRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">recent</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readRecentData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistRecentInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistRecentInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16321">types.d.ts:16321</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistRecentInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistRecentInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  <a href="types.PersistRecentInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
14
  <a href="types.PersistRecentInstance.html#framename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a>
@@ -23,15 +23,15 @@
23
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frameName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Frame identifier (may be empty for live mode)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode, false for live mode</p>
26
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistRecentInstance.html" class="tsd-signature-type tsd-kind-class">PersistRecentInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16338">types.d.ts:16338</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16326">types.d.ts:16326</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16324">types.d.ts:16324</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="framename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>frame<wbr/>Name</span><a href="#framename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16325">types.d.ts:16325</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16323">types.d.ts:16323</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16322">types.d.ts:16322</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readrecentdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Recent<wbr/>Data</span><a href="#readrecentdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readrecentdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readRecentData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readrecentdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted recent signal using <code>symbol</code> as the entity key.</p>
27
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to recent signal or null if not found</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#readrecentdata">readRecentData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16351">types.d.ts:16351</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
31
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16345">types.d.ts:16345</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writerecentdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Recent<wbr/>Data</span><a href="#writerecentdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writerecentdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeRecentData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalRow</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writerecentdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the recent signal using <code>symbol</code> as the entity key.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalRow</span>: <a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a></span><div class="tsd-comment tsd-typography"><p>Recent signal data to persist</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
34
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#writerecentdata">writeRecentData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16358">types.d.ts:16358</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#framename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readrecentdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Recent<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writerecentdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Recent<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
35
 
36
  <!-- Yandex.Metrika counter -->
37
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistRecentInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">, </span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeRecentData</span><span class="hl-2">(</span><span class="hl-5">publicSignalRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">recent</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readRecentData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistRecentInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistRecentInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16855">types.d.ts:16855</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistRecentInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistRecentInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  <a href="types.PersistRecentInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
14
  <a href="types.PersistRecentInstance.html#framename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a>
 
23
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frameName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Frame identifier (may be empty for live mode)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode, false for live mode</p>
26
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistRecentInstance.html" class="tsd-signature-type tsd-kind-class">PersistRecentInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16872">types.d.ts:16872</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16860">types.d.ts:16860</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16858">types.d.ts:16858</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="framename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>frame<wbr/>Name</span><a href="#framename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16859">types.d.ts:16859</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16857">types.d.ts:16857</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16856">types.d.ts:16856</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readrecentdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Recent<wbr/>Data</span><a href="#readrecentdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readrecentdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readRecentData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readrecentdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted recent signal using <code>symbol</code> as the entity key.</p>
27
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to recent signal or null if not found</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#readrecentdata">readRecentData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16885">types.d.ts:16885</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
31
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16879">types.d.ts:16879</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writerecentdata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Recent<wbr/>Data</span><a href="#writerecentdata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writerecentdata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeRecentData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalRow</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writerecentdata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the recent signal using <code>symbol</code> as the entity key.</p>
32
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalRow</span>: <a href="../interfaces/types.IPublicSignalRow.html" class="tsd-signature-type tsd-kind-interface">IPublicSignalRow</a></span><div class="tsd-comment tsd-typography"><p>Recent signal data to persist</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
34
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRecentInstance.html">IPersistRecentInstance</a>.<a href="../interfaces/types.IPersistRecentInstance.html#writerecentdata">writeRecentData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L16892">types.d.ts:16892</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#framename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readrecentdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Recent<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writerecentdata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Recent<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
35
 
36
  <!-- Yandex.Metrika counter -->
37
  <script type="text/javascript">
classes/types.PersistRiskInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistRiskInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-risk&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writePositionData</span><span class="hl-2">([[</span><span class="hl-3">&quot;strategy:BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-5">positionData</span><span class="hl-2">]]);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">positions</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readPositionData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistRiskInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistRiskInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14034">types.d.ts:14034</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistRiskInstance.html#riskname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>risk<wbr/>Name</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#readpositiondata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Position<wbr/>Data</span></a>
@@ -17,15 +17,15 @@
17
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistriskinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistRiskInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">riskName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistRiskInstance.html" class="tsd-signature-type tsd-kind-class">PersistRiskInstance</a><a href="#constructorpersistriskinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new risk positions persistence instance.</p>
18
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">riskName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Risk profile identifier</p>
19
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
20
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistRiskInstance.html" class="tsd-signature-type tsd-kind-class">PersistRiskInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14047">types.d.ts:14047</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14036">types.d.ts:14036</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="riskname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>risk<wbr/>Name</span><a href="#riskname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">riskName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14035">types.d.ts:14035</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readpositiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Position<wbr/>Data</span><a href="#readpositiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readpositiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readPositionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readpositiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted positions array using the fixed STORAGE_KEY.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to positions (empty array if none persisted)</p>
22
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#readpositiondata">readPositionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14060">types.d.ts:14060</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14054">types.d.ts:14054</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writepositiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Position<wbr/>Data</span><a href="#writepositiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writepositiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writePositionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">riskRow</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writepositiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the positions array using the fixed STORAGE_KEY.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">riskRow</span>: <a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a></span><div class="tsd-comment tsd-typography"><p>Position entries to persist</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#writepositiondata">writePositionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14068">types.d.ts:14068</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#riskname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>risk<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readpositiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Position<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writepositiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Position<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
29
 
30
  <!-- Yandex.Metrika counter -->
31
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistRiskInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-risk&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writePositionData</span><span class="hl-2">([[</span><span class="hl-3">&quot;strategy:BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-5">positionData</span><span class="hl-2">]]);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">positions</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readPositionData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistRiskInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistRiskInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14556">types.d.ts:14556</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistRiskInstance.html#riskname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>risk<wbr/>Name</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistRiskInstance.html#readpositiondata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Position<wbr/>Data</span></a>
 
17
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersistriskinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistRiskInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">riskName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistRiskInstance.html" class="tsd-signature-type tsd-kind-class">PersistRiskInstance</a><a href="#constructorpersistriskinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new risk positions persistence instance.</p>
18
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">riskName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Risk profile identifier</p>
19
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
20
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistRiskInstance.html" class="tsd-signature-type tsd-kind-class">PersistRiskInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14569">types.d.ts:14569</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14558">types.d.ts:14558</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="riskname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>risk<wbr/>Name</span><a href="#riskname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">riskName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14557">types.d.ts:14557</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readpositiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Position<wbr/>Data</span><a href="#readpositiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readpositiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readPositionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readpositiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted positions array using the fixed STORAGE_KEY.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to positions (empty array if none persisted)</p>
22
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#readpositiondata">readPositionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14582">types.d.ts:14582</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
23
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
24
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14576">types.d.ts:14576</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writepositiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Position<wbr/>Data</span><a href="#writepositiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writepositiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writePositionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">riskRow</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writepositiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the positions array using the fixed STORAGE_KEY.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">riskRow</span>: <a href="../types/types.RiskData.html" class="tsd-signature-type tsd-kind-type-alias">RiskData</a></span><div class="tsd-comment tsd-typography"><p>Position entries to persist</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistRiskInstance.html">IPersistRiskInstance</a>.<a href="../interfaces/types.IPersistRiskInstance.html#writepositiondata">writePositionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14590">types.d.ts:14590</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#riskname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>risk<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readpositiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Position<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writepositiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Position<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
29
 
30
  <!-- Yandex.Metrika counter -->
31
  <script type="text/javascript">
classes/types.PersistScheduleInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistScheduleInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeScheduleData</span><span class="hl-2">(</span><span class="hl-5">scheduledRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readScheduleData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistScheduleInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistScheduleInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14205">types.d.ts:14205</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistScheduleInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistScheduleInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistScheduleInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistScheduleInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -19,15 +19,15 @@
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistScheduleInstance.html" class="tsd-signature-type tsd-kind-class">PersistScheduleInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14218">types.d.ts:14218</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14208">types.d.ts:14208</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14207">types.d.ts:14207</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14206">types.d.ts:14206</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readscheduledata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Schedule<wbr/>Data</span><a href="#readscheduledata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readscheduledata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readScheduleData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readscheduledata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted scheduled signal using <code>symbol</code> as the entity key.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to scheduled signal or null if not found</p>
24
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#readscheduledata">readScheduleData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14231">types.d.ts:14231</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
27
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14225">types.d.ts:14225</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writescheduledata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Schedule<wbr/>Data</span><a href="#writescheduledata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writescheduledata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeScheduleData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">row</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writescheduledata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the scheduled signal (or null to clear) using <code>symbol</code> as the entity key.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">row</span>: <a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a></span><div class="tsd-comment tsd-typography"><p>Scheduled signal data to persist, or null to clear</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
30
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#writescheduledata">writeScheduleData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14238">types.d.ts:14238</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readscheduledata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Schedule<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writescheduledata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Schedule<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
31
 
32
  <!-- Yandex.Metrika counter -->
33
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistScheduleInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeScheduleData</span><span class="hl-2">(</span><span class="hl-5">scheduledRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readScheduleData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistScheduleInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistScheduleInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14727">types.d.ts:14727</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistScheduleInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistScheduleInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistScheduleInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistScheduleInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistScheduleInstance.html" class="tsd-signature-type tsd-kind-class">PersistScheduleInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14740">types.d.ts:14740</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14730">types.d.ts:14730</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14729">types.d.ts:14729</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14728">types.d.ts:14728</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readscheduledata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Schedule<wbr/>Data</span><a href="#readscheduledata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readscheduledata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readScheduleData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readscheduledata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted scheduled signal using <code>symbol</code> as the entity key.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to scheduled signal or null if not found</p>
24
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#readscheduledata">readScheduleData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14753">types.d.ts:14753</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
27
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14747">types.d.ts:14747</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writescheduledata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Schedule<wbr/>Data</span><a href="#writescheduledata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writescheduledata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeScheduleData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">row</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writescheduledata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the scheduled signal (or null to clear) using <code>symbol</code> as the entity key.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">row</span>: <a href="../interfaces/types.IScheduledSignalRow.html" class="tsd-signature-type tsd-kind-interface">IScheduledSignalRow</a></span><div class="tsd-comment tsd-typography"><p>Scheduled signal data to persist, or null to clear</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
30
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistScheduleInstance.html">IPersistScheduleInstance</a>.<a href="../interfaces/types.IPersistScheduleInstance.html#writescheduledata">writeScheduleData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14760">types.d.ts:14760</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readscheduledata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Schedule<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writescheduledata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Schedule<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
31
 
32
  <!-- Yandex.Metrika counter -->
33
  <script type="text/javascript">
classes/types.PersistSessionInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistSessionInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeSessionData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> { </span><span class="hl-5">session:</span><span class="hl-2"> </span><span class="hl-3">&quot;state&quot;</span><span class="hl-2"> } });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">session</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readSessionData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistSessionInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistSessionInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16701">types.d.ts:16701</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistSessionInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistSessionInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistSessionInstance.html#framename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a>
14
  <a href="types.PersistSessionInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
@@ -20,17 +20,17 @@
20
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frameName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Frame identifier (also used as entity ID)</p>
23
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistSessionInstance.html" class="tsd-signature-type tsd-kind-class">PersistSessionInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16714">types.d.ts:16714</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16703">types.d.ts:16703</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="framename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>frame<wbr/>Name</span><a href="#framename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16704">types.d.ts:16704</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16702">types.d.ts:16702</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
24
  Resource cleanup (memo cache invalidation) is handled by PersistSessionUtils.dispose().</p>
25
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16739">types.d.ts:16739</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readsessiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Session<wbr/>Data</span><a href="#readsessiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readsessiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readSessionData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readsessiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted session data using <code>frameName</code> as the entity key.</p>
26
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to session data or null if not found</p>
27
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#readsessiondata">readSessionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16727">types.d.ts:16727</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
30
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16721">types.d.ts:16721</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writesessiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Session<wbr/>Data</span><a href="#writesessiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writesessiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeSessionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writesessiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the session data using <code>frameName</code> as the entity key.</p>
31
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a></span><div class="tsd-comment tsd-typography"><p>Session data to persist</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
33
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#writesessiondata">writeSessionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16734">types.d.ts:16734</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#framename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#readsessiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Session<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writesessiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Session<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
34
 
35
  <!-- Yandex.Metrika counter -->
36
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistSessionInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeSessionData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;frame-1&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> { </span><span class="hl-5">session:</span><span class="hl-2"> </span><span class="hl-3">&quot;state&quot;</span><span class="hl-2"> } });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">session</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readSessionData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistSessionInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistSessionInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17235">types.d.ts:17235</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistSessionInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistSessionInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistSessionInstance.html#framename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a>
14
  <a href="types.PersistSessionInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
 
20
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">frameName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Frame identifier (also used as entity ID)</p>
23
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistSessionInstance.html" class="tsd-signature-type tsd-kind-class">PersistSessionInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17248">types.d.ts:17248</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17237">types.d.ts:17237</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="framename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>frame<wbr/>Name</span><a href="#framename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">frameName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17238">types.d.ts:17238</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17236">types.d.ts:17236</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
24
  Resource cleanup (memo cache invalidation) is handled by PersistSessionUtils.dispose().</p>
25
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17273">types.d.ts:17273</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readsessiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Session<wbr/>Data</span><a href="#readsessiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readsessiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readSessionData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readsessiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted session data using <code>frameName</code> as the entity key.</p>
26
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to session data or null if not found</p>
27
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#readsessiondata">readSessionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17261">types.d.ts:17261</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
30
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17255">types.d.ts:17255</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writesessiondata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Session<wbr/>Data</span><a href="#writesessiondata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writesessiondata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeSessionData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writesessiondata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the session data using <code>frameName</code> as the entity key.</p>
31
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.SessionData.html" class="tsd-signature-type tsd-kind-type-alias">SessionData</a></span><div class="tsd-comment tsd-typography"><p>Session data to persist</p>
32
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
33
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSessionInstance.html">IPersistSessionInstance</a>.<a href="../interfaces/types.IPersistSessionInstance.html#writesessiondata">writeSessionData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17268">types.d.ts:17268</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#framename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>frame<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#readsessiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Session<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writesessiondata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Session<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
34
 
35
  <!-- Yandex.Metrika counter -->
36
  <script type="text/javascript">
classes/types.PersistSignalInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistSignalInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeSignalData</span><span class="hl-2">(</span><span class="hl-5">signalRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readSignalData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistSignalInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistSignalInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13861">types.d.ts:13861</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistSignalInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistSignalInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistSignalInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistSignalInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -19,16 +19,16 @@
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistSignalInstance.html" class="tsd-signature-type tsd-kind-class">PersistSignalInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13874">types.d.ts:13874</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13864">types.d.ts:13864</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13863">types.d.ts:13863</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13862">types.d.ts:13862</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readsignaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Signal<wbr/>Data</span><a href="#readsignaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readsignaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readSignalData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readsignaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted signal using <code>symbol</code> as the entity key.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to the signal or null if not found</p>
24
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#readsignaldata">readSignalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13888">types.d.ts:13888</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.
25
  Delegates to PersistBase.waitForInit which uses singleshot.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13882">types.d.ts:13882</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writesignaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Signal<wbr/>Data</span><a href="#writesignaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writesignaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeSignalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalRow</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writesignaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the signal (or null to clear) using <code>symbol</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalRow</span>: <a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a></span><div class="tsd-comment tsd-typography"><p>Signal data to persist, or null to clear</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
31
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#writesignaldata">writeSignalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L13895">types.d.ts:13895</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readsignaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Signal<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writesignaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Signal<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
32
 
33
  <!-- Yandex.Metrika counter -->
34
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistSignalInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeSignalData</span><span class="hl-2">(</span><span class="hl-5">signalRow</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readSignalData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistSignalInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistSignalInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14383">types.d.ts:14383</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistSignalInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistSignalInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistSignalInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistSignalInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistSignalInstance.html" class="tsd-signature-type tsd-kind-class">PersistSignalInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14396">types.d.ts:14396</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14386">types.d.ts:14386</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14385">types.d.ts:14385</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14384">types.d.ts:14384</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readsignaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Signal<wbr/>Data</span><a href="#readsignaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readsignaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readSignalData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">&gt;</span><a href="#readsignaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted signal using <code>symbol</code> as the entity key.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to the signal or null if not found</p>
24
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#readsignaldata">readSignalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14410">types.d.ts:14410</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.
25
  Delegates to PersistBase.waitForInit which uses singleshot.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14404">types.d.ts:14404</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writesignaldata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Signal<wbr/>Data</span><a href="#writesignaldata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writesignaldata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeSignalData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalRow</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writesignaldata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the signal (or null to clear) using <code>symbol</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalRow</span>: <a href="../interfaces/types.ISignalRow.html" class="tsd-signature-type tsd-kind-interface">ISignalRow</a></span><div class="tsd-comment tsd-typography"><p>Signal data to persist, or null to clear</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
31
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistSignalInstance.html">IPersistSignalInstance</a>.<a href="../interfaces/types.IPersistSignalInstance.html#writesignaldata">writeSignalData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14417">types.d.ts:14417</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readsignaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Signal<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writesignaldata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Signal<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
32
 
33
  <!-- Yandex.Metrika counter -->
34
  <script type="text/javascript">
classes/types.PersistStateInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStateInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-1&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;counter&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStateData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;counter&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> { </span><span class="hl-5">count:</span><span class="hl-2"> </span><span class="hl-8">1</span><span class="hl-2"> } });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">state</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStateData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStateInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStateInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16511">types.d.ts:16511</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#bucketname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a>
13
  <a href="types.PersistStateInstance.html#signalid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#dispose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a>
@@ -18,17 +18,17 @@
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersiststateinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistStateInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistStateInstance.html" class="tsd-signature-type tsd-kind-class">PersistStateInstance</a><a href="#constructorpersiststateinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new state persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier (folder name under state/)</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">bucketName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Bucket name (file name)</p>
21
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStateInstance.html" class="tsd-signature-type tsd-kind-class">PersistStateInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16522">types.d.ts:16522</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucketname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket<wbr/>Name</span><a href="#bucketname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16513">types.d.ts:16513</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="signalid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>signal<wbr/>Id</span><a href="#signalid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16512">types.d.ts:16512</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
22
  Resource cleanup (memo cache invalidation) is handled by PersistStateUtils.dispose().</p>
23
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16547">types.d.ts:16547</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readstatedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>State<wbr/>Data</span><a href="#readstatedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstatedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStateData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstatedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted state using <code>bucketName</code> as the entity key.</p>
24
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to state data or null if not found</p>
25
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#readstatedata">readStateData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16535">types.d.ts:16535</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16529">types.d.ts:16529</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestatedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>State<wbr/>Data</span><a href="#writestatedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestatedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStateData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestatedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the state using <code>bucketName</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a></span><div class="tsd-comment tsd-typography"><p>State data to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
31
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#writestatedata">writeStateData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L16542">types.d.ts:16542</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucketname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a><a href="#signalid" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#readstatedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>State<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestatedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>State<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
32
 
33
  <!-- Yandex.Metrika counter -->
34
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStateInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;signal-1&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;counter&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStateData</span><span class="hl-2">({ </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;counter&quot;</span><span class="hl-2">, </span><span class="hl-5">data:</span><span class="hl-2"> { </span><span class="hl-5">count:</span><span class="hl-2"> </span><span class="hl-8">1</span><span class="hl-2"> } });</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">state</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStateData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStateInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStateInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17045">types.d.ts:17045</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#bucketname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a>
13
  <a href="types.PersistStateInstance.html#signalid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a>
14
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistStateInstance.html#dispose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a>
 
18
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersiststateinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistStateInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistStateInstance.html" class="tsd-signature-type tsd-kind-class">PersistStateInstance</a><a href="#constructorpersiststateinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new state persistence instance.</p>
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier (folder name under state/)</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">bucketName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Bucket name (file name)</p>
21
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStateInstance.html" class="tsd-signature-type tsd-kind-class">PersistStateInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17056">types.d.ts:17056</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bucketname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>bucket<wbr/>Name</span><a href="#bucketname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17047">types.d.ts:17047</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="signalid" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>signal<wbr/>Id</span><a href="#signalid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17046">types.d.ts:17046</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose</span><a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="dispose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispose</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#dispose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>No-op for the default file-based implementation.
22
  Resource cleanup (memo cache invalidation) is handled by PersistStateUtils.dispose().</p>
23
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#dispose">dispose</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17081">types.d.ts:17081</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="readstatedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>State<wbr/>Data</span><a href="#readstatedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstatedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStateData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstatedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted state using <code>bucketName</code> as the entity key.</p>
24
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to state data or null if not found</p>
25
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#readstatedata">readStateData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17069">types.d.ts:17069</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
26
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
27
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
28
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17063">types.d.ts:17063</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestatedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>State<wbr/>Data</span><a href="#writestatedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestatedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStateData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">_when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestatedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the state using <code>bucketName</code> as the entity key.</p>
29
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a href="../types/types.StateData.html" class="tsd-signature-type tsd-kind-type-alias">StateData</a></span><div class="tsd-comment tsd-typography"><p>State data to persist</p>
30
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">_when</span>: <span class="tsd-signature-type">Date</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
31
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStateInstance.html">IPersistStateInstance</a>.<a href="../interfaces/types.IPersistStateInstance.html#writestatedata">writeStateData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17076">types.d.ts:17076</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bucketname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bucket<wbr/>Name</span></a><a href="#signalid" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signal<wbr/>Id</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#dispose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispose</span></a><a href="#readstatedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>State<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestatedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>State<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
32
 
33
  <!-- Yandex.Metrika counter -->
34
  <script type="text/javascript">
classes/types.PersistStorageInstance.html CHANGED
@@ -8,22 +8,22 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStorageInstance</span><span class="hl-2">(</span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStorageData</span><span class="hl-2">(</span><span class="hl-5">signals</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStorageData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStorageInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStorageInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15156">types.d.ts:15156</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#readstoragedata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Storage<wbr/>Data</span></a>
14
  <a href="types.PersistStorageInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistStorageInstance.html#writestoragedata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Storage<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersiststorageinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistStorageInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistStorageInstance.html" class="tsd-signature-type tsd-kind-class">PersistStorageInstance</a><a href="#constructorpersiststorageinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new signal storage persistence instance.</p>
17
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode storage, false for live mode</p>
18
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStorageInstance.html" class="tsd-signature-type tsd-kind-class">PersistStorageInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15165">types.d.ts:15165</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15157">types.d.ts:15157</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readstoragedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Storage<wbr/>Data</span><a href="#readstoragedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstoragedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStorageData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstoragedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted signals by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of signal entries</p>
20
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#readstoragedata">readStorageData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15178">types.d.ts:15178</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15172">types.d.ts:15172</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestoragedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Storage<wbr/>Data</span><a href="#writestoragedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestoragedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStorageData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signals</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestoragedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes each signal as a separate entity keyed by <code>signal.id</code>.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signals</span>: <a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a></span><div class="tsd-comment tsd-typography"><p>Signal entries to persist</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
26
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#writestoragedata">writeStorageData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L15185">types.d.ts:15185</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readstoragedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Storage<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestoragedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Storage<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
27
 
28
  <!-- Yandex.Metrika counter -->
29
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStorageInstance</span><span class="hl-2">(</span><span class="hl-4">false</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStorageData</span><span class="hl-2">(</span><span class="hl-5">signals</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">all</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStorageData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStorageInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStorageInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15690">types.d.ts:15690</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#backtest" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a>
13
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.PersistStorageInstance.html#readstoragedata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Storage<wbr/>Data</span></a>
14
  <a href="types.PersistStorageInstance.html#waitforinit" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a>
15
  <a href="types.PersistStorageInstance.html#writestoragedata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Storage<wbr/>Data</span></a>
16
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorpersiststorageinstance" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">PersistStorageInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.PersistStorageInstance.html" class="tsd-signature-type tsd-kind-class">PersistStorageInstance</a><a href="#constructorpersiststorageinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates new signal storage persistence instance.</p>
17
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">backtest</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>True for backtest mode storage, false for live mode</p>
18
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStorageInstance.html" class="tsd-signature-type tsd-kind-class">PersistStorageInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15699">types.d.ts:15699</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="backtest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>backtest</span><a href="#backtest" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">backtest</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15691">types.d.ts:15691</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readstoragedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Storage<wbr/>Data</span><a href="#readstoragedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstoragedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStorageData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstoragedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads all persisted signals by iterating storage keys.</p>
19
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to array of signal entries</p>
20
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#readstoragedata">readStorageData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15712">types.d.ts:15712</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
21
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
22
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
23
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15706">types.d.ts:15706</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestoragedata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Storage<wbr/>Data</span><a href="#writestoragedata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestoragedata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStorageData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signals</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestoragedata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes each signal as a separate entity keyed by <code>signal.id</code>.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signals</span>: <a href="../types/types.StorageData.html" class="tsd-signature-type tsd-kind-type-alias">StorageData</a></span><div class="tsd-comment tsd-typography"><p>Signal entries to persist</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when all writes are complete</p>
26
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStorageInstance.html">IPersistStorageInstance</a>.<a href="../interfaces/types.IPersistStorageInstance.html#writestoragedata">writeStorageData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L15719">types.d.ts:15719</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#backtest" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>backtest</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readstoragedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Storage<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestoragedata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Storage<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
27
 
28
  <!-- Yandex.Metrika counter -->
29
  <script type="text/javascript">
classes/types.PersistStrategyInstance.html CHANGED
@@ -8,7 +8,7 @@
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStrategyInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStrategyData</span><span class="hl-2">(</span><span class="hl-5">snapshot</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStrategyData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStrategyInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStrategyInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14399">types.d.ts:14399</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStrategyInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStrategyInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistStrategyInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistStrategyInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
@@ -19,15 +19,15 @@
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStrategyInstance.html" class="tsd-signature-type tsd-kind-class">PersistStrategyInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14414">types.d.ts:14414</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14402">types.d.ts:14402</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14401">types.d.ts:14401</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14400">types.d.ts:14400</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readstrategydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Strategy<wbr/>Data</span><a href="#readstrategydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstrategydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStrategyData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstrategydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted strategy state snapshot using the fixed STORAGE_KEY.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to strategy state snapshot or null if not found</p>
24
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#readstrategydata">readStrategyData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14427">types.d.ts:14427</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
27
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14421">types.d.ts:14421</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestrategydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Strategy<wbr/>Data</span><a href="#writestrategydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestrategydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStrategyData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">row</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestrategydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the strategy state snapshot (or null to clear) using the fixed STORAGE_KEY.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">row</span>: <a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a></span><div class="tsd-comment tsd-typography"><p>Strategy state snapshot to persist, or null to clear</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
30
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#writestrategydata">writeStrategyData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L14434">types.d.ts:14434</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readstrategydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Strategy<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestrategydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Strategy<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
31
 
32
  <!-- Yandex.Metrika counter -->
33
  <script type="text/javascript">
 
8
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">instance</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">PersistStrategyInstance</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;my-strategy&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;binance&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">waitForInit</span><span class="hl-2">(</span><span class="hl-4">true</span><span class="hl-2">);</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">writeStrategyData</span><span class="hl-2">(</span><span class="hl-5">snapshot</span><span class="hl-2">);</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">restored</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">instance</span><span class="hl-2">.</span><span class="hl-1">readStrategyData</span><span class="hl-2">();</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/types.IPersistStrategyInstance.html" class="tsd-signature-type tsd-kind-interface">IPersistStrategyInstance</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14933">types.d.ts:14933</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.PersistStrategyInstance.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
12
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.PersistStrategyInstance.html#exchangename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a>
13
  <a href="types.PersistStrategyInstance.html#strategyname" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a>
14
  <a href="types.PersistStrategyInstance.html#symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a>
 
19
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">symbol</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Trading pair symbol</p>
20
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">strategyName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Strategy identifier</p>
21
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">exchangeName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Exchange identifier</p>
22
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.PersistStrategyInstance.html" class="tsd-signature-type tsd-kind-class">PersistStrategyInstance</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14948">types.d.ts:14948</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="exchangename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>exchange<wbr/>Name</span><a href="#exchangename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">exchangeName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14936">types.d.ts:14936</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="strategyname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>strategy<wbr/>Name</span><a href="#strategyname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">strategyName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14935">types.d.ts:14935</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>symbol</span><a href="#symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14934">types.d.ts:14934</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="readstrategydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read<wbr/>Strategy<wbr/>Data</span><a href="#readstrategydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="readstrategydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">readStrategyData</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">&gt;</span><a href="#readstrategydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads the persisted strategy state snapshot using the fixed STORAGE_KEY.</p>
23
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise resolving to strategy state snapshot or null if not found</p>
24
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#readstrategydata">readStrategyData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14961">types.d.ts:14961</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the underlying PersistBase storage.</p>
25
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
26
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
27
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#waitforinit">waitForInit</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14955">types.d.ts:14955</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="writestrategydata" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write<wbr/>Strategy<wbr/>Data</span><a href="#writestrategydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="writestrategydata-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">writeStrategyData</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">row</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#writestrategydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes the strategy state snapshot (or null to clear) using the fixed STORAGE_KEY.</p>
28
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">row</span>: <a href="../types/types.StrategyData.html" class="tsd-signature-type tsd-kind-type-alias">StrategyData</a></span><div class="tsd-comment tsd-typography"><p>Strategy state snapshot to persist, or null to clear</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when write is complete</p>
30
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/types.IPersistStrategyInstance.html">IPersistStrategyInstance</a>.<a href="../interfaces/types.IPersistStrategyInstance.html#writestrategydata">writeStrategyData</a></p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L14968">types.d.ts:14968</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#exchangename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>exchange<wbr/>Name</span></a><a href="#strategyname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>strategy<wbr/>Name</span></a><a href="#symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>symbol</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#readstrategydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read<wbr/>Strategy<wbr/>Data</span></a><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#writestrategydata" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write<wbr/>Strategy<wbr/>Data</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
31
 
32
  <!-- Yandex.Metrika counter -->
33
  <script type="text/javascript">
classes/types.Position.html CHANGED
@@ -1,6 +1,6 @@
1
  <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="../modules/types.html">types</a></li><li><a href="types.Position.html">Position</a></li></ul><h1>Class Position</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Utilities for calculating take profit and stop loss price levels.
2
  Automatically inverts direction based on position type (long/short).</p>
3
- </div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L22529">types.d.ts:22529</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.Position.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
4
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.Position.html#bracket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bracket</span></a>
5
  <a href="types.Position.html#moonbag" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>moonbag</span></a>
6
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorposition" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">Position</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.Position.html" class="tsd-signature-type tsd-kind-class">Position</a><a href="#constructorposition" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.Position.html" class="tsd-signature-type tsd-kind-class">Position</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bracket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>bracket</span><a href="#bracket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bracket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Calculates levels for a bracket order with custom TP and SL.</p>
@@ -9,12 +9,12 @@ Automatically inverts direction based on position type (long/short).</p>
9
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">percentTakeProfit</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>take profit percentage from 0 to 100</p>
10
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span></h5><div class="tsd-comment tsd-typography"><p>position type: &quot;long&quot; or &quot;short&quot;</p>
11
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></h4><p>priceTakeProfit and priceStopLoss in fiat</p>
12
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L22554">types.d.ts:22554</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="moonbag" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>moonbag</span><a href="#moonbag" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">moonbag</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Calculates levels for the &quot;moonbag&quot; strategy — fixed TP at 50% from the current price.</p>
13
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>current asset price</p>
14
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>stop loss percentage from 0 to 100</p>
15
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span></h5><div class="tsd-comment tsd-typography"><p>position type: &quot;long&quot; or &quot;short&quot;</p>
16
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></h4><p>priceTakeProfit and priceStopLoss in fiat</p>
17
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L22537">types.d.ts:22537</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bracket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bracket</span></a><a href="#moonbag" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>moonbag</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
18
 
19
  <!-- Yandex.Metrika counter -->
20
  <script type="text/javascript">
 
1
  <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Position | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="../modules/types.html">types</a></li><li><a href="types.Position.html">Position</a></li></ul><h1>Class Position</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Utilities for calculating take profit and stop loss price levels.
2
  Automatically inverts direction based on position type (long/short).</p>
3
+ </div><div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L23153">types.d.ts:23153</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.Position.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
4
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.Position.html#bracket" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bracket</span></a>
5
  <a href="types.Position.html#moonbag" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>moonbag</span></a>
6
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorposition" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">Position</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.Position.html" class="tsd-signature-type tsd-kind-class">Position</a><a href="#constructorposition" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.Position.html" class="tsd-signature-type tsd-kind-class">Position</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="bracket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>bracket</span><a href="#bracket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">bracket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Calculates levels for a bracket order with custom TP and SL.</p>
 
9
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">percentTakeProfit</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>take profit percentage from 0 to 100</p>
10
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span></h5><div class="tsd-comment tsd-typography"><p>position type: &quot;long&quot; or &quot;short&quot;</p>
11
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></h4><p>priceTakeProfit and priceStopLoss in fiat</p>
12
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L23178">types.d.ts:23178</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="moonbag" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>moonbag</span><a href="#moonbag" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">moonbag</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Calculates levels for the &quot;moonbag&quot; strategy — fixed TP at 50% from the current price.</p>
13
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span><br/>    <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">currentPrice</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>current asset price</p>
14
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">percentStopLoss</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><p>stop loss percentage from 0 to 100</p>
15
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span></h5><div class="tsd-comment tsd-typography"><p>position type: &quot;long&quot; or &quot;short&quot;</p>
16
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">position</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;long&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;short&quot;</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceStopLoss</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">priceTakeProfit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span></h4><p>priceTakeProfit and priceStopLoss in fiat</p>
17
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L23161">types.d.ts:23161</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#bracket" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>bracket</span></a><a href="#moonbag" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>moonbag</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
18
 
19
  <!-- Yandex.Metrika counter -->
20
  <script type="text/javascript">
classes/types.ReportBase.html CHANGED
@@ -11,7 +11,7 @@
11
  <p>File format: ./dump/report/{reportName}.jsonl
12
  Each line contains: reportName, data, metadata, timestamp</p>
13
  <p>Use this adapter for event logging and post-processing analytics.</p>
14
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TReportBase.html" class="tsd-signature-type tsd-kind-type-alias">TReportBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17197">types.d.ts:17197</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.ReportBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.ReportBase.html#_filepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a>
16
  <a href="types.ReportBase.html#_stream" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a>
17
  <a href="types.ReportBase.html#wait_for_init_symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a>
@@ -23,19 +23,19 @@ Each line contains: reportName, data, metadata, timestamp</p>
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorreportbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">ReportBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">reportName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">baseDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.ReportBase.html" class="tsd-signature-type tsd-kind-class">ReportBase</a><a href="#constructorreportbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new JSONL report adapter instance.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">reportName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of report (backtest, live, walker, etc.)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">baseDir</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base directory for report files, defaults to ./dump/report</p>
26
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.ReportBase.html" class="tsd-signature-type tsd-kind-class">ReportBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17210">types.d.ts:17210</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_filepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_file<wbr/>Path</span><a href="#_filepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_filePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Absolute path to the JSONL file for this report type</p>
27
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17201">types.d.ts:17201</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_stream</span><a href="#_stream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WriteStream</span></div><div class="tsd-comment tsd-typography"><p>WriteStream instance for append-only writes, null until initialized</p>
28
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17203">types.d.ts:17203</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Singleshot initialization function that creates directory and stream.
29
  Protected by singleshot to ensure one-time execution.
30
  Sets up error handler that emits to exitEmitter.</p>
31
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17216">types.d.ts:17216</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="write_safe_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span><a href="#write_safe_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WRITE_SAFE_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IWrappedQueuedFn</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">symbol</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">[</span>line<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Timeout-protected write function with backpressure handling.
32
  Waits for drain event if write buffer is full.
33
  Times out after 15 seconds and returns TIMEOUT_SYMBOL.</p>
34
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17222">types.d.ts:17222</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>base<wbr/>Dir</span><a href="#basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17199">types.d.ts:17199</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="reportname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>report<wbr/>Name</span><a href="#reportname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">reportName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17198">types.d.ts:17198</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the JSONL file and write stream.
35
  Safe to call multiple times - singleshot ensures one-time execution.</p>
36
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization (informational only)</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
38
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TReportBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17230">types.d.ts:17230</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="write" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write</span><a href="#write" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="write-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IReportDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IReportDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#write-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes event data to JSONL file with metadata.
39
  Appends a single line with JSON object containing:</p>
40
  <ul>
41
  <li>reportName: Type of report</li>
@@ -46,7 +46,7 @@ Appends a single line with JSON object containing:</p>
46
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="writet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a></span><div class="tsd-comment tsd-typography"><p>Event data object to write</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IReportDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IReportDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Metadata options for filtering and search</p>
48
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if stream not initialized or write timeout exceeded</p>
49
- </div></div><aside class="tsd-sources"><p>Implementation of TReportBase.write</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L17243">types.d.ts:17243</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_filepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a><a href="#_stream" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a><a href="#wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#write_safe_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span></a><a href="#basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a><a href="#reportname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>report<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#write" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
50
 
51
  <!-- Yandex.Metrika counter -->
52
  <script type="text/javascript">
 
11
  <p>File format: ./dump/report/{reportName}.jsonl
12
  Each line contains: reportName, data, metadata, timestamp</p>
13
  <p>Use this adapter for event logging and post-processing analytics.</p>
14
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../types/types.TReportBase.html" class="tsd-signature-type tsd-kind-type-alias">TReportBase</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17731">types.d.ts:17731</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.ReportBase.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
15
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.ReportBase.html#_filepath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a>
16
  <a href="types.ReportBase.html#_stream" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a>
17
  <a href="types.ReportBase.html#wait_for_init_symbol" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a>
 
23
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorreportbase" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">ReportBase</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">reportName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">baseDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.ReportBase.html" class="tsd-signature-type tsd-kind-class">ReportBase</a><a href="#constructorreportbase" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new JSONL report adapter instance.</p>
24
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">reportName</span>: <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span></span><div class="tsd-comment tsd-typography"><p>Type of report (backtest, live, walker, etc.)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">baseDir</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base directory for report files, defaults to ./dump/report</p>
26
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.ReportBase.html" class="tsd-signature-type tsd-kind-class">ReportBase</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17744">types.d.ts:17744</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="_filepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_file<wbr/>Path</span><a href="#_filepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_filePath</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Absolute path to the JSONL file for this report type</p>
27
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17735">types.d.ts:17735</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="_stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_stream</span><a href="#_stream" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">_stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WriteStream</span></div><div class="tsd-comment tsd-typography"><p>WriteStream instance for append-only writes, null until initialized</p>
28
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17737">types.d.ts:17737</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="wait_for_init_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span><a href="#wait_for_init_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WAIT_FOR_INIT_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">&amp;</span> <span class="tsd-signature-type">ISingleshotClearable</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Singleshot initialization function that creates directory and stream.
29
  Protected by singleshot to ensure one-time execution.
30
  Sets up error handler that emits to exitEmitter.</p>
31
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17750">types.d.ts:17750</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="write_safe_symbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span><a href="#write_safe_symbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">&quot;[WRITE_SAFE_SYMBOL]&quot;</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IWrappedQueuedFn</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">symbol</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-symbol">[</span>line<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Timeout-protected write function with backpressure handling.
32
  Waits for drain event if write buffer is full.
33
  Times out after 15 seconds and returns TIMEOUT_SYMBOL.</p>
34
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17756">types.d.ts:17756</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="basedir" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>base<wbr/>Dir</span><a href="#basedir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">baseDir</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17733">types.d.ts:17733</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="reportname" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>report<wbr/>Name</span><a href="#reportname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">reportName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">IReportTarget</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17732">types.d.ts:17732</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member"><a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Init</span><a href="#waitforinit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="waitforinit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">waitForInit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#waitforinit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Initializes the JSONL file and write stream.
35
  Safe to call multiple times - singleshot ensures one-time execution.</p>
36
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization (informational only)</p>
37
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when initialization is complete</p>
38
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TReportBase.waitForInit</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17764">types.d.ts:17764</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="write" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>write</span><a href="#write" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="write-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">write</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/types.IReportDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IReportDumpOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#write-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes event data to JSONL file with metadata.
39
  Appends a single line with JSON object containing:</p>
40
  <ul>
41
  <li>reportName: Type of report</li>
 
46
  </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="writet" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.ReportBase.html#writet">T</a></span><div class="tsd-comment tsd-typography"><p>Event data object to write</p>
47
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/types.IReportDumpOptions.html" class="tsd-signature-type tsd-kind-interface">IReportDumpOptions</a></span><div class="tsd-comment tsd-typography"><p>Metadata options for filtering and search</p>
48
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link"><a id="throws" class="tsd-anchor"></a>Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>Error if stream not initialized or write timeout exceeded</p>
49
+ </div></div><aside class="tsd-sources"><p>Implementation of TReportBase.write</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L17777">types.d.ts:17777</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#_filepath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_file<wbr/>Path</span></a><a href="#_stream" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_stream</span></a><a href="#wait_for_init_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL]</span></a><a href="#write_safe_symbol" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[WRITE_<wbr/>SAFE_<wbr/>SYMBOL]</span></a><a href="#basedir" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>base<wbr/>Dir</span></a><a href="#reportname" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>report<wbr/>Name</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#waitforinit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wait<wbr/>For<wbr/>Init</span></a><a href="#write" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>write</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
50
 
51
  <!-- Yandex.Metrika counter -->
52
  <script type="text/javascript">
classes/types.StateBacktestAdapter.html CHANGED
@@ -13,7 +13,7 @@ SL trades never go positive (Feb25) or show peak &lt; 0.15% (Feb08, Feb13).
13
  Rule: if position open &gt;= N minutes and peakPercent &lt; threshold (e.g. 0.3%),
14
  the LLM thesis was not confirmed by market — exit immediately.
15
  State tracks <code>{ peakPercent, minutesOpen }</code> per signal across onActivePing ticks.</p>
16
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TStateAdapter</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10380">types.d.ts:10380</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.StateBacktestAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
17
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.StateBacktestAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
18
  <a href="types.StateBacktestAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
19
  <a href="types.StateBacktestAdapter.html#getstate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a>
@@ -25,30 +25,30 @@ State tracks <code>{ peakPercent, minutesOpen }</code> per signal across onActiv
25
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorstatebacktestadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">StateBacktestAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.StateBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">StateBacktestAdapter</a><a href="#constructorstatebacktestadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.StateBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">StateBacktestAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
26
  Call this when process.cwd() changes between strategy iterations
27
  so new instances are created with the updated base path.</p>
28
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10442">types.d.ts:10442</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
29
  Called by StateAdapter when a signal is cancelled or closed.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
31
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10388">types.d.ts:10388</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="getstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>State</span><a href="#getstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read the current state value for a signal.</p>
32
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Current state value</p>
37
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.getState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10397">types.d.ts:10397</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="setstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>State</span><a href="#setstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">setState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Update the state value for a signal.</p>
38
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dispatch</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>New value or updater function receiving current value</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
42
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp this value belongs to</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Updated state value</p>
44
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.setState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10412">types.d.ts:10412</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
45
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10431">types.d.ts:10431</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory adapter (default).
46
  All data lives in process memory only.</p>
47
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10422">types.d.ts:10422</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter.
48
  Data is persisted to disk via PersistStateAdapter.</p>
49
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10427">types.d.ts:10427</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usestateadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>State<wbr/>Adapter</span><a href="#usestateadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useStateAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom state adapter implementation.</p>
50
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom state instance</p>
51
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10436">types.d.ts:10436</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#getstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a><a href="#setstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>set<wbr/>State</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#usestateadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>State<wbr/>Adapter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
 
13
  Rule: if position open &gt;= N minutes and peakPercent &lt; threshold (e.g. 0.3%),
14
  the LLM thesis was not confirmed by market — exit immediately.
15
  State tracks <code>{ peakPercent, minutesOpen }</code> per signal across onActivePing ticks.</p>
16
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TStateAdapter</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10902">types.d.ts:10902</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.StateBacktestAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
17
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.StateBacktestAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
18
  <a href="types.StateBacktestAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
19
  <a href="types.StateBacktestAdapter.html#getstate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a>
 
25
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorstatebacktestadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">StateBacktestAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.StateBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">StateBacktestAdapter</a><a href="#constructorstatebacktestadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.StateBacktestAdapter.html" class="tsd-signature-type tsd-kind-class">StateBacktestAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
26
  Call this when process.cwd() changes between strategy iterations
27
  so new instances are created with the updated base path.</p>
28
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10964">types.d.ts:10964</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
29
  Called by StateAdapter when a signal is cancelled or closed.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
31
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10910">types.d.ts:10910</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="getstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>State</span><a href="#getstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read the current state value for a signal.</p>
32
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Current state value</p>
37
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.getState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10919">types.d.ts:10919</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="setstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>State</span><a href="#setstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">setState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Update the state value for a signal.</p>
38
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dispatch</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>New value or updater function receiving current value</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
42
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp this value belongs to</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Updated state value</p>
44
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.setState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10934">types.d.ts:10934</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
45
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10953">types.d.ts:10953</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory adapter (default).
46
  All data lives in process memory only.</p>
47
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10944">types.d.ts:10944</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter.
48
  Data is persisted to disk via PersistStateAdapter.</p>
49
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10949">types.d.ts:10949</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usestateadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>State<wbr/>Adapter</span><a href="#usestateadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useStateAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom state adapter implementation.</p>
50
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom state instance</p>
51
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10958">types.d.ts:10958</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#getstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a><a href="#setstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>set<wbr/>State</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#usestateadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>State<wbr/>Adapter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
classes/types.StateLiveAdapter.html CHANGED
@@ -13,7 +13,7 @@ SL trades never go positive (Feb25) or show peak &lt; 0.15% (Feb08, Feb13).
13
  Rule: if position open &gt;= N minutes and peakPercent &lt; threshold (e.g. 0.3%),
14
  the LLM thesis was not confirmed by market — exit immediately.
15
  State persists <code>{ peakPercent, minutesOpen }</code> per signal across process restarts.</p>
16
- </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TStateAdapter</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10461">types.d.ts:10461</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.StateLiveAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
17
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.StateLiveAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
18
  <a href="types.StateLiveAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
19
  <a href="types.StateLiveAdapter.html#getstate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a>
@@ -25,30 +25,30 @@ State persists <code>{ peakPercent, minutesOpen }</code> per signal across proce
25
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorstateliveadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">StateLiveAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.StateLiveAdapter.html" class="tsd-signature-type tsd-kind-class">StateLiveAdapter</a><a href="#constructorstateliveadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.StateLiveAdapter.html" class="tsd-signature-type tsd-kind-class">StateLiveAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
26
  Call this when process.cwd() changes between strategy iterations
27
  so new instances are created with the updated base path.</p>
28
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10523">types.d.ts:10523</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
29
  Called by StateAdapter when a signal is cancelled or closed.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
31
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10469">types.d.ts:10469</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="getstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>State</span><a href="#getstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read the current state value for a signal.</p>
32
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Current state value</p>
37
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.getState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10478">types.d.ts:10478</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="setstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>State</span><a href="#setstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">setState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Update the state value for a signal.</p>
38
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dispatch</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>New value or updater function receiving current value</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
42
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp this value belongs to</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Updated state value</p>
44
- <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.setState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10493">types.d.ts:10493</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
45
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10512">types.d.ts:10512</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory adapter.
46
  All data lives in process memory only.</p>
47
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10503">types.d.ts:10503</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter (default).
48
  Data is persisted to disk via PersistStateAdapter.</p>
49
- </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10508">types.d.ts:10508</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usestateadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>State<wbr/>Adapter</span><a href="#usestateadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useStateAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom state adapter implementation.</p>
50
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom state instance</p>
51
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/0c9c63f2ae87dae00540b6c47ecda65da8e9e804/types.d.ts#L10517">types.d.ts:10517</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#getstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a><a href="#setstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>set<wbr/>State</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#usestateadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>State<wbr/>Adapter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
 
13
  Rule: if position open &gt;= N minutes and peakPercent &lt; threshold (e.g. 0.3%),
14
  the LLM thesis was not confirmed by market — exit immediately.
15
  State persists <code>{ peakPercent, minutesOpen }</code> per signal across process restarts.</p>
16
+ </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">TStateAdapter</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10983">types.d.ts:10983</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.StateLiveAdapter.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
17
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.StateLiveAdapter.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a>
18
  <a href="types.StateLiveAdapter.html#disposesignal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a>
19
  <a href="types.StateLiveAdapter.html#getstate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a>
 
25
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorstateliveadapter" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">StateLiveAdapter</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="types.StateLiveAdapter.html" class="tsd-signature-type tsd-kind-class">StateLiveAdapter</a><a href="#constructorstateliveadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="types.StateLiveAdapter.html" class="tsd-signature-type tsd-kind-class">StateLiveAdapter</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">clear</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Clears the memoized instance cache.
26
  Call this when process.cwd() changes between strategy iterations
27
  so new instances are created with the updated base path.</p>
28
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11045">types.d.ts:11045</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="disposesignal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispose<wbr/>Signal</span><a href="#disposesignal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">disposeSignal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Disposes all memoized instances for the given signalId.
29
  Called by StateAdapter when a signal is cancelled or closed.</p>
30
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signalId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Signal identifier to dispose</p>
31
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L10991">types.d.ts:10991</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="getstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>State</span><a href="#getstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">getState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Read the current state value for a signal.</p>
32
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
33
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
34
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
35
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp at which the read is happening (look-ahead guard)</p>
36
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Current state value</p>
37
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.getState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11000">types.d.ts:11000</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="setstate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>State</span><a href="#setstate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">setState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Update the state value for a signal.</p>
38
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">object</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">dispatch</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">dto</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Value</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">object</span> = <span class="tsd-signature-type">object</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">dispatch</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Dispatch</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>New value or updater function receiving current value</p>
39
  </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">dto</span>: <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span> <span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">bucketName</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Bucket name</p>
40
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">initialValue</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></h5><div class="tsd-comment tsd-typography"><p>Default value when no persisted state exists</p>
41
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">signalId</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><p>Signal identifier</p>
42
  </div><div class="tsd-comment tsd-typography"></div></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">when</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Date</span></h5><div class="tsd-comment tsd-typography"><p>Logical timestamp this value belongs to</p>
43
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="">Value</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Updated state value</p>
44
+ <div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of TStateAdapter.setState</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11015">types.d.ts:11015</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usedummy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Dummy</span><a href="#usedummy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useDummy</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to dummy adapter that discards all writes.</p>
45
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11034">types.d.ts:11034</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="uselocal" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Local</span><a href="#uselocal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useLocal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to in-memory adapter.
46
  All data lives in process memory only.</p>
47
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11025">types.d.ts:11025</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usepersist" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>Persist</span><a href="#usepersist" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">usePersist</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to file-system backed adapter (default).
48
  Data is persisted to disk via PersistStateAdapter.</p>
49
+ </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11030">types.d.ts:11030</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="usestateadapter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>use<wbr/>State<wbr/>Adapter</span><a href="#usestateadapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">useStateAdapter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>Switches to a custom state adapter implementation.</p>
50
  </div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">Ctor</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">Ctor</span>: <a href="../types/types.TStateInstanceCtor.html" class="tsd-signature-type tsd-kind-type-alias">TStateInstanceCtor</a></span><div class="tsd-comment tsd-typography"><p>Constructor for the custom state instance</p>
51
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/1d5d17c9d904a5bf76d580f05f9fb3a12b00d879/types.d.ts#L11039">types.d.ts:11039</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>clear</span></a><a href="#disposesignal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>dispose<wbr/>Signal</span></a><a href="#getstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>State</span></a><a href="#setstate" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>set<wbr/>State</span></a><a href="#usedummy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Dummy</span></a><a href="#uselocal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Local</span></a><a href="#usepersist" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Persist</span></a><a href="#usestateadapter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>State<wbr/>Adapter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
52
 
53
  <!-- Yandex.Metrika counter -->
54
  <script type="text/javascript">
documents/LLMs.html CHANGED
@@ -45,6 +45,7 @@
45
  <li><a href="#38-jsonl-report-streams">JSONL report streams</a></li>
46
  <li><a href="#39-schema--graph-validation">Schema &amp; graph validation</a></li>
47
  <li><a href="#40-config-in-practice--where-each-parameter-is-consumed">Config in practice — where each parameter is consumed</a></li>
 
48
  </ol>
49
  <hr>
50
  <a id="1-mental-model--guarantees" class="tsd-anchor"></a><h2 class="tsd-anchor-link">1. Mental model &amp; guarantees<a href="#1-mental-model--guarantees" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Think of the engine as an <strong>async stream of time</strong>. Each emitted moment is a <em>tick</em>. On each tick the engine:</p>
@@ -3106,8 +3107,207 @@
3106
  <a id="406-column_config--report-table-columns" class="tsd-anchor"></a><h3 class="tsd-anchor-link">40.6 <code>COLUMN_CONFIG</code> — report table columns<a href="#406-column_config--report-table-columns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p><code>src/config/columns.ts</code> exports <code>COLUMN_CONFIG</code>, mapping each report to a column array imported from <code>src/assets/*.columns</code>. There are <strong>14 collections</strong> (Walker has two): <code>backtest_columns</code>, <code>heat_columns</code>, <code>live_columns</code>, <code>partial_columns</code>, <code>breakeven_columns</code>, <code>performance_columns</code>, <code>risk_columns</code>, <code>schedule_columns</code>, <code>strategy_columns</code>, <code>sync_columns</code>, <code>highest_profit_columns</code>, <code>max_drawdown_columns</code>, <code>walker_pnl_columns</code>, <code>walker_strategy_columns</code>.</p>
3107
  <p>Each entry is a <code>ColumnModel</code> (<code>{ key, label, format(row, index) =&gt; string, isVisible() =&gt; boolean }</code>) — <code>format</code> builds the cell, <code>isVisible</code> gates the whole column (e.g. the Note column returns <code>GLOBAL_CONFIG.CC_REPORT_SHOW_SIGNAL_NOTE</code>). Override globally with <code>setColumns({ &lt;collection&gt;: [...] })</code> or per-call via the <code>columns</code> argument to <code>getReport</code>/<code>dump</code>; both paths run <code>ColumnValidationService</code> (<a href="#393-global-config--column-validation">§39.3</a>) and roll back on failure. Inspect with <code>getColumns()</code> / <code>getDefaultColumns()</code> (<code>ColumnConfig</code> is the exported type). The markdown services iterate visible columns to build the table header + rows (<a href="#373-customizing-report-columns">§37.3</a>).</p>
3108
  <hr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3109
  <p>🤖 For the human-readable narrative, see <a href="../media/README.md">README.md</a>. MIT © <a href="https://github.com/tripolskypetr">tripolskypetr</a>.</p>
3110
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#🧿-backtest-kit--technical-reference-for-language-models"><span>🧿 <wbr/>Backtest <wbr/>Kit — <wbr/>Technical <wbr/>Reference for <wbr/>Language <wbr/>Models</span></a><ul><li><a href="#table-of-contents"><span>Table of <wbr/>Contents</span></a></li><li><a href="#1-mental-model--guarantees"><span>1. <wbr/>Mental model &amp; guarantees</span></a></li><li><a href="#2-installation--ecosystem-packages"><span>2. <wbr/>Installation &amp; ecosystem packages</span></a></li><li><ul><li><a href="#core-install"><span>Core install</span></a></li><li><a href="#scaffolding-fastest-paths"><span>Scaffolding (fastest paths)</span></a></li><li><a href="#ecosystem-packages"><span>Ecosystem packages</span></a></li></ul></li><li><a href="#3-quick-start"><span>3. <wbr/>Quick start</span></a></li><li><ul><li><a href="#31-basic-configuration"><span>3.1 <wbr/>Basic configuration</span></a></li><li><a href="#32-register-components"><span>3.2 <wbr/>Register components</span></a></li><li><a href="#33-define-a-strategy-with-an-llm"><span>3.3 <wbr/>Define a strategy (with an LLM)</span></a></li><li><a href="#34-run-a-backtest"><span>3.4 <wbr/>Run a backtest</span></a></li><li><a href="#35-run-live-trading"><span>3.5 <wbr/>Run live trading</span></a></li><li><a href="#36-complete-end-to-end-example-single-file"><span>3.6 <wbr/>Complete end-<wbr/>to-<wbr/>end example (single file)</span></a></li></ul></li><li><a href="#4-core-concepts"><span>4. <wbr/>Core concepts</span></a></li><li><ul><li><a href="#41-dependency-inversion-via-string-names"><span>4.1 <wbr/>Dependency inversion via string names</span></a></li><li><a href="#42-the-context-object"><span>4.2 <wbr/>The context object</span></a></li><li><a href="#43-two-ways-to-run-the-engine"><span>4.3 <wbr/>Two ways to run the engine</span></a></li><li><a href="#44-signals-scheduled-vs-immediate"><span>4.4 <wbr/>Signals: scheduled vs immediate</span></a></li><li><a href="#45-supported-order-types"><span>4.5 <wbr/>Supported order types</span></a></li></ul></li><li><a href="#5-the-execution-model"><span>5. <wbr/>The execution model</span></a></li><li><ul><li><a href="#51-async-context-propagation"><span>5.1 <wbr/>Async context propagation</span></a></li><li><a href="#52-vwap-pricing"><span>5.2 VWAP pricing</span></a></li><li><a href="#53-candle-timestamp-convention"><span>5.3 <wbr/>Candle timestamp convention</span></a></li><li><a href="#54-look-ahead-bias-protection"><span>5.4 <wbr/>Look-<wbr/>ahead bias protection</span></a></li><li><a href="#55-interval-throttling"><span>5.5 <wbr/>Interval throttling</span></a></li></ul></li><li><a href="#6-schema-registration-reference"><span>6. <wbr/>Schema registration reference</span></a></li><li><ul><li><a href="#61-exchange-schema--addexchangeschemaschema-iexchangeschema"><span>6.1 <wbr/>Exchange schema — add<wbr/>Exchange<wbr/>Schema(schema: IExchange<wbr/>Schema)</span></a></li><li><a href="#62-strategy-schema--addstrategyschemaschema-istrategyschema"><span>6.2 <wbr/>Strategy schema — add<wbr/>Strategy<wbr/>Schema(schema: IStrategy<wbr/>Schema)</span></a></li><li><a href="#63-frame-schema--addframeschemaschema-iframeschema"><span>6.3 <wbr/>Frame schema — add<wbr/>Frame<wbr/>Schema(schema: IFrame<wbr/>Schema)</span></a></li><li><a href="#64-risk-schema--see-§16"><span>6.4 <wbr/>Risk schema — see §16</span></a></li><li><a href="#65-sizing-schema--see-§15"><span>6.5 <wbr/>Sizing schema — see §15</span></a></li><li><a href="#66-walker-schema--see-§133"><span>6.6 <wbr/>Walker schema — see §13.3</span></a></li><li><a href="#67-action-schema--see-§22"><span>6.7 <wbr/>Action schema — see §22</span></a></li></ul></li><li><a href="#7-signal-lifecycle--tick-results"><span>7. <wbr/>Signal lifecycle &amp; tick results</span></a></li><li><ul><li><a href="#71-state-machine"><span>7.1 <wbr/>State machine</span></a></li><li><a href="#72-tick-result-union"><span>7.2 <wbr/>Tick result union</span></a></li><li><a href="#73-pnl-object--istrategypnl"><span>7.3 PNL object — IStrategy<wbr/>PnL</span></a></li><li><a href="#74-ipublicsignalrow--the-signal-object-surfaced-everywhere"><span>7.4 IPublic<wbr/>Signal<wbr/>Row — the signal object surfaced everywhere</span></a></li><li><a href="#75-signal-validation-rules"><span>7.5 <wbr/>Signal validation rules</span></a></li><li><a href="#76-candle-data-validation"><span>7.6 <wbr/>Candle data validation</span></a></li></ul></li><li><a href="#8-strategy-context-functions"><span>8. <wbr/>Strategy context functions</span></a></li><li><ul><li><a href="#81-signal--position-queries"><span>8.1 <wbr/>Signal &amp; position queries</span></a></li><li><a href="#82-meta-functions"><span>8.2 <wbr/>Meta functions</span></a></li><li><a href="#83-createsignalstate--typed-per-signal-accumulator-recommended"><span>8.3 create<wbr/>Signal<wbr/>State — typed per-<wbr/>signal accumulator (recommended)</span></a></li></ul></li><li><a href="#9-commit-functions"><span>9. <wbr/>Commit functions</span></a></li><li><ul><li><a href="#91-lifecycle-commits"><span>9.1 <wbr/>Lifecycle commits</span></a></li><li><a href="#92-dca-dollar-cost-averaging"><span>9.2 DCA (dollar-<wbr/>cost averaging)</span></a></li><li><a href="#93-partial-closes"><span>9.3 <wbr/>Partial closes</span></a></li><li><a href="#94-trailing--breakeven"><span>9.4 <wbr/>Trailing &amp; breakeven</span></a></li></ul></li><li><a href="#10-position-analytics-functions"><span>10. <wbr/>Position analytics functions</span></a></li><li><ul><li><a href="#101-composition--cost-basis"><span>10.1 <wbr/>Composition &amp; cost basis</span></a></li><li><a href="#102-live-pnl"><span>10.2 <wbr/>Live PNL</span></a></li><li><a href="#103-timing"><span>10.3 <wbr/>Timing</span></a></li><li><a href="#104-peak-profit-best-favorable-excursion"><span>10.4 <wbr/>Peak profit (best favorable excursion)</span></a></li><li><a href="#105-max-drawdown-worst-adverse-excursion"><span>10.5 <wbr/>Max drawdown (worst adverse excursion)</span></a></li><li><a href="#106-cross-section-distances-peak-↔-trough-analysis"><span>10.6 <wbr/>Cross-<wbr/>section distances (peak ↔ trough analysis)</span></a></li><li><a href="#107-overlap-dca--partial-spacing-diagnostics"><span>10.7 <wbr/>Overlap (DCA / partial spacing diagnostics)</span></a></li></ul></li><li><a href="#11-exchange-data-api--candle-math"><span>11. <wbr/>Exchange data API &amp; candle math</span></a></li><li><ul><li><a href="#111-functions"><span>11.1 <wbr/>Functions</span></a></li><li><a href="#112-getrawcandles-parameter-combinations"><span>11.2 get<wbr/>Raw<wbr/>Candles parameter combinations</span></a></li><li><a href="#113-timestamp-alignment-math-worked-example"><span>11.3 <wbr/>Timestamp alignment math (worked example)</span></a></li><li><a href="#114-order-book--aggregated-trades-windows"><span>11.4 <wbr/>Order book &amp; aggregated trades windows</span></a></li><li><a href="#115-candle-cache"><span>11.5 <wbr/>Candle cache</span></a></li></ul></li><li><a href="#12-pnl-dca--effective-price-math"><span>12. PNL, DCA &amp; effective-<wbr/>price math</span></a></li><li><ul><li><a href="#121-effective-priceopen"><span>12.1 <wbr/>Effective price<wbr/>Open</span></a></li><li><a href="#122-worked-scenario"><span>12.2 <wbr/>Worked scenario</span></a></li><li><a href="#123-cost-basis-replay-algorithm"><span>12.3 <wbr/>Cost-<wbr/>basis replay algorithm</span></a></li></ul></li><li><a href="#13-runners-backtest-live-walker"><span>13. <wbr/>Runners: <wbr/>Backtest, <wbr/>Live, <wbr/>Walker</span></a></li><li><ul><li><a href="#131-backtest"><span>13.1 <wbr/>Backtest</span></a></li><li><a href="#132-live"><span>13.2 <wbr/>Live</span></a></li><li><a href="#133-walker"><span>13.3 <wbr/>Walker</span></a></li><li><a href="#134-graceful-shutdown--task-monitoring"><span>13.4 <wbr/>Graceful shutdown &amp; task monitoring</span></a></li></ul></li><li><a href="#14-analytics--reports"><span>14. <wbr/>Analytics &amp; reports</span></a></li><li><ul><li><a href="#141-heat--portfolio-heatmap-across-symbols"><span>14.1 <wbr/>Heat — portfolio heatmap across symbols</span></a></li><li><a href="#142-schedule--scheduled-signal-stats"><span>14.2 <wbr/>Schedule — scheduled-<wbr/>signal stats</span></a></li><li><a href="#143-partial--partial-profitloss-milestone-stats"><span>14.3 <wbr/>Partial — partial profit/loss milestone stats</span></a></li><li><a href="#144-position--signal-dto-builders--open-position-snapshot"><span>14.4 <wbr/>Position — signal-<wbr/>DTO builders + open-<wbr/>position snapshot</span></a></li><li><a href="#145-highestprofit--maxdrawdown--excursion-stats"><span>14.5 <wbr/>Highest<wbr/>Profit &amp; <wbr/>Max<wbr/>Drawdown — excursion stats</span></a></li><li><a href="#146-risk--risk-rejection-stats"><span>14.6 <wbr/>Risk — risk-<wbr/>rejection stats</span></a></li><li><a href="#147-performance--revenue-profiling"><span>14.7 <wbr/>Performance — revenue profiling</span></a></li><li><a href="#148-sync--order-sync-stats--see-§19"><span>14.8 <wbr/>Sync — order-<wbr/>sync stats — see §19</span></a></li><li><a href="#149-lookup--parallel-run-coordination"><span>14.9 <wbr/>Lookup — parallel-<wbr/>run coordination</span></a></li></ul></li><li><a href="#15-position-sizing"><span>15. <wbr/>Position sizing</span></a></li><li><a href="#16-risk-management"><span>16. <wbr/>Risk management</span></a></li><li><a href="#17-broker-transactional-live-orders"><span>17. <wbr/>Broker: transactional live orders</span></a></li><li><ul><li><a href="#171-ibroker-interface--payloads"><span>17.1 IBroker interface &amp; payloads</span></a></li><li><a href="#172-spot-adapter-binance-via-ccxt--complete-reference-implementation"><span>17.2 <wbr/>Spot adapter (<wbr/>Binance via ccxt) — complete reference implementation</span></a></li><li><a href="#173-futures-adapter--key-differences-from-spot"><span>17.3 <wbr/>Futures adapter — key differences from spot</span></a></li><li><a href="#174-onorderping-optional"><span>17.4 on<wbr/>Order<wbr/>Ping (optional)</span></a></li></ul></li><li><a href="#18-cron-virtual-time-scheduler"><span>18. <wbr/>Cron: virtual-<wbr/>time scheduler</span></a></li><li><ul><li><a href="#181-api"><span>18.1 API</span></a></li><li><a href="#182-two-modes-×-two-scopes"><span>18.2 <wbr/>Two modes × two scopes</span></a></li><li><a href="#183-internals-coordination"><span>18.3 <wbr/>Internals (coordination)</span></a></li></ul></li><li><a href="#19-sync-order-synchronization"><span>19. <wbr/>Sync: order synchronization</span></a></li><li><a href="#20-per-signal-memory-state-session-storage-recent"><span>20. <wbr/>Per-<wbr/>signal <wbr/>Memory, <wbr/>State, <wbr/>Session, <wbr/>Storage, <wbr/>Recent</span></a></li><li><ul><li><a href="#201-memory--bm25-searchable-per-signal-store"><span>20.1 <wbr/>Memory — BM25-<wbr/>searchable per-<wbr/>signal store</span></a></li><li><a href="#202-state--typed-per-signal-accumulator"><span>20.2 <wbr/>State — typed per-<wbr/>signal accumulator</span></a></li><li><a href="#203-session--per-context-cross-candle-store"><span>20.3 <wbr/>Session — per-<wbr/>context cross-<wbr/>candle store</span></a></li><li><a href="#204-storage--recent"><span>20.4 <wbr/>Storage &amp; <wbr/>Recent</span></a></li></ul></li><li><a href="#21-dump-agent-reasoning--record-capture"><span>21. <wbr/>Dump: agent reasoning &amp; record capture</span></a></li><li><a href="#22-actions-pluggable-event-handlers"><span>22. <wbr/>Actions: pluggable event handlers</span></a></li><li><a href="#225-strategy-recipes"><span>22.5 <wbr/>Strategy recipes</span></a></li><li><ul><li><a href="#scale-out-at-kelly-levels-via-the-milestone-listener"><span>Scale-<wbr/>out at <wbr/>Kelly levels via the milestone listener</span></a></li><li><a href="#breakeven-then-trail-callback-driven"><span>Breakeven then trail (callback-<wbr/>driven)</span></a></li><li><a href="#long-dca-ladder-add-rungs-on-new-lows-close-at-blended-profit"><span>LONG DCA ladder (add rungs on new lows, close at blended profit)</span></a></li><li><a href="#short-dca-ladder"><span>SHORT DCA ladder</span></a></li><li><a href="#cooldown-after-a-stop-loss"><span>Cooldown after a stop-<wbr/>loss</span></a></li><li><a href="#scheduled-limitgrid-entry"><span>Scheduled (limit/grid) entry</span></a></li><li><a href="#llm-capitulation-exit-via-per-signal-state"><span>LLM capitulation exit via per-<wbr/>signal state</span></a></li></ul></li><li><a href="#23-event-listeners"><span>23. <wbr/>Event listeners</span></a></li><li><ul><li><a href="#231-signal-lifecycle"><span>23.1 <wbr/>Signal lifecycle</span></a></li><li><a href="#232-completion--progress"><span>23.2 <wbr/>Completion &amp; progress</span></a></li><li><a href="#233-ping--milestone"><span>23.3 <wbr/>Ping &amp; milestone</span></a></li><li><a href="#234-system--lifecycle"><span>23.4 <wbr/>System &amp; lifecycle</span></a></li></ul></li><li><a href="#24-notifications"><span>24. <wbr/>Notifications</span></a></li><li><a href="#25-persistence-adapters"><span>25. <wbr/>Persistence adapters</span></a></li><li><ul><li><a href="#251-the-15-domains"><span>25.1 <wbr/>The 15 domains</span></a></li><li><a href="#252-default-file-layout"><span>25.2 <wbr/>Default file layout</span></a></li><li><a href="#253-persistbase--the-base-contract"><span>25.3 <wbr/>Persist<wbr/>Base — the base contract</span></a></li><li><a href="#254-custom-adapter--redis-example"><span>25.4 <wbr/>Custom adapter — <wbr/>Redis example</span></a></li><li><a href="#256-custom-adapter--mongodb-example"><span>25.6 <wbr/>Custom adapter — <wbr/>MongoDB example</span></a></li><li><a href="#257-scheduled-signal-crash-recovery"><span>25.7 <wbr/>Scheduled-<wbr/>signal crash recovery</span></a></li><li><a href="#255-direct-use"><span>25.5 <wbr/>Direct use</span></a></li></ul></li><li><a href="#26-global-configuration-reference"><span>26. <wbr/>Global configuration reference</span></a></li><li><ul><li><a href="#261-execution--pricing"><span>26.1 <wbr/>Execution &amp; pricing</span></a></li><li><a href="#262-signal-validation--lifetime"><span>26.2 <wbr/>Signal validation &amp; lifetime</span></a></li><li><a href="#263-candle-fetching--anomaly-detection"><span>26.3 <wbr/>Candle fetching &amp; anomaly detection</span></a></li><li><a href="#264-order-book--aggregated-trades"><span>26.4 <wbr/>Order book &amp; aggregated trades</span></a></li><li><a href="#265-behavior-toggles"><span>26.5 <wbr/>Behavior toggles</span></a></li><li><a href="#266-report-row-caps"><span>26.6 <wbr/>Report row caps</span></a></li></ul></li><li><a href="#27-math-helpers--utilities"><span>27. <wbr/>Math helpers &amp; utilities</span></a></li><li><a href="#28-reflection--introspection"><span>28. <wbr/>Reflection &amp; introspection</span></a></li><li><a href="#29-ai-strategy-optimizer"><span>29. AI strategy optimizer</span></a></li><li><a href="#30-strategy-examples"><span>30. <wbr/>Strategy examples</span></a></li><li><a href="#31-architecture-overview"><span>31. <wbr/>Architecture overview</span></a></li><li><a href="#32-complete-public-export-index"><span>32. <wbr/>Complete public export index</span></a></li><li><a href="#notes-for-language-models"><span>Notes for language models</span></a></li><li><a href="#33-ecosystem-packages--detailed-api"><span>33. <wbr/>Ecosystem packages — detailed API</span></a></li><li><ul><li><a href="#331-backtest-kitpinets--pine-script-v5v6-runtime"><span>33.1 @backtest-<wbr/>kit/pinets — <wbr/>Pine <wbr/>Script v5/v6 runtime</span></a></li><li><a href="#332-backtest-kitgraph--typed-dag-of-computations"><span>33.2 @backtest-<wbr/>kit/graph — typed DAG of computations</span></a></li><li><a href="#333-backtest-kitollama--multi-provider-llm--optimizer"><span>33.3 @backtest-<wbr/>kit/ollama — multi-<wbr/>provider LLM + <wbr/>Optimizer</span></a></li><li><a href="#334-backtest-kitsignals--50-indicators-across-4-timeframes"><span>33.4 @backtest-<wbr/>kit/signals — 50+ indicators across 4 timeframes</span></a></li><li><a href="#335-backtest-kitmongo--mongodb--redis-persistence"><span>33.5 @backtest-<wbr/>kit/mongo — <wbr/>MongoDB + <wbr/>Redis persistence</span></a></li><li><a href="#336-backtest-kitui--full-stack-dashboard"><span>33.6 @backtest-<wbr/>kit/ui — full-<wbr/>stack dashboard</span></a></li><li><a href="#337-backtest-kitcli--zero-boilerplate-runner"><span>33.7 @backtest-<wbr/>kit/cli — zero-<wbr/>boilerplate runner</span></a></li><li><ul><li><a href="#modes"><span>Modes</span></a></li><li><a href="#common-flags"><span>Common flags</span></a></li><li><a href="#walker-mode"><span>Walker mode</span></a></li><li><a href="#main-mode----entry-multi-symbol-fan-out"><span>Main mode &amp; --entry (multi-<wbr/>symbol fan-<wbr/>out)</span></a></li><li><a href="#monorepo--per-strategy-isolation"><span>Monorepo &amp; per-<wbr/>strategy isolation</span></a></li><li><a href="#shared-import-aliases"><span>Shared import aliases</span></a></li><li><a href="#module-hooks-broker-adapters"><span>Module hooks (broker adapters)</span></a></li><li><a href="#config-hooks-configconfig"><span>Config hooks (config/*.config)</span></a></li><li><a href="#entry-point-formats--pine-mode"><span>Entry-<wbr/>point formats &amp; <wbr/>Pine mode</span></a></li></ul></li><li><a href="#338-backtest-kitsidekick--full-control-scaffolder"><span>33.8 @backtest-<wbr/>kit/sidekick — full-<wbr/>control scaffolder</span></a></li><li><a href="#339-quant-math-companions"><span>33.9 <wbr/>Quant-<wbr/>math companions</span></a></li></ul></li><li><a href="#34-strategy-examples-reference-implementations"><span>34. <wbr/>Strategy examples (reference implementations)</span></a></li><li><ul><li><a href="#341-index-documented-results"><span>34.1 <wbr/>Index (documented results)</span></a></li><li><a href="#342-marapr-2026--dca-ladder-the-core-dca-pattern"><span>34.2 <wbr/>Mar/<wbr/>Apr 2026 — DCA ladder (the core DCA pattern)</span></a></li><li><a href="#343-feb-2026--ai-news-sentiment-llm--graph"><span>34.3 <wbr/>Feb 2026 — AI news sentiment (LLM + graph)</span></a></li><li><a href="#344-jan-2026--liquidity-harvesting-telegram-signals-inverted"><span>34.4 <wbr/>Jan 2026 — liquidity harvesting (<wbr/>Telegram signals, inverted)</span></a></li><li><a href="#345-oct-2021--tensorflow-neural-network"><span>34.5 <wbr/>Oct 2021 — <wbr/>Tensor<wbr/>Flow neural network</span></a></li><li><a href="#346-dec-2025--pine-script-range-breakout"><span>34.6 <wbr/>Dec 2025 — <wbr/>Pine <wbr/>Script range breakout</span></a></li><li><a href="#347-feb-2021--python-ema-crossover-webassembly"><span>34.7 <wbr/>Feb 2021 — <wbr/>Python EMA crossover (<wbr/>Web<wbr/>Assembly)</span></a></li><li><a href="#348-apr-2024--polymarket-δprob"><span>34.8 <wbr/>Apr 2024 — <wbr/>Polymarket Δprob</span></a></li></ul></li><li><a href="#35-raw-library-demos-no-cli"><span>35. <wbr/>Raw-<wbr/>library demos (no CLI)</span></a></li><li><ul><li><a href="#351-demobacktest--backtest--reports--risk"><span>35.1 demo/backtest — backtest + reports + risk</span></a></li><li><a href="#352-demolive--live--per-event-report-dumps"><span>35.2 demo/live — live + per-<wbr/>event report dumps</span></a></li><li><a href="#353-democcxt--full-exchange-schema--quant-math-models"><span>35.3 demo/ccxt — full exchange schema + quant-<wbr/>math models</span></a></li><li><a href="#354-demooptimization--ai-optimizer-end-to-end"><span>35.4 demo/optimization — AI optimizer end-<wbr/>to-<wbr/>end</span></a></li><li><a href="#355-demopinets--raw-pine-script-run"><span>35.5 demo/pinets — raw <wbr/>Pine <wbr/>Script run</span></a></li></ul></li><li><a href="#36-framework-philosophy--further-reading"><span>36. <wbr/>Framework philosophy &amp; further reading</span></a></li><li><ul><li><a href="#361-foundational-concepts"><span>36.1 <wbr/>Foundational concepts</span></a></li><li><a href="#362-why-backtests-lie-and-what-the-engine-does-about-it"><span>36.2 <wbr/>Why backtests lie, and what the engine does about it</span></a></li><li><a href="#363-ai-as-the-strategy-developer"><span>36.3 AI as the strategy developer</span></a></li><li><a href="#364-worked-edges-each-maps-to-a-shipped-strategy"><span>36.4 <wbr/>Worked edges (each maps to a shipped strategy)</span></a></li><li><a href="#365-reading-order"><span>36.5 <wbr/>Reading order</span></a></li></ul></li><li><a href="#37-markdown-report-catalog"><span>37. <wbr/>Markdown report catalog</span></a></li><li><ul><li><a href="#371-the-13-reports"><span>37.1 <wbr/>The 13 reports</span></a></li><li><a href="#372-what-each-report-contains"><span>37.2 <wbr/>What each report contains</span></a></li><li><a href="#373-customizing-report-columns"><span>37.3 <wbr/>Customizing report columns</span></a></li></ul></li><li><a href="#38-jsonl-report-streams"><span>38. JSONL report streams</span></a></li><li><ul><li><a href="#381-markdown-layer-vs-jsonl-layer"><span>38.1 <wbr/>Markdown layer vs JSONL layer</span></a></li><li><a href="#382-enabling--reportenableconfig"><span>38.2 <wbr/>Enabling — <wbr/>Report.enable(config?)</span></a></li><li><a href="#383-the-13-streams"><span>38.3 <wbr/>The 13 streams</span></a></li><li><a href="#384-row-shape"><span>38.4 <wbr/>Row shape</span></a></li></ul></li><li><a href="#39-schema--graph-validation"><span>39. <wbr/>Schema &amp; graph validation</span></a></li><li><ul><li><a href="#391-shallow-schema-validation-registration"><span>39.1 <wbr/>Shallow schema validation (registration)</span></a></li><li><a href="#392-graph-validation-run-time"><span>39.2 <wbr/>Graph validation (run time)</span></a></li><li><a href="#393-global-config--column-validation"><span>39.3 <wbr/>Global-<wbr/>config &amp; column validation</span></a></li><li><a href="#394-summary-of-guarantees"><span>39.4 <wbr/>Summary of guarantees</span></a></li></ul></li><li><a href="#40-config-in-practice--where-each-parameter-is-consumed"><span>40. <wbr/>Config in practice — where each parameter is consumed</span></a></li><li><ul><li><a href="#401-pricing-fees--pnl-math"><span>40.1 <wbr/>Pricing, fees &amp; PNL math</span></a></li><li><a href="#402-signal-validation--lifetime"><span>40.2 <wbr/>Signal validation &amp; lifetime</span></a></li><li><a href="#403-behavior-toggles-the-big-four-_everywhere"><span>40.3 <wbr/>Behavior toggles (the big four *_<wbr/>EVERYWHERE)</span></a></li><li><a href="#404-candle-fetching-order-book--trades"><span>40.4 <wbr/>Candle fetching, order book &amp; trades</span></a></li><li><a href="#405-storage-caps--report-rows"><span>40.5 <wbr/>Storage caps &amp; report rows</span></a></li><li><a href="#406-column_config--report-table-columns"><span>40.6 COLUMN_<wbr/>CONFIG — report table columns</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
3111
 
3112
  <!-- Yandex.Metrika counter -->
3113
  <script type="text/javascript">
 
45
  <li><a href="#38-jsonl-report-streams">JSONL report streams</a></li>
46
  <li><a href="#39-schema--graph-validation">Schema &amp; graph validation</a></li>
47
  <li><a href="#40-config-in-practice--where-each-parameter-is-consumed">Config in practice — where each parameter is consumed</a></li>
48
+ <li><a href="#41-binding-the-framework-to-a-real-exchange--exception-based-vs-event-based">Binding the framework to a real exchange — EXCEPTION-BASED vs EVENT-BASED</a></li>
49
  </ol>
50
  <hr>
51
  <a id="1-mental-model--guarantees" class="tsd-anchor"></a><h2 class="tsd-anchor-link">1. Mental model &amp; guarantees<a href="#1-mental-model--guarantees" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Think of the engine as an <strong>async stream of time</strong>. Each emitted moment is a <em>tick</em>. On each tick the engine:</p>
 
3107
  <a id="406-column_config--report-table-columns" class="tsd-anchor"></a><h3 class="tsd-anchor-link">40.6 <code>COLUMN_CONFIG</code> — report table columns<a href="#406-column_config--report-table-columns" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p><code>src/config/columns.ts</code> exports <code>COLUMN_CONFIG</code>, mapping each report to a column array imported from <code>src/assets/*.columns</code>. There are <strong>14 collections</strong> (Walker has two): <code>backtest_columns</code>, <code>heat_columns</code>, <code>live_columns</code>, <code>partial_columns</code>, <code>breakeven_columns</code>, <code>performance_columns</code>, <code>risk_columns</code>, <code>schedule_columns</code>, <code>strategy_columns</code>, <code>sync_columns</code>, <code>highest_profit_columns</code>, <code>max_drawdown_columns</code>, <code>walker_pnl_columns</code>, <code>walker_strategy_columns</code>.</p>
3108
  <p>Each entry is a <code>ColumnModel</code> (<code>{ key, label, format(row, index) =&gt; string, isVisible() =&gt; boolean }</code>) — <code>format</code> builds the cell, <code>isVisible</code> gates the whole column (e.g. the Note column returns <code>GLOBAL_CONFIG.CC_REPORT_SHOW_SIGNAL_NOTE</code>). Override globally with <code>setColumns({ &lt;collection&gt;: [...] })</code> or per-call via the <code>columns</code> argument to <code>getReport</code>/<code>dump</code>; both paths run <code>ColumnValidationService</code> (<a href="#393-global-config--column-validation">§39.3</a>) and roll back on failure. Inspect with <code>getColumns()</code> / <code>getDefaultColumns()</code> (<code>ColumnConfig</code> is the exported type). The markdown services iterate visible columns to build the table header + rows (<a href="#373-customizing-report-columns">§37.3</a>).</p>
3109
  <hr>
3110
+ <a id="41-binding-the-framework-to-a-real-exchange--exception-based-vs-event-based" class="tsd-anchor"></a><h2 class="tsd-anchor-link">41. Binding the framework to a real exchange — EXCEPTION-BASED vs EVENT-BASED<a href="#41-binding-the-framework-to-a-real-exchange--exception-based-vs-event-based" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The framework runs a <strong>strategy state</strong> (pending/scheduled signals, TP/SL evaluated against the <strong>VWAP</strong> of each candle) that is <em>parallel</em> to the <strong>real exchange state</strong> (orders that fill on candle high/low, gap through a level, rest unfilled, or get cancelled externally). &quot;Manual wiring&quot; is how you keep the two in sync. It has two independent axes: <strong>where</strong> you attach (§41.1) and <strong>how</strong> a hook influences the framework (§41.2).</p>
3111
+ <a id="411-two-attachment-points" class="tsd-anchor"></a><h3 class="tsd-anchor-link">41.1 Two attachment points<a href="#411-two-attachment-points" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><table>
3112
+ <thead>
3113
+ <tr>
3114
+ <th>Point</th>
3115
+ <th>Register with</th>
3116
+ <th>Implement</th>
3117
+ <th>Runs in</th>
3118
+ <th>Use when</th>
3119
+ </tr>
3120
+ </thead>
3121
+ <tbody>
3122
+ <tr>
3123
+ <td><strong>Broker adapter</strong></td>
3124
+ <td><code>Broker.useBrokerAdapter(MyBroker)</code> + <code>Broker.enable()</code></td>
3125
+ <td><code>IBroker</code></td>
3126
+ <td><strong>live only</strong> (commits skip backtest)</td>
3127
+ <td>one infrastructure / exchange-integration layer, separate from strategy logic</td>
3128
+ </tr>
3129
+ <tr>
3130
+ <td><strong>Action</strong></td>
3131
+ <td><code>addActionSchema({ actionName, callbacks })</code></td>
3132
+ <td><code>IActionCallbacks</code></td>
3133
+ <td><strong>live + backtest</strong></td>
3134
+ <td>wiring that lives next to a strategy, or per-strategy bridges</td>
3135
+ </tr>
3136
+ </tbody>
3137
+ </table>
3138
+ <p>Both run <strong>inside the strategy tick</strong>, so the <code>commit*</code> functions from <a href="../media/strategy.ts"><code>src/function/strategy.ts</code></a> are callable from either and the method/execution context they need is already active. <strong>Every commit is deferred</strong> — it takes effect on the <em>next</em> tick, never re-entrantly.</p>
3139
+ <a id="412-two-interaction-styles" class="tsd-anchor"></a><h3 class="tsd-anchor-link">41.2 Two interaction styles<a href="#412-two-interaction-styles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Every wiring hook is one of two kinds. This is the primary distinction to get right.</p>
3140
+ <table>
3141
+ <thead>
3142
+ <tr>
3143
+ <th></th>
3144
+ <th><strong>EXCEPTION-BASED</strong> (gate)</th>
3145
+ <th><strong>EVENT-BASED</strong> (react)</th>
3146
+ </tr>
3147
+ </thead>
3148
+ <tbody>
3149
+ <tr>
3150
+ <td>What a <code>throw</code> does</td>
3151
+ <td><strong>vetoes / forces</strong> a framework transition</td>
3152
+ <td><strong>nothing</strong> — purely informational</td>
3153
+ </tr>
3154
+ <tr>
3155
+ <td>How you act</td>
3156
+ <td>return normally vs throw</td>
3157
+ <td>call a <code>commit*</code> function (or place/cancel a real order)</td>
3158
+ </tr>
3159
+ <tr>
3160
+ <td>Fires</td>
3161
+ <td>as the framework <em>attempts</em> a transition (BEFORE it mutates state)</td>
3162
+ <td>per-tick while monitoring, or once at a lifecycle point</td>
3163
+ </tr>
3164
+ <tr>
3165
+ <td>Mode</td>
3166
+ <td><strong>live only</strong> (backtest short-circuits the gate to &quot;allowed&quot;)</td>
3167
+ <td>live + backtest (per attachment point)</td>
3168
+ </tr>
3169
+ <tr>
3170
+ <td>Hooks</td>
3171
+ <td><code>onSignalOpenCommit</code>, <code>onSignalCloseCommit</code>, <code>onOrderCheck</code>, <code>onSignalSync</code> (+ action <code>signalSync</code> / <code>orderCheck</code>)</td>
3172
+ <td><code>onSignalActivePing</code>, <code>onSignalSchedulePing</code>, <code>onSignalIdlePing</code>, <code>onSignalScheduleOpen/Cancelled</code>, <code>onSignalPendingOpen/Close</code> (+ action <code>onPingActive/Scheduled/Idle</code>, <code>onScheduleEvent</code>, <code>onPendingEvent</code>)</td>
3173
+ </tr>
3174
+ </tbody>
3175
+ </table>
3176
+ <a id="413-exception-based-hooks-a-throw-drives-the-framework" class="tsd-anchor"></a><h3 class="tsd-anchor-link">41.3 EXCEPTION-BASED hooks (a throw drives the framework)<a href="#413-exception-based-hooks-a-throw-drives-the-framework" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>These are emitted via <code>syncSubject</code> / <code>syncPendingSubject</code> <strong>before</strong> the framework mutates state; a throw (or <code>false</code>) is collapsed to &quot;not allowed&quot; by <code>CREATE_SYNC_FN</code> / <code>CREATE_SYNC_PENDING_FN</code>. All are <strong>live-only</strong>.</p>
3177
+ <table>
3178
+ <thead>
3179
+ <tr>
3180
+ <th>Hook</th>
3181
+ <th>A throw / <code>false</code> means</th>
3182
+ <th>Framework reaction</th>
3183
+ </tr>
3184
+ </thead>
3185
+ <tbody>
3186
+ <tr>
3187
+ <td><code>onSignalOpenCommit(payload)</code></td>
3188
+ <td>real entry not filled (limit rejected)</td>
3189
+ <td><strong>roll back the open</strong> → back to idle (a scheduled activation is cancelled), retry next tick</td>
3190
+ </tr>
3191
+ <tr>
3192
+ <td><code>onSignalCloseCommit(payload)</code></td>
3193
+ <td>real exit order failed</td>
3194
+ <td><strong>skip the close</strong> → position stays open, retry next tick</td>
3195
+ </tr>
3196
+ <tr>
3197
+ <td><code>onOrderCheck(payload)</code></td>
3198
+ <td>order <strong>not found by id</strong> (filled/cancelled/liquidated)</td>
3199
+ <td><strong>close</strong> the position, <code>closeReason: &quot;closed&quot;</code></td>
3200
+ </tr>
3201
+ <tr>
3202
+ <td><code>onSignalSync(event)</code> <em>(strategy <code>IStrategyParams</code>)</em></td>
3203
+ <td>sync to exchange failed (open or close)</td>
3204
+ <td>same as the two <code>*Commit</code> gates above — rides the <strong>same</strong> <code>syncSubject</code> emission</td>
3205
+ </tr>
3206
+ </tbody>
3207
+ </table>
3208
+ <ul>
3209
+ <li><code>onSignalOpenCommit</code> / <code>onSignalCloseCommit</code> and <code>onSignalSync</code> share one <code>syncSubject</code> emission: a throw from any of them is collapsed to <code>false</code> by <code>CREATE_SYNC_FN</code>, so they are interchangeable gates for the same open/close transition — don't gate the same transition in two of them.</li>
3210
+ <li><code>onOrderCheck</code> is the throw-driven equivalent of the EVENT-BASED <code>commitClosePending</code> for the &quot;order gone&quot; case — <strong>pick one, not both</strong>.</li>
3211
+ <li><strong>CRITICAL for <code>onOrderCheck</code>:</strong> swallow transient/network errors (timeout, 5xx, rate limit, disconnect) by returning — only a <em>confirmed</em> &quot;order not found by id&quot; is a valid reason to throw, or a connectivity blip wrongly closes an open position.</li>
3212
+ <li>The action-side methods <code>signalSync</code> / <code>orderCheck</code> (and callbacks <code>onSignalSync</code> / <code>onOrderCheck</code>) are the action-attachment equivalents of the same gates; they are <code>@deprecated</code> in favour of the Broker adapter.</li>
3213
+ </ul>
3214
+ <pre><code class="typescript"><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">MyBroker</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">onSignalOpenCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">) { </span><span class="hl-0">// entry gate</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">order</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">placeMarketOrder</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">position</span><span class="hl-2">, </span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">cost</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (!</span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">filled</span><span class="hl-2">) </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;entry not filled&quot;</span><span class="hl-2">); </span><span class="hl-0">// -&gt; roll back open, retry next tick</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">onOrderCheck</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">) { </span><span class="hl-0">// &quot;still there?&quot; gate</span><br/><span class="hl-2"> </span><span class="hl-4">let</span><span class="hl-2"> </span><span class="hl-5">order</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-6">try</span><span class="hl-2"> { </span><span class="hl-5">order</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">getOrderById</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">signalId</span><span class="hl-2">); }</span><br/><span class="hl-2"> </span><span class="hl-6">catch</span><span class="hl-2"> { </span><span class="hl-6">return</span><span class="hl-2">; } </span><span class="hl-0">// transient — keep open</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (!</span><span class="hl-5">order</span><span class="hl-2">) </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;order gone&quot;</span><span class="hl-2">); </span><span class="hl-0">// -&gt; close &quot;closed&quot;</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span>
3215
+ </code><button type="button">Copy</button></pre>
3216
+
3217
+ <a id="414-event-based-hooks-you-react-with-commit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">41.4 EVENT-BASED hooks (you react with <code>commit*</code>)<a href="#414-event-based-hooks-you-react-with-commit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>A throw here does <strong>not</strong> change strategy state — you observe the event and decide imperatively via a <code>commit*</code> function. Two sub-shapes:</p>
3218
+ <p><strong>Per-tick monitors</strong> — poll the real order each tick while the position/scheduled signal is live. This is where you reconcile VWAP with real fills: catch an <strong>SL that gapped through</strong> its level, or a <strong>TP that filled before VWAP</strong> reached it.</p>
3219
+ <table>
3220
+ <thead>
3221
+ <tr>
3222
+ <th>Hook (Broker / action)</th>
3223
+ <th>Real exchange event</th>
3224
+ <th><code>commit*</code> to call</th>
3225
+ <th>Effect on next tick</th>
3226
+ </tr>
3227
+ </thead>
3228
+ <tbody>
3229
+ <tr>
3230
+ <td><code>onSignalActivePing</code> / <code>onPingActive</code></td>
3231
+ <td>TP filled (maybe before VWAP)</td>
3232
+ <td><code>commitCreateTakeProfit(symbol, { id })</code></td>
3233
+ <td>close, <code>closeReason: &quot;take_profit&quot;</code></td>
3234
+ </tr>
3235
+ <tr>
3236
+ <td><code>onSignalActivePing</code> / <code>onPingActive</code></td>
3237
+ <td>SL filled / gapped through</td>
3238
+ <td><code>commitCreateStopLoss(symbol, { id })</code></td>
3239
+ <td>close, <code>closeReason: &quot;stop_loss&quot;</code></td>
3240
+ </tr>
3241
+ <tr>
3242
+ <td><code>onSignalActivePing</code> / <code>onPingActive</code></td>
3243
+ <td>no counterparty / liquidity gap</td>
3244
+ <td><code>commitClosePending(symbol, { id })</code></td>
3245
+ <td>close, <code>closeReason: &quot;closed&quot;</code></td>
3246
+ </tr>
3247
+ <tr>
3248
+ <td><code>onSignalSchedulePing</code> / <code>onPingScheduled</code></td>
3249
+ <td>resting order filled/resolved</td>
3250
+ <td><code>commitActivateScheduled(symbol, { id })</code></td>
3251
+ <td>promote scheduled → open without waiting for priceOpen</td>
3252
+ </tr>
3253
+ <tr>
3254
+ <td><code>onSignalSchedulePing</code> / <code>onPingScheduled</code></td>
3255
+ <td>resting order cancelled/rejected</td>
3256
+ <td><code>commitCancelScheduled(symbol, { id })</code></td>
3257
+ <td>drop the scheduled signal (strategy keeps running)</td>
3258
+ </tr>
3259
+ <tr>
3260
+ <td><code>onSignalIdlePing</code> / <code>onPingIdle</code></td>
3261
+ <td>— (no signal active)</td>
3262
+ <td>—</td>
3263
+ <td>idle heartbeat / housekeeping only</td>
3264
+ </tr>
3265
+ </tbody>
3266
+ </table>
3267
+ <p><strong>Lifecycle notifications</strong> — fire once at a transition (after it is committed; they cannot veto it). Use them to <strong>place</strong> or <strong>tear down</strong> real orders, not to poll.</p>
3268
+ <table>
3269
+ <thead>
3270
+ <tr>
3271
+ <th>Hook (Broker / action)</th>
3272
+ <th>Fires</th>
3273
+ <th>Typical action</th>
3274
+ </tr>
3275
+ </thead>
3276
+ <tbody>
3277
+ <tr>
3278
+ <td><code>onSignalScheduleOpen</code> / <code>onScheduleEvent</code> (<code>&quot;scheduled&quot;</code>)</td>
3279
+ <td>scheduled signal created</td>
3280
+ <td>place the resting/limit order (tag with <code>signalId</code>)</td>
3281
+ </tr>
3282
+ <tr>
3283
+ <td><code>onSignalScheduleCancelled</code> / <code>onScheduleEvent</code> (<code>&quot;cancelled&quot;</code>)</td>
3284
+ <td>scheduled signal dropped (timeout / price_reject / user)</td>
3285
+ <td>cancel the resting order</td>
3286
+ </tr>
3287
+ <tr>
3288
+ <td><code>onSignalPendingOpen</code> / <code>onPendingEvent</code> (<code>&quot;opened&quot;</code>)</td>
3289
+ <td>position opened</td>
3290
+ <td>place entry + protective TP/SL orders</td>
3291
+ </tr>
3292
+ <tr>
3293
+ <td><code>onSignalPendingClose</code> / <code>onPendingEvent</code> (<code>&quot;closed&quot;</code>)</td>
3294
+ <td>position closed</td>
3295
+ <td>flatten + cancel leftover orders, record PnL</td>
3296
+ </tr>
3297
+ </tbody>
3298
+ </table>
3299
+ <pre><code class="typescript"><span class="hl-6">import</span><span class="hl-2"> { </span><span class="hl-5">Broker</span><span class="hl-2">, </span><span class="hl-5">commitCreateTakeProfit</span><span class="hl-2">, </span><span class="hl-5">commitCreateStopLoss</span><span class="hl-2">, </span><span class="hl-5">commitClosePending</span><span class="hl-2"> } </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;backtest-kit&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">MyBroker</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">onSignalActivePing</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">) { </span><span class="hl-0">// per-tick, event-based</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">order</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">getOrderById</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">signalId</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">order</span><span class="hl-2">?.</span><span class="hl-5">status</span><span class="hl-2"> === </span><span class="hl-3">&quot;filled&quot;</span><span class="hl-2"> &amp;&amp; </span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">kind</span><span class="hl-2"> === </span><span class="hl-3">&quot;take_profit&quot;</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateTakeProfit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">id</span><span class="hl-2"> }); </span><span class="hl-0">// TP before VWAP</span><br/><span class="hl-2"> } </span><span class="hl-6">else</span><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">order</span><span class="hl-2">?.</span><span class="hl-5">status</span><span class="hl-2"> === </span><span class="hl-3">&quot;filled&quot;</span><span class="hl-2"> &amp;&amp; </span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">kind</span><span class="hl-2"> === </span><span class="hl-3">&quot;stop_loss&quot;</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateStopLoss</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">id</span><span class="hl-2"> }); </span><span class="hl-0">// SL gap</span><br/><span class="hl-2"> } </span><span class="hl-6">else</span><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">order</span><span class="hl-2">?.</span><span class="hl-5">status</span><span class="hl-2"> === </span><span class="hl-3">&quot;no_counterparty&quot;</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitClosePending</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-5">order</span><span class="hl-2">.</span><span class="hl-5">id</span><span class="hl-2"> });</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">onSignalPendingClose</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">) { </span><span class="hl-0">// lifecycle, event-based</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">flatten</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">cancelProtectiveOrders</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">signalId</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span><br/><span class="hl-5">Broker</span><span class="hl-2">.</span><span class="hl-1">useBrokerAdapter</span><span class="hl-2">(</span><span class="hl-5">MyBroker</span><span class="hl-2">);</span><br/><span class="hl-5">Broker</span><span class="hl-2">.</span><span class="hl-1">enable</span><span class="hl-2">();</span>
3300
+ </code><button type="button">Copy</button></pre>
3301
+
3302
+ <a id="415-choosing" class="tsd-anchor"></a><h3 class="tsd-anchor-link">41.5 Choosing<a href="#415-choosing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul>
3303
+ <li>Need to distinguish <strong>TP vs SL vs no-counterparty</strong>, or detect a <strong>gapped SL / early TP</strong>, or activate/cancel scheduled orders → <strong>EVENT-BASED</strong> per-tick hooks + <code>commit*</code>.</li>
3304
+ <li>Only need a binary <strong>open?/gone?</strong> decision and want the least code → <strong>EXCEPTION-BASED</strong> gate (<code>onOrderCheck</code>, or <code>onSignalOpenCommit</code>/<code>onSignalCloseCommit</code>).</li>
3305
+ <li>Want a <strong>separate infrastructure layer</strong> → Broker adapter (<code>IBroker</code>). Want it <strong>alongside a strategy</strong> or working in <strong>backtest</strong> too → action via <code>addActionSchema</code> (<code>IActionCallbacks</code>).</li>
3306
+ <li><strong>Never double-handle</strong> one condition with both styles — e.g. throwing in <code>onOrderCheck</code> <em>and</em> calling <code>commitClosePending</code> in <code>onSignalActivePing</code> for the same &quot;order gone&quot; event.</li>
3307
+ </ul>
3308
+ <hr>
3309
  <p>🤖 For the human-readable narrative, see <a href="../media/README.md">README.md</a>. MIT © <a href="https://github.com/tripolskypetr">tripolskypetr</a>.</p>
3310
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#🧿-backtest-kit--technical-reference-for-language-models"><span>🧿 <wbr/>Backtest <wbr/>Kit — <wbr/>Technical <wbr/>Reference for <wbr/>Language <wbr/>Models</span></a><ul><li><a href="#table-of-contents"><span>Table of <wbr/>Contents</span></a></li><li><a href="#1-mental-model--guarantees"><span>1. <wbr/>Mental model &amp; guarantees</span></a></li><li><a href="#2-installation--ecosystem-packages"><span>2. <wbr/>Installation &amp; ecosystem packages</span></a></li><li><ul><li><a href="#core-install"><span>Core install</span></a></li><li><a href="#scaffolding-fastest-paths"><span>Scaffolding (fastest paths)</span></a></li><li><a href="#ecosystem-packages"><span>Ecosystem packages</span></a></li></ul></li><li><a href="#3-quick-start"><span>3. <wbr/>Quick start</span></a></li><li><ul><li><a href="#31-basic-configuration"><span>3.1 <wbr/>Basic configuration</span></a></li><li><a href="#32-register-components"><span>3.2 <wbr/>Register components</span></a></li><li><a href="#33-define-a-strategy-with-an-llm"><span>3.3 <wbr/>Define a strategy (with an LLM)</span></a></li><li><a href="#34-run-a-backtest"><span>3.4 <wbr/>Run a backtest</span></a></li><li><a href="#35-run-live-trading"><span>3.5 <wbr/>Run live trading</span></a></li><li><a href="#36-complete-end-to-end-example-single-file"><span>3.6 <wbr/>Complete end-<wbr/>to-<wbr/>end example (single file)</span></a></li></ul></li><li><a href="#4-core-concepts"><span>4. <wbr/>Core concepts</span></a></li><li><ul><li><a href="#41-dependency-inversion-via-string-names"><span>4.1 <wbr/>Dependency inversion via string names</span></a></li><li><a href="#42-the-context-object"><span>4.2 <wbr/>The context object</span></a></li><li><a href="#43-two-ways-to-run-the-engine"><span>4.3 <wbr/>Two ways to run the engine</span></a></li><li><a href="#44-signals-scheduled-vs-immediate"><span>4.4 <wbr/>Signals: scheduled vs immediate</span></a></li><li><a href="#45-supported-order-types"><span>4.5 <wbr/>Supported order types</span></a></li></ul></li><li><a href="#5-the-execution-model"><span>5. <wbr/>The execution model</span></a></li><li><ul><li><a href="#51-async-context-propagation"><span>5.1 <wbr/>Async context propagation</span></a></li><li><a href="#52-vwap-pricing"><span>5.2 VWAP pricing</span></a></li><li><a href="#53-candle-timestamp-convention"><span>5.3 <wbr/>Candle timestamp convention</span></a></li><li><a href="#54-look-ahead-bias-protection"><span>5.4 <wbr/>Look-<wbr/>ahead bias protection</span></a></li><li><a href="#55-interval-throttling"><span>5.5 <wbr/>Interval throttling</span></a></li></ul></li><li><a href="#6-schema-registration-reference"><span>6. <wbr/>Schema registration reference</span></a></li><li><ul><li><a href="#61-exchange-schema--addexchangeschemaschema-iexchangeschema"><span>6.1 <wbr/>Exchange schema — add<wbr/>Exchange<wbr/>Schema(schema: IExchange<wbr/>Schema)</span></a></li><li><a href="#62-strategy-schema--addstrategyschemaschema-istrategyschema"><span>6.2 <wbr/>Strategy schema — add<wbr/>Strategy<wbr/>Schema(schema: IStrategy<wbr/>Schema)</span></a></li><li><a href="#63-frame-schema--addframeschemaschema-iframeschema"><span>6.3 <wbr/>Frame schema — add<wbr/>Frame<wbr/>Schema(schema: IFrame<wbr/>Schema)</span></a></li><li><a href="#64-risk-schema--see-§16"><span>6.4 <wbr/>Risk schema — see §16</span></a></li><li><a href="#65-sizing-schema--see-§15"><span>6.5 <wbr/>Sizing schema — see §15</span></a></li><li><a href="#66-walker-schema--see-§133"><span>6.6 <wbr/>Walker schema — see §13.3</span></a></li><li><a href="#67-action-schema--see-§22"><span>6.7 <wbr/>Action schema — see §22</span></a></li></ul></li><li><a href="#7-signal-lifecycle--tick-results"><span>7. <wbr/>Signal lifecycle &amp; tick results</span></a></li><li><ul><li><a href="#71-state-machine"><span>7.1 <wbr/>State machine</span></a></li><li><a href="#72-tick-result-union"><span>7.2 <wbr/>Tick result union</span></a></li><li><a href="#73-pnl-object--istrategypnl"><span>7.3 PNL object — IStrategy<wbr/>PnL</span></a></li><li><a href="#74-ipublicsignalrow--the-signal-object-surfaced-everywhere"><span>7.4 IPublic<wbr/>Signal<wbr/>Row — the signal object surfaced everywhere</span></a></li><li><a href="#75-signal-validation-rules"><span>7.5 <wbr/>Signal validation rules</span></a></li><li><a href="#76-candle-data-validation"><span>7.6 <wbr/>Candle data validation</span></a></li></ul></li><li><a href="#8-strategy-context-functions"><span>8. <wbr/>Strategy context functions</span></a></li><li><ul><li><a href="#81-signal--position-queries"><span>8.1 <wbr/>Signal &amp; position queries</span></a></li><li><a href="#82-meta-functions"><span>8.2 <wbr/>Meta functions</span></a></li><li><a href="#83-createsignalstate--typed-per-signal-accumulator-recommended"><span>8.3 create<wbr/>Signal<wbr/>State — typed per-<wbr/>signal accumulator (recommended)</span></a></li></ul></li><li><a href="#9-commit-functions"><span>9. <wbr/>Commit functions</span></a></li><li><ul><li><a href="#91-lifecycle-commits"><span>9.1 <wbr/>Lifecycle commits</span></a></li><li><a href="#92-dca-dollar-cost-averaging"><span>9.2 DCA (dollar-<wbr/>cost averaging)</span></a></li><li><a href="#93-partial-closes"><span>9.3 <wbr/>Partial closes</span></a></li><li><a href="#94-trailing--breakeven"><span>9.4 <wbr/>Trailing &amp; breakeven</span></a></li></ul></li><li><a href="#10-position-analytics-functions"><span>10. <wbr/>Position analytics functions</span></a></li><li><ul><li><a href="#101-composition--cost-basis"><span>10.1 <wbr/>Composition &amp; cost basis</span></a></li><li><a href="#102-live-pnl"><span>10.2 <wbr/>Live PNL</span></a></li><li><a href="#103-timing"><span>10.3 <wbr/>Timing</span></a></li><li><a href="#104-peak-profit-best-favorable-excursion"><span>10.4 <wbr/>Peak profit (best favorable excursion)</span></a></li><li><a href="#105-max-drawdown-worst-adverse-excursion"><span>10.5 <wbr/>Max drawdown (worst adverse excursion)</span></a></li><li><a href="#106-cross-section-distances-peak-↔-trough-analysis"><span>10.6 <wbr/>Cross-<wbr/>section distances (peak ↔ trough analysis)</span></a></li><li><a href="#107-overlap-dca--partial-spacing-diagnostics"><span>10.7 <wbr/>Overlap (DCA / partial spacing diagnostics)</span></a></li></ul></li><li><a href="#11-exchange-data-api--candle-math"><span>11. <wbr/>Exchange data API &amp; candle math</span></a></li><li><ul><li><a href="#111-functions"><span>11.1 <wbr/>Functions</span></a></li><li><a href="#112-getrawcandles-parameter-combinations"><span>11.2 get<wbr/>Raw<wbr/>Candles parameter combinations</span></a></li><li><a href="#113-timestamp-alignment-math-worked-example"><span>11.3 <wbr/>Timestamp alignment math (worked example)</span></a></li><li><a href="#114-order-book--aggregated-trades-windows"><span>11.4 <wbr/>Order book &amp; aggregated trades windows</span></a></li><li><a href="#115-candle-cache"><span>11.5 <wbr/>Candle cache</span></a></li></ul></li><li><a href="#12-pnl-dca--effective-price-math"><span>12. PNL, DCA &amp; effective-<wbr/>price math</span></a></li><li><ul><li><a href="#121-effective-priceopen"><span>12.1 <wbr/>Effective price<wbr/>Open</span></a></li><li><a href="#122-worked-scenario"><span>12.2 <wbr/>Worked scenario</span></a></li><li><a href="#123-cost-basis-replay-algorithm"><span>12.3 <wbr/>Cost-<wbr/>basis replay algorithm</span></a></li></ul></li><li><a href="#13-runners-backtest-live-walker"><span>13. <wbr/>Runners: <wbr/>Backtest, <wbr/>Live, <wbr/>Walker</span></a></li><li><ul><li><a href="#131-backtest"><span>13.1 <wbr/>Backtest</span></a></li><li><a href="#132-live"><span>13.2 <wbr/>Live</span></a></li><li><a href="#133-walker"><span>13.3 <wbr/>Walker</span></a></li><li><a href="#134-graceful-shutdown--task-monitoring"><span>13.4 <wbr/>Graceful shutdown &amp; task monitoring</span></a></li></ul></li><li><a href="#14-analytics--reports"><span>14. <wbr/>Analytics &amp; reports</span></a></li><li><ul><li><a href="#141-heat--portfolio-heatmap-across-symbols"><span>14.1 <wbr/>Heat — portfolio heatmap across symbols</span></a></li><li><a href="#142-schedule--scheduled-signal-stats"><span>14.2 <wbr/>Schedule — scheduled-<wbr/>signal stats</span></a></li><li><a href="#143-partial--partial-profitloss-milestone-stats"><span>14.3 <wbr/>Partial — partial profit/loss milestone stats</span></a></li><li><a href="#144-position--signal-dto-builders--open-position-snapshot"><span>14.4 <wbr/>Position — signal-<wbr/>DTO builders + open-<wbr/>position snapshot</span></a></li><li><a href="#145-highestprofit--maxdrawdown--excursion-stats"><span>14.5 <wbr/>Highest<wbr/>Profit &amp; <wbr/>Max<wbr/>Drawdown — excursion stats</span></a></li><li><a href="#146-risk--risk-rejection-stats"><span>14.6 <wbr/>Risk — risk-<wbr/>rejection stats</span></a></li><li><a href="#147-performance--revenue-profiling"><span>14.7 <wbr/>Performance — revenue profiling</span></a></li><li><a href="#148-sync--order-sync-stats--see-§19"><span>14.8 <wbr/>Sync — order-<wbr/>sync stats — see §19</span></a></li><li><a href="#149-lookup--parallel-run-coordination"><span>14.9 <wbr/>Lookup — parallel-<wbr/>run coordination</span></a></li></ul></li><li><a href="#15-position-sizing"><span>15. <wbr/>Position sizing</span></a></li><li><a href="#16-risk-management"><span>16. <wbr/>Risk management</span></a></li><li><a href="#17-broker-transactional-live-orders"><span>17. <wbr/>Broker: transactional live orders</span></a></li><li><ul><li><a href="#171-ibroker-interface--payloads"><span>17.1 IBroker interface &amp; payloads</span></a></li><li><a href="#172-spot-adapter-binance-via-ccxt--complete-reference-implementation"><span>17.2 <wbr/>Spot adapter (<wbr/>Binance via ccxt) — complete reference implementation</span></a></li><li><a href="#173-futures-adapter--key-differences-from-spot"><span>17.3 <wbr/>Futures adapter — key differences from spot</span></a></li><li><a href="#174-onorderping-optional"><span>17.4 on<wbr/>Order<wbr/>Ping (optional)</span></a></li></ul></li><li><a href="#18-cron-virtual-time-scheduler"><span>18. <wbr/>Cron: virtual-<wbr/>time scheduler</span></a></li><li><ul><li><a href="#181-api"><span>18.1 API</span></a></li><li><a href="#182-two-modes-×-two-scopes"><span>18.2 <wbr/>Two modes × two scopes</span></a></li><li><a href="#183-internals-coordination"><span>18.3 <wbr/>Internals (coordination)</span></a></li></ul></li><li><a href="#19-sync-order-synchronization"><span>19. <wbr/>Sync: order synchronization</span></a></li><li><a href="#20-per-signal-memory-state-session-storage-recent"><span>20. <wbr/>Per-<wbr/>signal <wbr/>Memory, <wbr/>State, <wbr/>Session, <wbr/>Storage, <wbr/>Recent</span></a></li><li><ul><li><a href="#201-memory--bm25-searchable-per-signal-store"><span>20.1 <wbr/>Memory — BM25-<wbr/>searchable per-<wbr/>signal store</span></a></li><li><a href="#202-state--typed-per-signal-accumulator"><span>20.2 <wbr/>State — typed per-<wbr/>signal accumulator</span></a></li><li><a href="#203-session--per-context-cross-candle-store"><span>20.3 <wbr/>Session — per-<wbr/>context cross-<wbr/>candle store</span></a></li><li><a href="#204-storage--recent"><span>20.4 <wbr/>Storage &amp; <wbr/>Recent</span></a></li></ul></li><li><a href="#21-dump-agent-reasoning--record-capture"><span>21. <wbr/>Dump: agent reasoning &amp; record capture</span></a></li><li><a href="#22-actions-pluggable-event-handlers"><span>22. <wbr/>Actions: pluggable event handlers</span></a></li><li><a href="#225-strategy-recipes"><span>22.5 <wbr/>Strategy recipes</span></a></li><li><ul><li><a href="#scale-out-at-kelly-levels-via-the-milestone-listener"><span>Scale-<wbr/>out at <wbr/>Kelly levels via the milestone listener</span></a></li><li><a href="#breakeven-then-trail-callback-driven"><span>Breakeven then trail (callback-<wbr/>driven)</span></a></li><li><a href="#long-dca-ladder-add-rungs-on-new-lows-close-at-blended-profit"><span>LONG DCA ladder (add rungs on new lows, close at blended profit)</span></a></li><li><a href="#short-dca-ladder"><span>SHORT DCA ladder</span></a></li><li><a href="#cooldown-after-a-stop-loss"><span>Cooldown after a stop-<wbr/>loss</span></a></li><li><a href="#scheduled-limitgrid-entry"><span>Scheduled (limit/grid) entry</span></a></li><li><a href="#llm-capitulation-exit-via-per-signal-state"><span>LLM capitulation exit via per-<wbr/>signal state</span></a></li></ul></li><li><a href="#23-event-listeners"><span>23. <wbr/>Event listeners</span></a></li><li><ul><li><a href="#231-signal-lifecycle"><span>23.1 <wbr/>Signal lifecycle</span></a></li><li><a href="#232-completion--progress"><span>23.2 <wbr/>Completion &amp; progress</span></a></li><li><a href="#233-ping--milestone"><span>23.3 <wbr/>Ping &amp; milestone</span></a></li><li><a href="#234-system--lifecycle"><span>23.4 <wbr/>System &amp; lifecycle</span></a></li></ul></li><li><a href="#24-notifications"><span>24. <wbr/>Notifications</span></a></li><li><a href="#25-persistence-adapters"><span>25. <wbr/>Persistence adapters</span></a></li><li><ul><li><a href="#251-the-15-domains"><span>25.1 <wbr/>The 15 domains</span></a></li><li><a href="#252-default-file-layout"><span>25.2 <wbr/>Default file layout</span></a></li><li><a href="#253-persistbase--the-base-contract"><span>25.3 <wbr/>Persist<wbr/>Base — the base contract</span></a></li><li><a href="#254-custom-adapter--redis-example"><span>25.4 <wbr/>Custom adapter — <wbr/>Redis example</span></a></li><li><a href="#256-custom-adapter--mongodb-example"><span>25.6 <wbr/>Custom adapter — <wbr/>MongoDB example</span></a></li><li><a href="#257-scheduled-signal-crash-recovery"><span>25.7 <wbr/>Scheduled-<wbr/>signal crash recovery</span></a></li><li><a href="#255-direct-use"><span>25.5 <wbr/>Direct use</span></a></li></ul></li><li><a href="#26-global-configuration-reference"><span>26. <wbr/>Global configuration reference</span></a></li><li><ul><li><a href="#261-execution--pricing"><span>26.1 <wbr/>Execution &amp; pricing</span></a></li><li><a href="#262-signal-validation--lifetime"><span>26.2 <wbr/>Signal validation &amp; lifetime</span></a></li><li><a href="#263-candle-fetching--anomaly-detection"><span>26.3 <wbr/>Candle fetching &amp; anomaly detection</span></a></li><li><a href="#264-order-book--aggregated-trades"><span>26.4 <wbr/>Order book &amp; aggregated trades</span></a></li><li><a href="#265-behavior-toggles"><span>26.5 <wbr/>Behavior toggles</span></a></li><li><a href="#266-report-row-caps"><span>26.6 <wbr/>Report row caps</span></a></li></ul></li><li><a href="#27-math-helpers--utilities"><span>27. <wbr/>Math helpers &amp; utilities</span></a></li><li><a href="#28-reflection--introspection"><span>28. <wbr/>Reflection &amp; introspection</span></a></li><li><a href="#29-ai-strategy-optimizer"><span>29. AI strategy optimizer</span></a></li><li><a href="#30-strategy-examples"><span>30. <wbr/>Strategy examples</span></a></li><li><a href="#31-architecture-overview"><span>31. <wbr/>Architecture overview</span></a></li><li><a href="#32-complete-public-export-index"><span>32. <wbr/>Complete public export index</span></a></li><li><a href="#notes-for-language-models"><span>Notes for language models</span></a></li><li><a href="#33-ecosystem-packages--detailed-api"><span>33. <wbr/>Ecosystem packages — detailed API</span></a></li><li><ul><li><a href="#331-backtest-kitpinets--pine-script-v5v6-runtime"><span>33.1 @backtest-<wbr/>kit/pinets — <wbr/>Pine <wbr/>Script v5/v6 runtime</span></a></li><li><a href="#332-backtest-kitgraph--typed-dag-of-computations"><span>33.2 @backtest-<wbr/>kit/graph — typed DAG of computations</span></a></li><li><a href="#333-backtest-kitollama--multi-provider-llm--optimizer"><span>33.3 @backtest-<wbr/>kit/ollama — multi-<wbr/>provider LLM + <wbr/>Optimizer</span></a></li><li><a href="#334-backtest-kitsignals--50-indicators-across-4-timeframes"><span>33.4 @backtest-<wbr/>kit/signals — 50+ indicators across 4 timeframes</span></a></li><li><a href="#335-backtest-kitmongo--mongodb--redis-persistence"><span>33.5 @backtest-<wbr/>kit/mongo — <wbr/>MongoDB + <wbr/>Redis persistence</span></a></li><li><a href="#336-backtest-kitui--full-stack-dashboard"><span>33.6 @backtest-<wbr/>kit/ui — full-<wbr/>stack dashboard</span></a></li><li><a href="#337-backtest-kitcli--zero-boilerplate-runner"><span>33.7 @backtest-<wbr/>kit/cli — zero-<wbr/>boilerplate runner</span></a></li><li><ul><li><a href="#modes"><span>Modes</span></a></li><li><a href="#common-flags"><span>Common flags</span></a></li><li><a href="#walker-mode"><span>Walker mode</span></a></li><li><a href="#main-mode----entry-multi-symbol-fan-out"><span>Main mode &amp; --entry (multi-<wbr/>symbol fan-<wbr/>out)</span></a></li><li><a href="#monorepo--per-strategy-isolation"><span>Monorepo &amp; per-<wbr/>strategy isolation</span></a></li><li><a href="#shared-import-aliases"><span>Shared import aliases</span></a></li><li><a href="#module-hooks-broker-adapters"><span>Module hooks (broker adapters)</span></a></li><li><a href="#config-hooks-configconfig"><span>Config hooks (config/*.config)</span></a></li><li><a href="#entry-point-formats--pine-mode"><span>Entry-<wbr/>point formats &amp; <wbr/>Pine mode</span></a></li></ul></li><li><a href="#338-backtest-kitsidekick--full-control-scaffolder"><span>33.8 @backtest-<wbr/>kit/sidekick — full-<wbr/>control scaffolder</span></a></li><li><a href="#339-quant-math-companions"><span>33.9 <wbr/>Quant-<wbr/>math companions</span></a></li></ul></li><li><a href="#34-strategy-examples-reference-implementations"><span>34. <wbr/>Strategy examples (reference implementations)</span></a></li><li><ul><li><a href="#341-index-documented-results"><span>34.1 <wbr/>Index (documented results)</span></a></li><li><a href="#342-marapr-2026--dca-ladder-the-core-dca-pattern"><span>34.2 <wbr/>Mar/<wbr/>Apr 2026 — DCA ladder (the core DCA pattern)</span></a></li><li><a href="#343-feb-2026--ai-news-sentiment-llm--graph"><span>34.3 <wbr/>Feb 2026 — AI news sentiment (LLM + graph)</span></a></li><li><a href="#344-jan-2026--liquidity-harvesting-telegram-signals-inverted"><span>34.4 <wbr/>Jan 2026 — liquidity harvesting (<wbr/>Telegram signals, inverted)</span></a></li><li><a href="#345-oct-2021--tensorflow-neural-network"><span>34.5 <wbr/>Oct 2021 — <wbr/>Tensor<wbr/>Flow neural network</span></a></li><li><a href="#346-dec-2025--pine-script-range-breakout"><span>34.6 <wbr/>Dec 2025 — <wbr/>Pine <wbr/>Script range breakout</span></a></li><li><a href="#347-feb-2021--python-ema-crossover-webassembly"><span>34.7 <wbr/>Feb 2021 — <wbr/>Python EMA crossover (<wbr/>Web<wbr/>Assembly)</span></a></li><li><a href="#348-apr-2024--polymarket-δprob"><span>34.8 <wbr/>Apr 2024 — <wbr/>Polymarket Δprob</span></a></li></ul></li><li><a href="#35-raw-library-demos-no-cli"><span>35. <wbr/>Raw-<wbr/>library demos (no CLI)</span></a></li><li><ul><li><a href="#351-demobacktest--backtest--reports--risk"><span>35.1 demo/backtest — backtest + reports + risk</span></a></li><li><a href="#352-demolive--live--per-event-report-dumps"><span>35.2 demo/live — live + per-<wbr/>event report dumps</span></a></li><li><a href="#353-democcxt--full-exchange-schema--quant-math-models"><span>35.3 demo/ccxt — full exchange schema + quant-<wbr/>math models</span></a></li><li><a href="#354-demooptimization--ai-optimizer-end-to-end"><span>35.4 demo/optimization — AI optimizer end-<wbr/>to-<wbr/>end</span></a></li><li><a href="#355-demopinets--raw-pine-script-run"><span>35.5 demo/pinets — raw <wbr/>Pine <wbr/>Script run</span></a></li></ul></li><li><a href="#36-framework-philosophy--further-reading"><span>36. <wbr/>Framework philosophy &amp; further reading</span></a></li><li><ul><li><a href="#361-foundational-concepts"><span>36.1 <wbr/>Foundational concepts</span></a></li><li><a href="#362-why-backtests-lie-and-what-the-engine-does-about-it"><span>36.2 <wbr/>Why backtests lie, and what the engine does about it</span></a></li><li><a href="#363-ai-as-the-strategy-developer"><span>36.3 AI as the strategy developer</span></a></li><li><a href="#364-worked-edges-each-maps-to-a-shipped-strategy"><span>36.4 <wbr/>Worked edges (each maps to a shipped strategy)</span></a></li><li><a href="#365-reading-order"><span>36.5 <wbr/>Reading order</span></a></li></ul></li><li><a href="#37-markdown-report-catalog"><span>37. <wbr/>Markdown report catalog</span></a></li><li><ul><li><a href="#371-the-13-reports"><span>37.1 <wbr/>The 13 reports</span></a></li><li><a href="#372-what-each-report-contains"><span>37.2 <wbr/>What each report contains</span></a></li><li><a href="#373-customizing-report-columns"><span>37.3 <wbr/>Customizing report columns</span></a></li></ul></li><li><a href="#38-jsonl-report-streams"><span>38. JSONL report streams</span></a></li><li><ul><li><a href="#381-markdown-layer-vs-jsonl-layer"><span>38.1 <wbr/>Markdown layer vs JSONL layer</span></a></li><li><a href="#382-enabling--reportenableconfig"><span>38.2 <wbr/>Enabling — <wbr/>Report.enable(config?)</span></a></li><li><a href="#383-the-13-streams"><span>38.3 <wbr/>The 13 streams</span></a></li><li><a href="#384-row-shape"><span>38.4 <wbr/>Row shape</span></a></li></ul></li><li><a href="#39-schema--graph-validation"><span>39. <wbr/>Schema &amp; graph validation</span></a></li><li><ul><li><a href="#391-shallow-schema-validation-registration"><span>39.1 <wbr/>Shallow schema validation (registration)</span></a></li><li><a href="#392-graph-validation-run-time"><span>39.2 <wbr/>Graph validation (run time)</span></a></li><li><a href="#393-global-config--column-validation"><span>39.3 <wbr/>Global-<wbr/>config &amp; column validation</span></a></li><li><a href="#394-summary-of-guarantees"><span>39.4 <wbr/>Summary of guarantees</span></a></li></ul></li><li><a href="#40-config-in-practice--where-each-parameter-is-consumed"><span>40. <wbr/>Config in practice — where each parameter is consumed</span></a></li><li><ul><li><a href="#401-pricing-fees--pnl-math"><span>40.1 <wbr/>Pricing, fees &amp; PNL math</span></a></li><li><a href="#402-signal-validation--lifetime"><span>40.2 <wbr/>Signal validation &amp; lifetime</span></a></li><li><a href="#403-behavior-toggles-the-big-four-_everywhere"><span>40.3 <wbr/>Behavior toggles (the big four *_<wbr/>EVERYWHERE)</span></a></li><li><a href="#404-candle-fetching-order-book--trades"><span>40.4 <wbr/>Candle fetching, order book &amp; trades</span></a></li><li><a href="#405-storage-caps--report-rows"><span>40.5 <wbr/>Storage caps &amp; report rows</span></a></li><li><a href="#406-column_config--report-table-columns"><span>40.6 COLUMN_<wbr/>CONFIG — report table columns</span></a></li></ul></li><li><a href="#41-binding-the-framework-to-a-real-exchange--exception-based-vs-event-based"><span>41. <wbr/>Binding the framework to a real exchange — EXCEPTION-<wbr/>BASED vs EVENT-<wbr/>BASED</span></a></li><li><ul><li><a href="#411-two-attachment-points"><span>41.1 <wbr/>Two attachment points</span></a></li><li><a href="#412-two-interaction-styles"><span>41.2 <wbr/>Two interaction styles</span></a></li><li><a href="#413-exception-based-hooks-a-throw-drives-the-framework"><span>41.3 EXCEPTION-<wbr/>BASED hooks (a throw drives the framework)</span></a></li><li><a href="#414-event-based-hooks-you-react-with-commit"><span>41.4 EVENT-<wbr/>BASED hooks (you react with commit*)</span></a></li><li><a href="#415-choosing"><span>41.5 <wbr/>Choosing</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
3311
 
3312
  <!-- Yandex.Metrika counter -->
3313
  <script type="text/javascript">
documents/concept_03_manual_control_adapter.html ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>concept/03_manual_control_adapter | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="concept_03_manual_control_adapter.html">concept/03_manual_control_adapter</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="🕹️-how-to-debug-your-bots-exchange-connection-in-an-hour-not-three-days" class="tsd-anchor"></a><h1 class="tsd-anchor-link">🕹️ How to Debug Your Bot's Exchange Connection in an Hour, Not Three Days<a href="#🕹️-how-to-debug-your-bots-exchange-connection-in-an-hour-not-three-days" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><blockquote>
2
+ <p>The source code discussed in this article is published <a href="https://github.com/tripolskypetr/backtest-kit">in this repository</a></p>
3
+ </blockquote>
4
+ <p><img src="../media/cover_manual_control_adapter_debug.jpg" alt="cover_manual_control_adapter_debug"></p>
5
+ <p>A surgeon isn't allowed into the operating room until they've practiced a suture a hundred times on a trainer. A pilot sits in a full-scale cockpit simulator — same switches, same inertia, same engine failure on takeoff — long before their first live flight. No one would think to teach a pilot to fly by sending them on an actual flight and waiting for something to break.</p>
6
+ <p>But in algotrading, that's exactly what we do.</p>
7
+ <a id="the-pain-nobody-writes-about-in-tutorials" class="tsd-anchor"></a><h2 class="tsd-anchor-link">The Pain Nobody Writes About in Tutorials<a href="#the-pain-nobody-writes-about-in-tutorials" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The backtest is green. Paper trading is green. The strategy is mathematically sound, look-ahead bias is scrubbed out, the metrics are honest. You write an exchange adapter — the very layer that turns a signal <code>{ position: 'long', priceOpen: 66817 }</code> into a real order on the exchange. And you launch the bot in live.</p>
8
+ <p>And then begins what nobody writes about in competitors' READMEs.</p>
9
+ <p>To verify that the adapter even <strong>works</strong> — that the order goes through, leverage gets set, <code>positionSide</code> in hedge mode isn't mixed up, quantity rounding passes the exchange's filters, TP/SL land on the correct side — you need to wait for a <strong>trading signal</strong>.</p>
10
+ <p>And the signal may not come. A day. Two. Three days.</p>
11
+ <p>By its very nature, a strategy stays silent most of the time: it waits for conditions, waits for a breakout, waits for news. You sit and stare at a log where nothing is happening. The bot is alive, the bot is healthy, the bot is waiting. And then the moment comes. At 03:47 in the morning the conditions align, the bot forms a signal, pulls the adapter and... catches a bug.</p>
12
+ <pre><code class="yaml"><span class="hl-14">ExchangeAPIException</span><span class="hl-2">: </span><span class="hl-15">-4061 Order&#39;s position side does not match user&#39;s setting.</span>
13
+ </code><button type="button">Copy</button></pre>
14
+
15
+ <p>Congratulations. You spent three days of waiting to learn that in hedge mode you need to send <code>positionSide</code> as <code>LONG</code>, not <code>BOTH</code>. You fix one line. And you wait another three days until the next signal to check that <strong>this time</strong> the quantity rounding under <code>stepSize</code> won't fall apart.</p>
16
+ <p>The integration debugging cycle is <strong>three days per iteration</strong>. And the fix itself is a single line.</p>
17
+ <a id="why-you-cant-catch-this-by-staring-hard" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Why You Can't Catch This by &quot;Staring Hard&quot;<a href="#why-you-cant-catch-this-by-staring-hard" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The obvious counterargument: &quot;read the adapter code by eye, find the bug before launch.&quot;</p>
18
+ <p>Doesn't work. Exchange integration isn't about logic, it's about <strong>a hundred micro-mismatches with reality</strong> that are impossible to see in code:</p>
19
+ <ul>
20
+ <li><code>stepSize</code> and <code>tickSize</code> differ for every pair, and the exchange will reject an order with one extra decimal place;</li>
21
+ <li>minimum notional (<code>minNotional</code>) — an order for $4 goes through, but $3.90 doesn't;</li>
22
+ <li>in hedge mode you need <code>positionSide</code>, in one-way mode you can't send it at all;</li>
23
+ <li><code>reduceOnly</code> on close, otherwise you'll open a counter-position instead of exiting;</li>
24
+ <li><code>stop_loss_limit</code> on spot vs <code>STOP_MARKET</code> on futures — different order types, different fields;</li>
25
+ <li>ghost position: the exchange shows a remainder of 0.0000001 coins, and <code>closePosition</code> goes into an infinite loop.</li>
26
+ </ul>
27
+ <p>Each of these points is a separate trip to the exchange's documentation, which is <strong>verified only by a live call</strong>. You won't catch it by eye, because the bug isn't in your logic — the bug is in how your logic meets the specific settings of a specific account on a specific exchange.</p>
28
+ <p>The standard debugging path looks like this:</p>
29
+ <ol>
30
+ <li>Write the adapter from the exchange docs</li>
31
+ <li>Launch live</li>
32
+ <li>Wait for a signal (hours — days)</li>
33
+ <li>Signal arrives -&gt; catch -4061 / -1111 / -2010</li>
34
+ <li>Fix one line</li>
35
+ <li>GOTO 2</li>
36
+ </ol>
37
+ <p>This isn't debugging. It's roulette with a spin interval of a day.</p>
38
+ <a id="a-control-button-for-the-human" class="tsd-anchor"></a><h2 class="tsd-anchor-link">A Control Button for the Human<a href="#a-control-button-for-the-human" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><a href="https://www.npmjs.com/package/backtest-kit">backtest-kit</a> has a web dashboard (<a href="https://www.npmjs.com/package/@backtest-kit/ui">@backtest-kit/ui</a>), and in it — a <strong>Manual Control</strong> section. This isn't &quot;view the position state.&quot; These are <strong>physical buttons that pull the very same broker-adapter hooks as the real strategy</strong>:</p>
39
+ <p><img src="../media/manual_control_open_position.png" alt="manual_control_open_position"></p>
40
+ <ul>
41
+ <li><code>OPEN POSITION</code> — open a position by hand, right now;</li>
42
+ <li><code>COMMIT AVERAGING</code> — average in (the same <code>onAverageBuyCommit</code>);</li>
43
+ <li><code>COMMIT BREAKEVEN</code> — move the stop to breakeven;</li>
44
+ <li><code>CLOSE POSITION</code> — close.</li>
45
+ </ul>
46
+ <p><img src="../media/manual_control_position_state.png" alt="manual_control_position_state"></p>
47
+ <p>You're not verifying a line of code — you're verifying <strong>how the system works as a whole</strong>: adapter -&gt; engine -&gt; persistence -&gt; opening a position -&gt; protective orders. It's the difference between &quot;read the function's code&quot; and &quot;watched the function run inside a living organism.&quot;</p>
48
+ <p><img src="../media/manual_control_dashboard.png" alt="manual_control_dashboard"></p>
49
+ <a id="not-just-for-debugging" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Not Just for Debugging<a href="#not-just-for-debugging" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>A button that pulls a real hook on a real account is a full-fledged trading instrument. And here's where it suddenly solves problems for which writing a dedicated strategy is impossible, since the conditions can't be reproduced in a backtest.</p>
50
+ <p><img src="../media/manual_control_pnl_overview.png" alt="manual_control_pnl_overview"></p>
51
+ <p><strong>1. A manual hedge against insider info the strategy doesn't see.</strong></p>
52
+ <p>Your strategy trades LONG on minute candles — it catches microstructure, local impulses, but by construction it's blind to the macro picture. And then you learn something before the market does: in an hour there's a rate decision / a delisting court ruling / a major exchange hack — something after which the market will collapse in panic. Rewriting the minute strategy for this is pointless: it's about something else. But you have an open LONG position, and it'll catch the whole crash.</p>
53
+ <p>You manually open a <strong>global SHORT</strong> on top — with the same <code>OPEN POSITION</code>, with <code>minuteEstimatedTime: Infinity</code>, like an umbrella over the entire portfolio. The minute strategy keeps doing its job as if nothing happened, while the manual short neutralizes the systemic risk exactly for the window until the news plays out. The dashboard meanwhile honestly shows both positions and the total PNL — you see net exposure rather than guessing. After the news, you close the short with a button and return to normal mode.</p>
54
+ <p><strong>2. A way out when the strategy has lost its edge, but the bot is obligated to act.</strong></p>
55
+ <p>The reality of a production deployment at a hedge fund or on a managed account: the bot has to <strong>show activity for reporting</strong>. And the strategy may go weeks without seeing an effective entry point — the market is ranging, conditions don't align, the edge has temporarily evaporated. Formally everything is correct: better not to trade than to trade garbage. But to an investor/compliance, &quot;the bot did nothing for two weeks&quot; looks like &quot;the bot broke.&quot;</p>
56
+ <p>Manual control bridges this gap. You can manually open/close a controlled position for the reporting period, record a meaningful action in the JSONL logs (with a <code>note</code> explaining the reason), and not cripple the automated logic in the process. The strategy stays clean, and the reporting stays alive. This isn't a crutch in the code you'll have to clean up later — it's an operator's decision on top of an unchanged engine.</p>
57
+ <p><strong>3. Grab a local pump by hand, one the strategy isn't built for.</strong></p>
58
+ <p>A strategy is always a specialization. If it's tuned to catch reversions to the mean, by construction it <strong>doesn't enter a vertical pump</strong> — to it that's &quot;too far from the entry point, the risk/reward doesn't add up.&quot; And it's right 95% of the time. But right now, specifically, you can see with your own eyes a coin flying on volume, and you understand the move is real.</p>
59
+ <p>Writing a dedicated pump detector for this (Hawkes, CUSUM, volume z-scores — I have a <a href="https://www.npmjs.com/package/pump-anomaly">separate library</a> for that) is overkill for a one-off case. It's easier to hit <code>OPEN POSITION</code>, enter by hand, and then hand the position over to the engine: the same <code>commitBreakeven</code> will drag the stop to breakeven, <code>commitAveraging</code> will average in on a pullback, the trailing will take the profit. You gave the system an entry point the strategy missed — but all position management after entry remained automated and battle-tested.</p>
60
+ <p>In all three cases the same property is at work: <strong>the manual action goes through the same engine as the automated one</strong>. A position opened by hand isn't an &quot;external trade outside the system&quot; — it's a full-fledged signal in persistent storage, with the same lifecycle, the same rendering, the same protective orders, and the same DCA/breakeven/trailing hooks. The operator and the algorithm work in a single circuit, not in two parallel universes that won't reconcile in the report later.</p>
61
+ <a id="bottom-line-what-replaces-three-days-of-waiting" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Bottom Line: What Replaces Three Days of Waiting<a href="#bottom-line-what-replaces-three-days-of-waiting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
62
+ <thead>
63
+ <tr>
64
+ <th></th>
65
+ <th><strong>Standard path</strong></th>
66
+ <th><strong>backtest-kit</strong></th>
67
+ </tr>
68
+ </thead>
69
+ <tbody>
70
+ <tr>
71
+ <td><em>How to launch an adapter check</em></td>
72
+ <td>Wait for a trading signal</td>
73
+ <td>Press a button</td>
74
+ </tr>
75
+ <tr>
76
+ <td><em>Time to first error</em></td>
77
+ <td>Hours — days</td>
78
+ <td>Seconds</td>
79
+ </tr>
80
+ <tr>
81
+ <td><em>What gets verified</em></td>
82
+ <td>A single call</td>
83
+ <td>The whole chain: adapter, engine, persistence, UI, protective orders</td>
84
+ </tr>
85
+ <tr>
86
+ <td><em>Fidelity</em></td>
87
+ <td>The real path, but you wait</td>
88
+ <td>The real path, right now</td>
89
+ </tr>
90
+ </tbody>
91
+ </table>
92
+ <a id="thanks-for-reading" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Thanks for reading!<a href="#thanks-for-reading" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#🕹️-how-to-debug-your-bots-exchange-connection-in-an-hour-not-three-days"><span>🕹️ <wbr/>How to <wbr/>Debug <wbr/>Your <wbr/>Bot&#39;s <wbr/>Exchange <wbr/>Connection in an <wbr/>Hour, <wbr/>Not <wbr/>Three <wbr/>Days</span></a><ul><li><a href="#the-pain-nobody-writes-about-in-tutorials"><span>The <wbr/>Pain <wbr/>Nobody <wbr/>Writes <wbr/>About in <wbr/>Tutorials</span></a></li><li><a href="#why-you-cant-catch-this-by-staring-hard"><span>Why <wbr/>You <wbr/>Can&#39;t <wbr/>Catch <wbr/>This by &quot;<wbr/>Staring <wbr/>Hard&quot;</span></a></li><li><a href="#a-control-button-for-the-human"><span>A <wbr/>Control <wbr/>Button for the <wbr/>Human</span></a></li><li><a href="#not-just-for-debugging"><span>Not <wbr/>Just for <wbr/>Debugging</span></a></li><li><a href="#bottom-line-what-replaces-three-days-of-waiting"><span>Bottom <wbr/>Line: <wbr/>What <wbr/>Replaces <wbr/>Three <wbr/>Days of <wbr/>Waiting</span></a></li><li><a href="#thanks-for-reading"><span>Thanks for reading!</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
93
+
94
+ <!-- Yandex.Metrika counter -->
95
+ <script type="text/javascript">
96
+ (function(m,e,t,r,i,k,a){
97
+ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
98
+ m[i].l=1*new Date();
99
+ for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
100
+ k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
101
+ })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
102
+
103
+ ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
104
+ </script>
105
+ <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
106
+ <!-- /Yandex.Metrika counter -->
107
+
108
+ <!-- Google tag (gtag.js) -->
109
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
110
+ <script>
111
+ window.dataLayer = window.dataLayer || [];
112
+ function gtag(){dataLayer.push(arguments);}
113
+ gtag('js', new Date());
114
+
115
+ gtag('config', 'G-3MQZEBBDDR');
116
+ </script>
documents/data_test-guidelines.html ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>data/test-guidelines | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="data_test-guidelines.html">data/test-guidelines</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="test-guidelines" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Test Guidelines<a href="#test-guidelines" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><a id="key-files" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Key files<a href="#key-files" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
2
+ <li><code>src/helpers/getEffectivePriceOpen.ts</code> — cost-basis replay algorithm (DO NOT MODIFY)</li>
3
+ <li><code>src/helpers/toProfitLossDto.ts</code> — weighted PNL with partial close replay (DO NOT MODIFY)</li>
4
+ <li><code>test/spec/dca.test.mjs</code> — 35 unit tests for DCA+partial logic</li>
5
+ <li><code>test/e2e/dca.test.mjs</code> — 9 e2e tests: partial profit/loss interleaved with DCA</li>
6
+ <li><code>test/migration/migrate7.test.mjs</code> — 2 migration tests: trailing stop breakeven, partialLoss</li>
7
+ <li><code>test/e2e/average.test.mjs</code> — reference pattern for e2e backtest tests</li>
8
+ <li><code>test/README.md</code> — comprehensive test writing guide (read before writing e2e tests)</li>
9
+ </ul>
10
+ <a id="algorithm-cost-basis-replay" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Algorithm: cost-basis replay<a href="#algorithm-cost-basis-replay" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Running <code>costBasis</code> through all partials sequentially:</p>
11
+ <pre><code><span class="hl-5">costBasis</span><span class="hl-2"> = </span><span class="hl-8">0</span><br/><span class="hl-5">for</span><span class="hl-2"> </span><span class="hl-5">each</span><span class="hl-2"> </span><span class="hl-5">partial</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">]:</span><br/><span class="hl-2"> </span><span class="hl-5">newEntries</span><span class="hl-2"> = </span><span class="hl-5">entryCountAtClose</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">] - </span><span class="hl-5">entryCountAtClose</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">-</span><span class="hl-8">1</span><span class="hl-2">] (</span><span class="hl-8">0</span><span class="hl-2"> </span><span class="hl-5">for</span><span class="hl-2"> </span><span class="hl-5">i</span><span class="hl-2">=</span><span class="hl-8">0</span><span class="hl-2">)</span><br/><span class="hl-2"> </span><span class="hl-5">costBasis</span><span class="hl-2"> += </span><span class="hl-5">newEntries</span><span class="hl-2"> * </span><span class="hl-8">100</span><br/><span class="hl-2"> </span><span class="hl-5">dollarValue</span><span class="hl-2"> = (</span><span class="hl-5">percent</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">] / </span><span class="hl-8">100</span><span class="hl-2">) * </span><span class="hl-5">costBasis</span><span class="hl-2"> ← </span><span class="hl-5">correct</span><span class="hl-2"> </span><span class="hl-5">running</span><span class="hl-2"> </span><span class="hl-5">basis</span><br/><span class="hl-2"> </span><span class="hl-5">costBasis</span><span class="hl-2"> *= (</span><span class="hl-8">1</span><span class="hl-2"> - </span><span class="hl-5">percent</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">] / </span><span class="hl-8">100</span><span class="hl-2">) ← </span><span class="hl-5">reduce</span><span class="hl-2"> </span><span class="hl-5">after</span><span class="hl-2"> </span><span class="hl-5">each</span><span class="hl-2"> </span><span class="hl-5">close</span><br/><span class="hl-5">weight</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">] = </span><span class="hl-5">dollarValue</span><span class="hl-2">[</span><span class="hl-5">i</span><span class="hl-2">] / </span><span class="hl-5">totalInvested</span>
12
+ </code><button>Copy</button></pre>
13
+
14
+ <a id="snap-computation-rule-for-test-expected-values" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Snap computation rule (for test expected values)<a href="#snap-computation-rule-for-test-expected-values" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
15
+ <li><code>snap[0]</code> = <code>hm(entries[0..cnt[0]])</code> when no prior partials</li>
16
+ <li><code>snap[i≥1]</code> = must use <code>getEff(entries[0..cnt[i]], partials[0..i-1])</code> — NOT plain harmonic mean
17
+ <ul>
18
+ <li>Formula: <code>(remainingCostBasis + newDCA*100) / (remainingCostBasis/snap[i-1] + Σ100/newPrice)</code></li>
19
+ </ul>
20
+ </li>
21
+ </ul>
22
+ <a id="e2e-test-pattern" class="tsd-anchor"></a><h2 class="tsd-anchor-link">e2e test pattern<a href="#e2e-test-pattern" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="js"><span class="hl-1">addExchangeSchema</span><span class="hl-2">({ </span><span class="hl-5">exchangeName:</span><span class="hl-2"> </span><span class="hl-3">&quot;binance-X&quot;</span><span class="hl-2">, </span><span class="hl-5">getCandles</span><span class="hl-2">, </span><span class="hl-5">formatPrice</span><span class="hl-2">, </span><span class="hl-5">formatQuantity</span><span class="hl-2"> })</span><br/><span class="hl-1">addStrategySchema</span><span class="hl-2">({ </span><span class="hl-5">strategyName:</span><span class="hl-2"> </span><span class="hl-3">&quot;test-X&quot;</span><span class="hl-2">, </span><span class="hl-5">interval:</span><span class="hl-2"> </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">, </span><span class="hl-5">getSignal</span><span class="hl-2">, </span><span class="hl-5">callbacks:</span><span class="hl-2"> { </span><span class="hl-5">onActivePing</span><span class="hl-2">, </span><span class="hl-5">onClose</span><span class="hl-2">, ... } })</span><br/><span class="hl-1">addFrameSchema</span><span class="hl-2">({ </span><span class="hl-5">frameName:</span><span class="hl-2"> </span><span class="hl-3">&quot;Nm-X&quot;</span><span class="hl-2">, </span><span class="hl-5">interval:</span><span class="hl-2"> </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">, </span><span class="hl-5">startDate</span><span class="hl-2">, </span><span class="hl-5">endDate</span><span class="hl-2"> })</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">awaitSubject</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Subject</span><span class="hl-2">();</span><br/><span class="hl-1">listenDoneBacktest</span><span class="hl-2">(() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">awaitSubject</span><span class="hl-2">.</span><span class="hl-1">next</span><span class="hl-2">());</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">unsubscribeError</span><span class="hl-2"> = </span><span class="hl-1">listenError</span><span class="hl-2">((</span><span class="hl-5">error</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> { </span><span class="hl-5">errorCaught</span><span class="hl-2"> = </span><span class="hl-5">error</span><span class="hl-2">; </span><span class="hl-5">awaitSubject</span><span class="hl-2">.</span><span class="hl-1">next</span><span class="hl-2">(); });</span><br/><span class="hl-5">Backtest</span><span class="hl-2">.</span><span class="hl-1">background</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">exchangeName</span><span class="hl-2">, </span><span class="hl-5">frameName</span><span class="hl-2"> });</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">awaitSubject</span><span class="hl-2">.</span><span class="hl-1">toPromise</span><span class="hl-2">();</span><br/><span class="hl-1">unsubscribeError</span><span class="hl-2">();</span>
23
+ </code><button type="button">Copy</button></pre>
24
+
25
+ <a id="key-e2e-rules-from-readme" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Key e2e rules (from README)<a href="#key-e2e-rules-from-readme" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
26
+ <li>Buffer candles ABOVE priceOpen for LONG (below for SHORT) before startTime — prevent early scheduled activation</li>
27
+ <li>All candles rebuilt inside first <code>getSignal</code> call (signalGenerated flag); getCandles returns from allCandles array</li>
28
+ <li>LONG activates when <code>candle.low &lt;= priceOpen</code>; SHORT when <code>candle.high &gt;= priceOpen</code></li>
29
+ <li>SL checked BEFORE activation — activation candle low must not hit SL simultaneously</li>
30
+ <li><code>getAveragePrice(symbol)</code> needs min 5 candles</li>
31
+ <li>Frame endDate must match candle count exactly (N candles = N minutes with 1m interval)</li>
32
+ <li><code>CC_MAX_STOPLOSS_DISTANCE_PERCENT: 20</code> — SL can be at most 20% from entry; violations silently break tests</li>
33
+ <li><code>CC_AVG_PRICE_CANDLES_COUNT: 5</code> — VWAP window; first 4 candles skipped as buffer in pending processing</li>
34
+ <li><code>minuteEstimatedTime</code> must fit within frame; if candles run out before time expires → error thrown</li>
35
+ <li><code>onPartialProfit</code> / <code>onPartialLoss</code> fire based on VWAP (averagePrice), not candle.close</li>
36
+ <li><code>revenuePercent</code> in <code>onPartialProfit</code> = % progress toward TP (0–100), NOT P&amp;L %</li>
37
+ <li><code>revenuePercent</code> in <code>onPartialLoss</code> = % progress toward SL (0–100)</li>
38
+ </ul>
39
+ <a id="partial-close-api" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Partial close API<a href="#partial-close-api" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
40
+ <li><code>commitPartialProfit(symbol, percentToClose)</code> — close X% at profit; requires currentPrice &gt; effectivePriceOpen for LONG</li>
41
+ <li><code>commitPartialLoss(symbol, percentToClose)</code> — close X% at loss; requires currentPrice &lt; effectivePriceOpen for LONG</li>
42
+ <li><code>commitAverageBuy(symbol)</code> — DCA entry (rejected if price unfavorable direction)</li>
43
+ <li><code>commitTrailingStop(symbol, percentShift, currentPrice)</code> — shift SL by percent from original distance</li>
44
+ <li>All called from callbacks (<code>onActivePing</code>, <code>onPartialProfit</code>, <code>onPartialLoss</code>) with <code>await</code></li>
45
+ <li><code>Backtest.getPendingSignal(symbol, context)</code> — returns current signal state including priceOpen, priceStopLoss</li>
46
+ </ul>
47
+ <a id="geteffectivepriceopen-plain-signal-behavior" class="tsd-anchor"></a><h2 class="tsd-anchor-link">getEffectivePriceOpen plain-signal behavior<a href="#geteffectivepriceopen-plain-signal-behavior" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul>
48
+ <li>No <code>_entry</code> → returns <code>signal.priceOpen</code> immediately (line 23)</li>
49
+ <li>No change in math for plain entries; refactor only affects DCA+partial cases</li>
50
+ </ul>
51
+ <a id="test-index" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Test index<a href="#test-index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><code>test/index.mjs</code> — import list controls which test files run</p>
52
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#test-guidelines"><span>Test <wbr/>Guidelines</span></a><ul><li><a href="#key-files"><span>Key files</span></a></li><li><a href="#algorithm-cost-basis-replay"><span>Algorithm: cost-<wbr/>basis replay</span></a></li><li><a href="#snap-computation-rule-for-test-expected-values"><span>Snap computation rule (for test expected values)</span></a></li><li><a href="#e2e-test-pattern"><span>e2e test pattern</span></a></li><li><a href="#key-e2e-rules-from-readme"><span>Key e2e rules (from README)</span></a></li><li><a href="#partial-close-api"><span>Partial close API</span></a></li><li><a href="#geteffectivepriceopen-plain-signal-behavior"><span>get<wbr/>Effective<wbr/>Price<wbr/>Open plain-<wbr/>signal behavior</span></a></li><li><a href="#test-index"><span>Test index</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
53
+
54
+ <!-- Yandex.Metrika counter -->
55
+ <script type="text/javascript">
56
+ (function(m,e,t,r,i,k,a){
57
+ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
58
+ m[i].l=1*new Date();
59
+ for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
60
+ k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
61
+ })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
62
+
63
+ ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
64
+ </script>
65
+ <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
66
+ <!-- /Yandex.Metrika counter -->
67
+
68
+ <!-- Google tag (gtag.js) -->
69
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
70
+ <script>
71
+ window.dataLayer = window.dataLayer || [];
72
+ function gtag(){dataLayer.push(arguments);}
73
+ gtag('js', new Date());
74
+
75
+ gtag('config', 'G-3MQZEBBDDR');
76
+ </script>
documents/docs.html CHANGED
@@ -232,6 +232,8 @@
232
  <li><a href="docs_function_hasNoScheduledSignal.html">hasNoScheduledSignal</a></li>
233
  <li><a href="docs_function_commitSignalNotify.html">commitSignalNotify</a></li>
234
  <li><a href="docs_function_commitCreateSignal.html">commitCreateSignal</a></li>
 
 
235
  <li><a href="docs_function_getStrategyStatus.html">getStrategyStatus</a></li>
236
  <li><a href="docs_function_stopStrategy.html">stopStrategy</a></li>
237
  <li><a href="docs_function_shutdown.html">shutdown</a></li>
@@ -293,6 +295,10 @@
293
  <li><a href="docs_function_listenRiskOnce.html">listenRiskOnce</a></li>
294
  <li><a href="docs_function_listenSchedulePing.html">listenSchedulePing</a></li>
295
  <li><a href="docs_function_listenSchedulePingOnce.html">listenSchedulePingOnce</a></li>
 
 
 
 
296
  <li><a href="docs_function_listenActivePing.html">listenActivePing</a></li>
297
  <li><a href="docs_function_listenActivePingOnce.html">listenActivePingOnce</a></li>
298
  <li><a href="docs_function_listenIdlePing.html">listenIdlePing</a></li>
@@ -372,6 +378,8 @@
372
  <li><a href="docs_interface_PartialProfitContract.html">PartialProfitContract</a></li>
373
  <li><a href="docs_interface_PartialLossContract.html">PartialLossContract</a></li>
374
  <li><a href="docs_interface_SchedulePingContract.html">SchedulePingContract</a></li>
 
 
375
  <li><a href="docs_interface_ActivePingContract.html">ActivePingContract</a></li>
376
  <li><a href="docs_interface_IdlePingContract.html">IdlePingContract</a></li>
377
  <li><a href="docs_interface_RiskContract.html">RiskContract</a></li>
@@ -711,6 +719,13 @@
711
  <li><a href="docs_type_BrokerSignalOpenPayload.html">BrokerSignalOpenPayload</a></li>
712
  <li><a href="docs_type_BrokerSignalClosePayload.html">BrokerSignalClosePayload</a></li>
713
  <li><a href="docs_type_BrokerSignalPendingPayload.html">BrokerSignalPendingPayload</a></li>
 
 
 
 
 
 
 
714
  <li><a href="docs_type_BrokerPartialProfitPayload.html">BrokerPartialProfitPayload</a></li>
715
  <li><a href="docs_type_BrokerPartialLossPayload.html">BrokerPartialLossPayload</a></li>
716
  <li><a href="docs_type_BrokerTrailingStopPayload.html">BrokerTrailingStopPayload</a></li>
 
232
  <li><a href="docs_function_hasNoScheduledSignal.html">hasNoScheduledSignal</a></li>
233
  <li><a href="docs_function_commitSignalNotify.html">commitSignalNotify</a></li>
234
  <li><a href="docs_function_commitCreateSignal.html">commitCreateSignal</a></li>
235
+ <li><a href="docs_function_commitCreateTakeProfit.html">commitCreateTakeProfit</a></li>
236
+ <li><a href="docs_function_commitCreateStopLoss.html">commitCreateStopLoss</a></li>
237
  <li><a href="docs_function_getStrategyStatus.html">getStrategyStatus</a></li>
238
  <li><a href="docs_function_stopStrategy.html">stopStrategy</a></li>
239
  <li><a href="docs_function_shutdown.html">shutdown</a></li>
 
295
  <li><a href="docs_function_listenRiskOnce.html">listenRiskOnce</a></li>
296
  <li><a href="docs_function_listenSchedulePing.html">listenSchedulePing</a></li>
297
  <li><a href="docs_function_listenSchedulePingOnce.html">listenSchedulePingOnce</a></li>
298
+ <li><a href="docs_function_listenScheduleEvent.html">listenScheduleEvent</a></li>
299
+ <li><a href="docs_function_listenScheduleEventOnce.html">listenScheduleEventOnce</a></li>
300
+ <li><a href="docs_function_listenSignalEvent.html">listenSignalEvent</a></li>
301
+ <li><a href="docs_function_listenSignalEventOnce.html">listenSignalEventOnce</a></li>
302
  <li><a href="docs_function_listenActivePing.html">listenActivePing</a></li>
303
  <li><a href="docs_function_listenActivePingOnce.html">listenActivePingOnce</a></li>
304
  <li><a href="docs_function_listenIdlePing.html">listenIdlePing</a></li>
 
378
  <li><a href="docs_interface_PartialProfitContract.html">PartialProfitContract</a></li>
379
  <li><a href="docs_interface_PartialLossContract.html">PartialLossContract</a></li>
380
  <li><a href="docs_interface_SchedulePingContract.html">SchedulePingContract</a></li>
381
+ <li><a href="docs_interface_ScheduleEventContract.html">ScheduleEventContract</a></li>
382
+ <li><a href="docs_interface_SignalEventContract.html">SignalEventContract</a></li>
383
  <li><a href="docs_interface_ActivePingContract.html">ActivePingContract</a></li>
384
  <li><a href="docs_interface_IdlePingContract.html">IdlePingContract</a></li>
385
  <li><a href="docs_interface_RiskContract.html">RiskContract</a></li>
 
719
  <li><a href="docs_type_BrokerSignalOpenPayload.html">BrokerSignalOpenPayload</a></li>
720
  <li><a href="docs_type_BrokerSignalClosePayload.html">BrokerSignalClosePayload</a></li>
721
  <li><a href="docs_type_BrokerSignalPendingPayload.html">BrokerSignalPendingPayload</a></li>
722
+ <li><a href="docs_type_BrokerActivePingPayload.html">BrokerActivePingPayload</a></li>
723
+ <li><a href="docs_type_BrokerSchedulePingPayload.html">BrokerSchedulePingPayload</a></li>
724
+ <li><a href="docs_type_BrokerIdlePingPayload.html">BrokerIdlePingPayload</a></li>
725
+ <li><a href="docs_type_BrokerScheduleOpenPayload.html">BrokerScheduleOpenPayload</a></li>
726
+ <li><a href="docs_type_BrokerScheduleCancelledPayload.html">BrokerScheduleCancelledPayload</a></li>
727
+ <li><a href="docs_type_BrokerPendingOpenPayload.html">BrokerPendingOpenPayload</a></li>
728
+ <li><a href="docs_type_BrokerPendingClosePayload.html">BrokerPendingClosePayload</a></li>
729
  <li><a href="docs_type_BrokerPartialProfitPayload.html">BrokerPartialProfitPayload</a></li>
730
  <li><a href="docs_type_BrokerPartialLossPayload.html">BrokerPartialLossPayload</a></li>
731
  <li><a href="docs_type_BrokerTrailingStopPayload.html">BrokerTrailingStopPayload</a></li>
documents/docs_class_ActionConnectionService.html CHANGED
@@ -60,6 +60,14 @@ Cache key includes strategyName, exchangeName and frameName to isolate action pe
60
  </code><button type="button">Copy</button></pre>
61
 
62
  <p>Routes scheduled ping event to appropriate ClientAction instance.</p>
 
 
 
 
 
 
 
 
63
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pingActive</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ActivePingContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
64
  </code><button type="button">Copy</button></pre>
65
 
@@ -77,10 +85,10 @@ Cache key includes strategyName, exchangeName and frameName to isolate action pe
77
 
78
  <p>Routes signalSync event to appropriate ClientAction instance.
79
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
80
- <a id="orderping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderPing<a href="#orderping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">orderPing</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalPingContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
81
  </code><button type="button">Copy</button></pre>
82
 
83
- <p>Routes orderPing event to appropriate ClientAction instance.
84
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
85
  <a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">dispose<a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">dispose</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
86
  </code><button type="button">Copy</button></pre>
@@ -90,7 +98,7 @@ NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
90
  </code><button type="button">Copy</button></pre>
91
 
92
  <p>Clears the cached ClientAction instance for the given action name.</p>
93
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actionconnectionservice"><span>Action<wbr/>Connection<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#actionschemaservice"><span>action<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#strategycoreservice"><span>strategy<wbr/>Core<wbr/>Service</span></a></li><li><a href="#getaction"><span>get<wbr/>Action</span></a></li><li><a href="#initfn"><span>init<wbr/>Fn</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#orderping"><span>order<wbr/>Ping</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
94
 
95
  <!-- Yandex.Metrika counter -->
96
  <script type="text/javascript">
 
60
  </code><button type="button">Copy</button></pre>
61
 
62
  <p>Routes scheduled ping event to appropriate ClientAction instance.</p>
63
+ <a id="scheduleevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">scheduleEvent<a href="#scheduleevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">scheduleEvent</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ScheduleEventContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
64
+ </code><button type="button">Copy</button></pre>
65
+
66
+ <p>Routes a scheduled signal lifecycle event (creation / cancellation) to the ClientAction instance.</p>
67
+ <a id="pendingevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pendingEvent<a href="#pendingevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pendingEvent</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalEventContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
68
+ </code><button type="button">Copy</button></pre>
69
+
70
+ <p>Routes a pending signal lifecycle event (open / close) to the ClientAction instance.</p>
71
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pingActive</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ActivePingContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
72
  </code><button type="button">Copy</button></pre>
73
 
 
85
 
86
  <p>Routes signalSync event to appropriate ClientAction instance.
87
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
88
+ <a id="ordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderCheck<a href="#ordercheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">orderCheck</span><span class="hl-2">: (</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalPingContract</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
89
  </code><button type="button">Copy</button></pre>
90
 
91
+ <p>Routes orderCheck event to appropriate ClientAction instance.
92
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
93
  <a id="dispose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">dispose<a href="#dispose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">dispose</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
94
  </code><button type="button">Copy</button></pre>
 
98
  </code><button type="button">Copy</button></pre>
99
 
100
  <p>Clears the cached ClientAction instance for the given action name.</p>
101
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actionconnectionservice"><span>Action<wbr/>Connection<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#actionschemaservice"><span>action<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#strategycoreservice"><span>strategy<wbr/>Core<wbr/>Service</span></a></li><li><a href="#getaction"><span>get<wbr/>Action</span></a></li><li><a href="#initfn"><span>init<wbr/>Fn</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#scheduleevent"><span>schedule<wbr/>Event</span></a></li><li><a href="#pendingevent"><span>pending<wbr/>Event</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#ordercheck"><span>order<wbr/>Check</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
102
 
103
  <!-- Yandex.Metrika counter -->
104
  <script type="text/javascript">
documents/docs_class_ActionCoreService.html CHANGED
@@ -100,6 +100,20 @@ and invokes the partialLossAvailable handler on each ClientAction instance seque
100
  <p>Retrieves action list from strategy schema (IStrategySchema.actions)
101
  and invokes the pingScheduled handler on each ClientAction instance sequentially.
102
  Called every minute during scheduled signal monitoring.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pingActive</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ActivePingContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
104
  </code><button type="button">Copy</button></pre>
105
 
@@ -127,7 +141,7 @@ Called only when a signal fails risk validation.</p>
127
  <p>Gates position open/close across all registered actions.
128
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.
129
  Returns true only if ALL actions return true.</p>
130
- <a id="orderping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderPing<a href="#orderping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">orderPing</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalPingContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
131
  </code><button type="button">Copy</button></pre>
132
 
133
  <p>Gates the pending-order ping across all registered actions.
@@ -145,7 +159,7 @@ Called when strategy execution ends to clean up resources.</p>
145
  <p>Clears action data.</p>
146
  <p>If payload is provided, validates and clears data for the specific action instance.
147
  If no payload is provided, clears all action data across all strategies.</p>
148
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actioncoreservice"><span>Action<wbr/>Core<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#actionconnectionservice"><span>action<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#actionvalidationservice"><span>action<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#exchangevalidationservice"><span>exchange<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#framevalidationservice"><span>frame<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyvalidationservice"><span>strategy<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskvalidationservice"><span>risk<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#validate"><span>validate</span></a></li><li><a href="#initfn"><span>init<wbr/>Fn</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#orderping"><span>order<wbr/>Ping</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
149
 
150
  <!-- Yandex.Metrika counter -->
151
  <script type="text/javascript">
 
100
  <p>Retrieves action list from strategy schema (IStrategySchema.actions)
101
  and invokes the pingScheduled handler on each ClientAction instance sequentially.
102
  Called every minute during scheduled signal monitoring.</p>
103
+ <a id="scheduleevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">scheduleEvent<a href="#scheduleevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">scheduleEvent</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ScheduleEventContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
104
+ </code><button type="button">Copy</button></pre>
105
+
106
+ <p>Routes a scheduled signal lifecycle event (creation / cancellation) to all registered actions.</p>
107
+ <p>Retrieves action list from strategy schema (IStrategySchema.actions) and invokes the
108
+ scheduleEvent handler on each ClientAction instance sequentially. Called once on creation
109
+ (action &quot;scheduled&quot;) and once on cancellation before activation (action &quot;cancelled&quot;).</p>
110
+ <a id="pendingevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pendingEvent<a href="#pendingevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pendingEvent</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalEventContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
111
+ </code><button type="button">Copy</button></pre>
112
+
113
+ <p>Routes a pending signal lifecycle event (open / close) to all registered actions.</p>
114
+ <p>Retrieves action list from strategy schema (IStrategySchema.actions) and invokes the
115
+ pendingEvent handler on each ClientAction instance sequentially. Called once on open
116
+ (action &quot;opened&quot;) and once on close (action &quot;closed&quot;).</p>
117
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">pingActive</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">ActivePingContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
118
  </code><button type="button">Copy</button></pre>
119
 
 
141
  <p>Gates position open/close across all registered actions.
142
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.
143
  Returns true only if ALL actions return true.</p>
144
+ <a id="ordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderCheck<a href="#ordercheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">orderCheck</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">SignalPingContract</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
145
  </code><button type="button">Copy</button></pre>
146
 
147
  <p>Gates the pending-order ping across all registered actions.
 
159
  <p>Clears action data.</p>
160
  <p>If payload is provided, validates and clears data for the specific action instance.
161
  If no payload is provided, clears all action data across all strategies.</p>
162
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actioncoreservice"><span>Action<wbr/>Core<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#actionconnectionservice"><span>action<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#actionvalidationservice"><span>action<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#exchangevalidationservice"><span>exchange<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#framevalidationservice"><span>frame<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyvalidationservice"><span>strategy<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskvalidationservice"><span>risk<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#validate"><span>validate</span></a></li><li><a href="#initfn"><span>init<wbr/>Fn</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#scheduleevent"><span>schedule<wbr/>Event</span></a></li><li><a href="#pendingevent"><span>pending<wbr/>Event</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#ordercheck"><span>order<wbr/>Check</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
163
 
164
  <!-- Yandex.Metrika counter -->
165
  <script type="text/javascript">
documents/docs_class_ActionProxy.html CHANGED
@@ -78,6 +78,19 @@ Called once per loss level per signal (-10%, -20%, -30%, etc).</p>
78
  <p>Handles scheduled ping events with error capture.</p>
79
  <p>Wraps the user's pingScheduled() method to catch and log any errors.
80
  Called every minute while a scheduled signal is waiting for activation.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pingActive</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ActivePingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">any</span><span class="hl-2">&gt;;</span>
82
  </code><button type="button">Copy</button></pre>
83
 
@@ -101,7 +114,7 @@ Called only when signal is rejected by risk management validation.</p>
101
 
102
  <p>Gate for position open/close via limit order.
103
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
104
- <a id="orderping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderPing<a href="#orderping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">orderPing</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalPingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
105
  </code><button type="button">Copy</button></pre>
106
 
107
  <p>Gate for the pending-order ping (order still open on exchange?).
@@ -118,7 +131,7 @@ Called once when strategy execution ends.</p>
118
  <p>Creates a new ActionProxy instance wrapping a user-provided action handler.</p>
119
  <p>Factory method enforcing the private constructor pattern.
120
  Wraps all methods of the provided instance with error capture.</p>
121
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actionproxy"><span>Action<wbr/>Proxy</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_target"><span>_target</span></a></li><li><a href="#params"><span>params</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#init"><span>init</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#orderping"><span>order<wbr/>Ping</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#frominstance"><span>from<wbr/>Instance</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
122
 
123
  <!-- Yandex.Metrika counter -->
124
  <script type="text/javascript">
 
78
  <p>Handles scheduled ping events with error capture.</p>
79
  <p>Wraps the user's pingScheduled() method to catch and log any errors.
80
  Called every minute while a scheduled signal is waiting for activation.</p>
81
+ <a id="scheduleevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">scheduleEvent<a href="#scheduleevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">scheduleEvent</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ScheduleEventContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">any</span><span class="hl-2">&gt;;</span>
82
+ </code><button type="button">Copy</button></pre>
83
+
84
+ <p>Handles scheduled signal lifecycle events with error capture.</p>
85
+ <p>Wraps the user's scheduleEvent() method to catch and log any errors. Called once when a
86
+ scheduled signal is created (action &quot;scheduled&quot;) and once when it is cancelled before
87
+ activation (action &quot;cancelled&quot;).</p>
88
+ <a id="pendingevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pendingEvent<a href="#pendingevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pendingEvent</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalEventContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">any</span><span class="hl-2">&gt;;</span>
89
+ </code><button type="button">Copy</button></pre>
90
+
91
+ <p>Handles pending signal lifecycle events with error capture.</p>
92
+ <p>Wraps the user's pendingEvent() method to catch and log any errors. Called once when a
93
+ pending position is opened (action &quot;opened&quot;) and once when it is closed (action &quot;closed&quot;).</p>
94
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pingActive</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ActivePingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">any</span><span class="hl-2">&gt;;</span>
95
  </code><button type="button">Copy</button></pre>
96
 
 
114
 
115
  <p>Gate for position open/close via limit order.
116
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
117
+ <a id="ordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderCheck<a href="#ordercheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">orderCheck</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalPingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
118
  </code><button type="button">Copy</button></pre>
119
 
120
  <p>Gate for the pending-order ping (order still open on exchange?).
 
131
  <p>Creates a new ActionProxy instance wrapping a user-provided action handler.</p>
132
  <p>Factory method enforcing the private constructor pattern.
133
  Wraps all methods of the provided instance with error capture.</p>
134
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#actionproxy"><span>Action<wbr/>Proxy</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_target"><span>_target</span></a></li><li><a href="#params"><span>params</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#init"><span>init</span></a></li><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#scheduleevent"><span>schedule<wbr/>Event</span></a></li><li><a href="#pendingevent"><span>pending<wbr/>Event</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#ordercheck"><span>order<wbr/>Check</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#frominstance"><span>from<wbr/>Instance</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
135
 
136
  <!-- Yandex.Metrika counter -->
137
  <script type="text/javascript">
documents/docs_class_BacktestUtils.html CHANGED
@@ -293,6 +293,22 @@ params.getSignal.</p>
293
  <p>priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
294
  current price; provided → opens immediately if already reached, otherwise registers a
295
  scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  <a id="getstrategystatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStrategyStatus<a href="#getstrategystatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStrategyStatus</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
297
  </code><button type="button">Copy</button></pre>
298
 
@@ -407,7 +423,7 @@ Updates effectivePriceOpen (mean of all entries) and emits average-buy commit ev
407
  </code><button type="button">Copy</button></pre>
408
 
409
  <p>Lists all active backtest instances with their current status.</p>
410
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#backtestutils"><span>Backtest<wbr/>Utils</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_getinstance"><span>_get<wbr/>Instance</span></a></li><li><a href="#run"><span>run</span></a></li><li><a href="#background"><span>background</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#hasnopendingsignal"><span>has<wbr/>No<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasnoscheduledsignal"><span>has<wbr/>No<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionentryoverlap"><span>get<wbr/>Position<wbr/>Entry<wbr/>Overlap</span></a></li><li><a href="#getpositionpartialoverlap"><span>get<wbr/>Position<wbr/>Partial<wbr/>Overlap</span></a></li><li><a href="#stop"><span>stop</span></a></li><li><a href="#commitcancelscheduled"><span>commit<wbr/>Cancel<wbr/>Scheduled</span></a></li><li><a href="#commitclosepending"><span>commit<wbr/>Close<wbr/>Pending</span></a></li><li><a href="#commitcreatesignal"><span>commit<wbr/>Create<wbr/>Signal</span></a></li><li><a href="#getstrategystatus"><span>get<wbr/>Strategy<wbr/>Status</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#commitpartialprofitcost"><span>commit<wbr/>Partial<wbr/>Profit<wbr/>Cost</span></a></li><li><a href="#commitpartiallosscost"><span>commit<wbr/>Partial<wbr/>Loss<wbr/>Cost</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#committrailingstopcost"><span>commit<wbr/>Trailing<wbr/>Stop<wbr/>Cost</span></a></li><li><a href="#committrailingtakecost"><span>commit<wbr/>Trailing<wbr/>Take<wbr/>Cost</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitactivatescheduled"><span>commit<wbr/>Activate<wbr/>Scheduled</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#commitsignalnotify"><span>commit<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#getreport"><span>get<wbr/>Report</span></a></li><li><a href="#dump"><span>dump</span></a></li><li><a href="#list"><span>list</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
411
 
412
  <!-- Yandex.Metrika counter -->
413
  <script type="text/javascript">
 
293
  <p>priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
294
  current price; provided → opens immediately if already reached, otherwise registers a
295
  scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.</p>
296
+ <a id="commitcreatetakeprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitCreateTakeProfit<a href="#commitcreatetakeprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitCreateTakeProfit</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
297
+ </code><button type="button">Copy</button></pre>
298
+
299
+ <p>Reports that the pending position's take-profit order was actually filled on the exchange
300
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based TP check.</p>
301
+ <p>The exchange and the strategy are parallel states: the framework evaluates TP/SL against VWAP,
302
+ but the real order may fill on high/low. The close is deferred and emitted with closeReason
303
+ &quot;take_profit&quot; on the next backtest tick. No-op if no pending signal exists.</p>
304
+ <a id="commitcreatestoploss" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitCreateStopLoss<a href="#commitcreatestoploss" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitCreateStopLoss</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
305
+ </code><button type="button">Copy</button></pre>
306
+
307
+ <p>Reports that the pending position's stop-loss order was actually filled on the exchange
308
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based SL check.</p>
309
+ <p>The exchange and the strategy are parallel states: the framework evaluates TP/SL against VWAP,
310
+ but the real order may fill on high/low. The close is deferred and emitted with closeReason
311
+ &quot;stop_loss&quot; on the next backtest tick. No-op if no pending signal exists.</p>
312
  <a id="getstrategystatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStrategyStatus<a href="#getstrategystatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStrategyStatus</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
313
  </code><button type="button">Copy</button></pre>
314
 
 
423
  </code><button type="button">Copy</button></pre>
424
 
425
  <p>Lists all active backtest instances with their current status.</p>
426
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#backtestutils"><span>Backtest<wbr/>Utils</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_getinstance"><span>_get<wbr/>Instance</span></a></li><li><a href="#run"><span>run</span></a></li><li><a href="#background"><span>background</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#hasnopendingsignal"><span>has<wbr/>No<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasnoscheduledsignal"><span>has<wbr/>No<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionentryoverlap"><span>get<wbr/>Position<wbr/>Entry<wbr/>Overlap</span></a></li><li><a href="#getpositionpartialoverlap"><span>get<wbr/>Position<wbr/>Partial<wbr/>Overlap</span></a></li><li><a href="#stop"><span>stop</span></a></li><li><a href="#commitcancelscheduled"><span>commit<wbr/>Cancel<wbr/>Scheduled</span></a></li><li><a href="#commitclosepending"><span>commit<wbr/>Close<wbr/>Pending</span></a></li><li><a href="#commitcreatesignal"><span>commit<wbr/>Create<wbr/>Signal</span></a></li><li><a href="#commitcreatetakeprofit"><span>commit<wbr/>Create<wbr/>Take<wbr/>Profit</span></a></li><li><a href="#commitcreatestoploss"><span>commit<wbr/>Create<wbr/>Stop<wbr/>Loss</span></a></li><li><a href="#getstrategystatus"><span>get<wbr/>Strategy<wbr/>Status</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#commitpartialprofitcost"><span>commit<wbr/>Partial<wbr/>Profit<wbr/>Cost</span></a></li><li><a href="#commitpartiallosscost"><span>commit<wbr/>Partial<wbr/>Loss<wbr/>Cost</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#committrailingstopcost"><span>commit<wbr/>Trailing<wbr/>Stop<wbr/>Cost</span></a></li><li><a href="#committrailingtakecost"><span>commit<wbr/>Trailing<wbr/>Take<wbr/>Cost</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitactivatescheduled"><span>commit<wbr/>Activate<wbr/>Scheduled</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#commitsignalnotify"><span>commit<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#getreport"><span>get<wbr/>Report</span></a></li><li><a href="#dump"><span>dump</span></a></li><li><a href="#list"><span>list</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
427
 
428
  <!-- Yandex.Metrika counter -->
429
  <script type="text/javascript">
documents/docs_class_BrokerAdapter.html CHANGED
@@ -42,6 +42,51 @@ Skipped silently in backtest mode or when no adapter is registered.</p>
42
  while a pending signal is monitored. Skipped silently in backtest mode or when no adapter is
43
  registered. Exceptions are NOT swallowed: a throw from the adapter propagates up to
44
  syncPendingSubject.next() → CREATE_SYNC_PENDING_FN, which closes the position with &quot;closed&quot;.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  <a id="commitpartialprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitPartialProfit<a href="#commitpartialprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitPartialProfit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerPartialProfitPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
46
  </code><button type="button">Copy</button></pre>
47
 
@@ -114,7 +159,7 @@ After <code>disable()</code>, <code>enable()</code> can be called again to react
114
  <p>Clears the cached broker instance and resets the enable singleshot.
115
  Call this when process.cwd() changes between strategy iterations
116
  so a new broker instance is created with the updated base path.</p>
117
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#brokeradapter"><span>Broker<wbr/>Adapter</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_brokerfactory"><span>_broker<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#commitsignalopen"><span>commit<wbr/>Signal<wbr/>Open</span></a></li><li><a href="#commitsignalclose"><span>commit<wbr/>Signal<wbr/>Close</span></a></li><li><a href="#commitsignalpending"><span>commit<wbr/>Signal<wbr/>Pending</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#usebrokeradapter"><span>use<wbr/>Broker<wbr/>Adapter</span></a></li><li><a href="#enable"><span>enable</span></a></li><li><a href="#disable"><span>disable</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
118
 
119
  <!-- Yandex.Metrika counter -->
120
  <script type="text/javascript">
 
42
  while a pending signal is monitored. Skipped silently in backtest mode or when no adapter is
43
  registered. Exceptions are NOT swallowed: a throw from the adapter propagates up to
44
  syncPendingSubject.next() → CREATE_SYNC_PENDING_FN, which closes the position with &quot;closed&quot;.</p>
45
+ <a id="commitactiveping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitActivePing<a href="#commitactiveping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitActivePing</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerActivePingPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
46
+ </code><button type="button">Copy</button></pre>
47
+
48
+ <p>Forwards an active-ping to the registered broker adapter.</p>
49
+ <p>Called automatically via activePingSubject when <code>enable()</code> is active, on every live tick while a
50
+ pending signal is monitored. Skipped silently in backtest mode or when no adapter is registered.
51
+ Purely informational — a throw does NOT close the position.</p>
52
+ <a id="commitscheduleping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitSchedulePing<a href="#commitscheduleping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitSchedulePing</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSchedulePingPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
53
+ </code><button type="button">Copy</button></pre>
54
+
55
+ <p>Forwards a schedule-ping to the registered broker adapter.</p>
56
+ <p>Called automatically via schedulePingSubject when <code>enable()</code> is active, on every live tick while
57
+ a scheduled signal is monitored. Skipped silently in backtest mode or when no adapter is
58
+ registered. Purely informational.</p>
59
+ <a id="commitidleping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitIdlePing<a href="#commitidleping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitIdlePing</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerIdlePingPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
60
+ </code><button type="button">Copy</button></pre>
61
+
62
+ <p>Forwards an idle-ping to the registered broker adapter.</p>
63
+ <p>Called automatically via idlePingSubject when <code>enable()</code> is active, on every live tick while the
64
+ strategy has no pending or scheduled signal. Skipped silently in backtest mode or when no adapter
65
+ is registered. Purely informational.</p>
66
+ <a id="commitscheduleopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitScheduleOpen<a href="#commitscheduleopen" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitScheduleOpen</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerScheduleOpenPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
67
+ </code><button type="button">Copy</button></pre>
68
+
69
+ <p>Forwards a scheduled-signal-open to the registered broker adapter.</p>
70
+ <p>Called automatically via scheduleEventSubject (action &quot;scheduled&quot;) when a scheduled signal is
71
+ created. Skipped silently in backtest mode or when no adapter is registered.</p>
72
+ <a id="commitschedulecancelled" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitScheduleCancelled<a href="#commitschedulecancelled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitScheduleCancelled</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerScheduleCancelledPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
73
+ </code><button type="button">Copy</button></pre>
74
+
75
+ <p>Forwards a scheduled-signal-cancelled to the registered broker adapter.</p>
76
+ <p>Called automatically via scheduleEventSubject (action &quot;cancelled&quot;) when a scheduled signal is
77
+ removed before activation. Skipped silently in backtest mode or when no adapter is registered.</p>
78
+ <a id="commitpendingopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitPendingOpen<a href="#commitpendingopen" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitPendingOpen</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerPendingOpenPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
79
+ </code><button type="button">Copy</button></pre>
80
+
81
+ <p>Forwards a pending-signal-open to the registered broker adapter.</p>
82
+ <p>Called automatically via signalEventSubject (action &quot;opened&quot;) when a pending position is opened.
83
+ Skipped silently in backtest mode or when no adapter is registered.</p>
84
+ <a id="commitpendingclose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitPendingClose<a href="#commitpendingclose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitPendingClose</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerPendingClosePayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
85
+ </code><button type="button">Copy</button></pre>
86
+
87
+ <p>Forwards a pending-signal-close to the registered broker adapter.</p>
88
+ <p>Called automatically via signalEventSubject (action &quot;closed&quot;) when a pending position is closed.
89
+ Skipped silently in backtest mode or when no adapter is registered.</p>
90
  <a id="commitpartialprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitPartialProfit<a href="#commitpartialprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitPartialProfit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerPartialProfitPayload</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
91
  </code><button type="button">Copy</button></pre>
92
 
 
159
  <p>Clears the cached broker instance and resets the enable singleshot.
160
  Call this when process.cwd() changes between strategy iterations
161
  so a new broker instance is created with the updated base path.</p>
162
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#brokeradapter"><span>Broker<wbr/>Adapter</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_brokerfactory"><span>_broker<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#commitsignalopen"><span>commit<wbr/>Signal<wbr/>Open</span></a></li><li><a href="#commitsignalclose"><span>commit<wbr/>Signal<wbr/>Close</span></a></li><li><a href="#commitsignalpending"><span>commit<wbr/>Signal<wbr/>Pending</span></a></li><li><a href="#commitactiveping"><span>commit<wbr/>Active<wbr/>Ping</span></a></li><li><a href="#commitscheduleping"><span>commit<wbr/>Schedule<wbr/>Ping</span></a></li><li><a href="#commitidleping"><span>commit<wbr/>Idle<wbr/>Ping</span></a></li><li><a href="#commitscheduleopen"><span>commit<wbr/>Schedule<wbr/>Open</span></a></li><li><a href="#commitschedulecancelled"><span>commit<wbr/>Schedule<wbr/>Cancelled</span></a></li><li><a href="#commitpendingopen"><span>commit<wbr/>Pending<wbr/>Open</span></a></li><li><a href="#commitpendingclose"><span>commit<wbr/>Pending<wbr/>Close</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#usebrokeradapter"><span>use<wbr/>Broker<wbr/>Adapter</span></a></li><li><a href="#enable"><span>enable</span></a></li><li><a href="#disable"><span>disable</span></a></li><li><a href="#clear"><span>clear</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
163
 
164
  <!-- Yandex.Metrika counter -->
165
  <script type="text/javascript">
documents/docs_class_BrokerBase.html CHANGED
@@ -47,11 +47,15 @@ Override to establish exchange connections, authenticate API clients, load confi
47
  <a id="onsignalopencommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalOpenCommit<a href="#onsignalopencommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalOpenCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalOpenPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
48
  </code><button type="button">Copy</button></pre>
49
 
50
- <p>Called when a new position is opened (signal activated).</p>
51
  <p>Triggered automatically via syncSubject when a scheduled signal's priceOpen is hit.
52
  Use to place the actual entry order on the exchange.</p>
53
  <p>Default implementation: Logs signal-open event.</p>
54
- <a id="onorderping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderPing<a href="#onorderping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onOrderPing</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalPendingPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
 
 
 
 
55
  </code><button type="button">Copy</button></pre>
56
 
57
  <p>Called on every live tick while a pending signal is monitored, BEFORE TP/SL/time evaluation.</p>
@@ -62,13 +66,75 @@ normally, which keeps the position under normal TP/SL monitoring.</p>
62
  <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) — return
63
  normally instead of throwing. A thrown network error would wrongly close an open position; only
64
  a confirmed &quot;order not found by id&quot; response is a valid reason to throw.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  <a id="onsignalclosecommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalCloseCommit<a href="#onsignalclosecommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalCloseCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalClosePayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
66
  </code><button type="button">Copy</button></pre>
67
 
68
- <p>Called when a position is fully closed (SL/TP hit or manual close).</p>
69
  <p>Triggered automatically via syncSubject when a pending signal is closed.
70
  Use to place the exit order and record final PnL.</p>
71
  <p>Default implementation: Logs signal-close event.</p>
 
 
 
 
72
  <a id="onpartialprofitcommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onPartialProfitCommit<a href="#onpartialprofitcommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onPartialProfitCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerPartialProfitPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
73
  </code><button type="button">Copy</button></pre>
74
 
@@ -115,7 +181,7 @@ Use to partially close the position on the exchange at the loss level.</p>
115
  <code>currentPrice</code> is the market price at which the new averaging entry is placed.
116
  <code>cost</code> is the dollar amount of the new DCA entry.</p>
117
  <p>Default implementation: Logs average buy event.</p>
118
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#brokerbase"><span>Broker<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#onsignalopencommit"><span>on<wbr/>Signal<wbr/>Open<wbr/>Commit</span></a></li><li><a href="#onorderping"><span>on<wbr/>Order<wbr/>Ping</span></a></li><li><a href="#onsignalclosecommit"><span>on<wbr/>Signal<wbr/>Close<wbr/>Commit</span></a></li><li><a href="#onpartialprofitcommit"><span>on<wbr/>Partial<wbr/>Profit<wbr/>Commit</span></a></li><li><a href="#onpartiallosscommit"><span>on<wbr/>Partial<wbr/>Loss<wbr/>Commit</span></a></li><li><a href="#ontrailingstopcommit"><span>on<wbr/>Trailing<wbr/>Stop<wbr/>Commit</span></a></li><li><a href="#ontrailingtakecommit"><span>on<wbr/>Trailing<wbr/>Take<wbr/>Commit</span></a></li><li><a href="#onbreakevencommit"><span>on<wbr/>Breakeven<wbr/>Commit</span></a></li><li><a href="#onaveragebuycommit"><span>on<wbr/>Average<wbr/>Buy<wbr/>Commit</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
119
 
120
  <!-- Yandex.Metrika counter -->
121
  <script type="text/javascript">
 
47
  <a id="onsignalopencommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalOpenCommit<a href="#onsignalopencommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalOpenCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalOpenPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
48
  </code><button type="button">Copy</button></pre>
49
 
50
+ <p>Called when a position is being opened (signal activated).</p>
51
  <p>Triggered automatically via syncSubject when a scheduled signal's priceOpen is hit.
52
  Use to place the actual entry order on the exchange.</p>
53
  <p>Default implementation: Logs signal-open event.</p>
54
+ <p>Manual wiring EXCEPTION-BASED GATE: emitted BEFORE the framework mutates state, so a THROW here
55
+ (e.g. limit order rejected) rolls back the open — the pending signal returns to idle and retries
56
+ next tick; return normally to let it open. Live-only (backtest short-circuits). See
57
+ <a href="../interfaces/types.IBroker.html#onsignalopencommit" class="tsd-kind-method"> IBroker.onSignalOpenCommit</a> for the full semantics.</p>
58
+ <a id="onordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderCheck<a href="#onordercheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onOrderCheck</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalPendingPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
59
  </code><button type="button">Copy</button></pre>
60
 
61
  <p>Called on every live tick while a pending signal is monitored, BEFORE TP/SL/time evaluation.</p>
 
66
  <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) — return
67
  normally instead of throwing. A thrown network error would wrongly close an open position; only
68
  a confirmed &quot;order not found by id&quot; response is a valid reason to throw.</p>
69
+ <p>Manual wiring — EXCEPTION-BASED VARIANT: the throw-driven alternative to the imperative
70
+ commit-function wiring in <code>onSignalActivePing</code>. See <a href="../interfaces/types.IBroker.html#onordercheck" class="tsd-kind-method"> IBroker.onOrderCheck</a> for the full
71
+ comparison and example.</p>
72
+ <a id="onsignalactiveping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalActivePing<a href="#onsignalactiveping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalActivePing</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerActivePingPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
73
+ </code><button type="button">Copy</button></pre>
74
+
75
+ <p>Called on every live tick while a pending (open) signal is monitored.</p>
76
+ <p>Purely informational mirror of the active-ping lifecycle — unlike <code>onOrderCheck</code>, a throw here
77
+ does NOT close the position. Override to mirror live monitoring state into your own systems.
78
+ The default implementation logs.</p>
79
+ <p>Manual wiring — EVENT-BASED: this is the primary per-tick hook to drive an open position from real exchange
80
+ state (<code>commitCreateTakeProfit</code> / <code>commitCreateStopLoss</code> / <code>commitClosePending</code>). See the
81
+ <a href="../interfaces/types.IBroker.html#onsignalactiveping" class="tsd-kind-method"> IBroker.onSignalActivePing</a> contract docs for the full guidance and example.</p>
82
+ <a id="onsignalscheduleping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalSchedulePing<a href="#onsignalscheduleping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalSchedulePing</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSchedulePingPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
83
+ </code><button type="button">Copy</button></pre>
84
+
85
+ <p>Called on every live tick while a scheduled signal is monitored (waiting for priceOpen).</p>
86
+ <p>Purely informational. Override to mirror scheduled-monitoring state. The default logs.</p>
87
+ <p>Manual wiring — EVENT-BASED: per-tick hook to drive a scheduled (resting) order from real exchange state
88
+ (<code>commitActivateScheduled</code> / <code>commitCancelScheduled</code>). See <a href="../interfaces/types.IBroker.html#onsignalscheduleping" class="tsd-kind-method"> IBroker.onSignalSchedulePing</a>
89
+ for full guidance and example.</p>
90
+ <a id="onsignalidleping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalIdlePing<a href="#onsignalidleping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalIdlePing</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerIdlePingPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
91
+ </code><button type="button">Copy</button></pre>
92
+
93
+ <p>Called on every live tick while the strategy is idle (no pending or scheduled signal).</p>
94
+ <p>Purely informational. Override to track idle heartbeats. The default logs.</p>
95
+ <a id="onsignalscheduleopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalScheduleOpen<a href="#onsignalscheduleopen" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalScheduleOpen</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerScheduleOpenPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
96
+ </code><button type="button">Copy</button></pre>
97
+
98
+ <p>Called when a new scheduled signal is created and starts waiting for priceOpen activation.</p>
99
+ <p>The scheduled -&gt; active transition is reported via <code>onSignalOpenCommit</code>, not here. Override to
100
+ place a resting/limit order on the exchange. The default logs.</p>
101
+ <p>Manual wiring — EVENT-BASED: fires ONCE at creation — place the real resting order (tag it with
102
+ <code>payload.signalId</code>) and optionally <code>commitActivateScheduled</code> / <code>commitCancelScheduled</code>. See
103
+ <a href="../interfaces/types.IBroker.html#onsignalscheduleopen" class="tsd-kind-method"> IBroker.onSignalScheduleOpen</a> for full guidance and example.</p>
104
+ <a id="onsignalschedulecancelled" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalScheduleCancelled<a href="#onsignalschedulecancelled" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalScheduleCancelled</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerScheduleCancelledPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
105
+ </code><button type="button">Copy</button></pre>
106
+
107
+ <p>Called when a scheduled signal is cancelled before activation (timeout / price_reject / user).</p>
108
+ <p>Override to cancel the resting/limit order on the exchange. The default logs.</p>
109
+ <p>Manual wiring — EVENT-BASED (outbound): the strategy already dropped the scheduled signal — cancel the matching
110
+ exchange order by <code>payload.signalId</code>. See <a href="../interfaces/types.IBroker.html#onsignalschedulecancelled" class="tsd-kind-method"> IBroker.onSignalScheduleCancelled</a>.</p>
111
+ <a id="onsignalpendingopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalPendingOpen<a href="#onsignalpendingopen" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalPendingOpen</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerPendingOpenPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
112
+ </code><button type="button">Copy</button></pre>
113
+
114
+ <p>Called when a pending position is opened (new signal / immediate / scheduled or user activation).</p>
115
+ <p>Informational lifecycle hook. Override to mirror the open into your own systems. The default logs.</p>
116
+ <p>Manual wiring — EVENT-BASED: fires ONCE at open — place entry + protective TP/SL orders (tag with
117
+ <code>payload.signalId</code>), then drive per-tick from <code>onSignalActivePing</code>. See
118
+ <a href="../interfaces/types.IBroker.html#onsignalpendingopen" class="tsd-kind-method"> IBroker.onSignalPendingOpen</a>.</p>
119
+ <a id="onsignalpendingclose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalPendingClose<a href="#onsignalpendingclose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalPendingClose</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerPendingClosePayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
120
+ </code><button type="button">Copy</button></pre>
121
+
122
+ <p>Called when a pending position is closed (take_profit / stop_loss / time_expired / closed).</p>
123
+ <p>Informational lifecycle hook. Override to mirror the close into your own systems. The default logs.</p>
124
+ <p>Manual wiring — EVENT-BASED (outbound): the strategy already removed the pending signal — flatten the real
125
+ position and cancel leftover TP/SL orders by <code>payload.signalId</code>. See
126
+ <a href="../interfaces/types.IBroker.html#onsignalpendingclose" class="tsd-kind-method"> IBroker.onSignalPendingClose</a>.</p>
127
  <a id="onsignalclosecommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onSignalCloseCommit<a href="#onsignalclosecommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onSignalCloseCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerSignalClosePayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
128
  </code><button type="button">Copy</button></pre>
129
 
130
+ <p>Called when a position is being closed (SL/TP hit or manual close).</p>
131
  <p>Triggered automatically via syncSubject when a pending signal is closed.
132
  Use to place the exit order and record final PnL.</p>
133
  <p>Default implementation: Logs signal-close event.</p>
134
+ <p>Manual wiring — EXCEPTION-BASED GATE: emitted BEFORE the framework mutates state, so a THROW here
135
+ (e.g. exit order failed) SKIPS the close — the position stays open and the close retries next
136
+ tick; return normally to let it close. Live-only (backtest short-circuits). See
137
+ <a href="../interfaces/types.IBroker.html#onsignalclosecommit" class="tsd-kind-method"> IBroker.onSignalCloseCommit</a> for the full semantics.</p>
138
  <a id="onpartialprofitcommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onPartialProfitCommit<a href="#onpartialprofitcommit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">onPartialProfitCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerPartialProfitPayload</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
139
  </code><button type="button">Copy</button></pre>
140
 
 
181
  <code>currentPrice</code> is the market price at which the new averaging entry is placed.
182
  <code>cost</code> is the dollar amount of the new DCA entry.</p>
183
  <p>Default implementation: Logs average buy event.</p>
184
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#brokerbase"><span>Broker<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#onsignalopencommit"><span>on<wbr/>Signal<wbr/>Open<wbr/>Commit</span></a></li><li><a href="#onordercheck"><span>on<wbr/>Order<wbr/>Check</span></a></li><li><a href="#onsignalactiveping"><span>on<wbr/>Signal<wbr/>Active<wbr/>Ping</span></a></li><li><a href="#onsignalscheduleping"><span>on<wbr/>Signal<wbr/>Schedule<wbr/>Ping</span></a></li><li><a href="#onsignalidleping"><span>on<wbr/>Signal<wbr/>Idle<wbr/>Ping</span></a></li><li><a href="#onsignalscheduleopen"><span>on<wbr/>Signal<wbr/>Schedule<wbr/>Open</span></a></li><li><a href="#onsignalschedulecancelled"><span>on<wbr/>Signal<wbr/>Schedule<wbr/>Cancelled</span></a></li><li><a href="#onsignalpendingopen"><span>on<wbr/>Signal<wbr/>Pending<wbr/>Open</span></a></li><li><a href="#onsignalpendingclose"><span>on<wbr/>Signal<wbr/>Pending<wbr/>Close</span></a></li><li><a href="#onsignalclosecommit"><span>on<wbr/>Signal<wbr/>Close<wbr/>Commit</span></a></li><li><a href="#onpartialprofitcommit"><span>on<wbr/>Partial<wbr/>Profit<wbr/>Commit</span></a></li><li><a href="#onpartiallosscommit"><span>on<wbr/>Partial<wbr/>Loss<wbr/>Commit</span></a></li><li><a href="#ontrailingstopcommit"><span>on<wbr/>Trailing<wbr/>Stop<wbr/>Commit</span></a></li><li><a href="#ontrailingtakecommit"><span>on<wbr/>Trailing<wbr/>Take<wbr/>Commit</span></a></li><li><a href="#onbreakevencommit"><span>on<wbr/>Breakeven<wbr/>Commit</span></a></li><li><a href="#onaveragebuycommit"><span>on<wbr/>Average<wbr/>Buy<wbr/>Commit</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
185
 
186
  <!-- Yandex.Metrika counter -->
187
  <script type="text/javascript">
documents/docs_class_ClientAction.html CHANGED
@@ -63,6 +63,20 @@ Uses singleshot pattern to ensure cleanup happens exactly once.</p>
63
  </code><button type="button">Copy</button></pre>
64
 
65
  <p>Handles scheduled ping events during scheduled signal monitoring.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pingActive</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ActivePingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
67
  </code><button type="button">Copy</button></pre>
68
 
@@ -80,12 +94,12 @@ Uses singleshot pattern to ensure cleanup happens exactly once.</p>
80
 
81
  <p>Gate for position open/close via limit order.
82
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
83
- <a id="orderping" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderPing<a href="#orderping" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">orderPing</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalPingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
84
  </code><button type="button">Copy</button></pre>
85
 
86
  <p>Gate for the pending-order ping (order still open on exchange?).
87
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
88
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#clientaction"><span>Client<wbr/>Action</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#params"><span>params</span></a></li><li><a href="#_handlerinstance"><span>_handler<wbr/>Instance</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#dispose"><span>dispose</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#orderping"><span>order<wbr/>Ping</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
89
 
90
  <!-- Yandex.Metrika counter -->
91
  <script type="text/javascript">
 
63
  </code><button type="button">Copy</button></pre>
64
 
65
  <p>Handles scheduled ping events during scheduled signal monitoring.</p>
66
+ <a id="scheduleevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">scheduleEvent<a href="#scheduleevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">scheduleEvent</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ScheduleEventContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
67
+ </code><button type="button">Copy</button></pre>
68
+
69
+ <p>Handles scheduled signal lifecycle events (creation / cancellation).</p>
70
+ <p>Manual wiring — EVENT-BASED: users implement IActionCallbacks.onScheduleEvent (via <code>addActionSchema</code>)
71
+ to drive the exchange (<code>commitActivateScheduled</code> / <code>commitCancelScheduled</code>); see that contract
72
+ for the full guidance and example. This internal dispatch forwards to the handler/callback.</p>
73
+ <a id="pendingevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pendingEvent<a href="#pendingevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pendingEvent</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalEventContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
74
+ </code><button type="button">Copy</button></pre>
75
+
76
+ <p>Handles pending signal lifecycle events (open / close).</p>
77
+ <p>Manual wiring — EVENT-BASED: users implement IActionCallbacks.onPendingEvent (via <code>addActionSchema</code>) to
78
+ drive the exchange; for per-tick fills use <code>onPingActive</code>. See that contract for the full
79
+ guidance and example. This internal dispatch forwards to the handler/callback.</p>
80
  <a id="pingactive" class="tsd-anchor"></a><h3 class="tsd-anchor-link">pingActive<a href="#pingactive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">pingActive</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">ActivePingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
81
  </code><button type="button">Copy</button></pre>
82
 
 
94
 
95
  <p>Gate for position open/close via limit order.
96
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_FN.</p>
97
+ <a id="ordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">orderCheck<a href="#ordercheck" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">orderCheck</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-5">SignalPingContract</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;;</span>
98
  </code><button type="button">Copy</button></pre>
99
 
100
  <p>Gate for the pending-order ping (order still open on exchange?).
101
  NOT wrapped in trycatch — exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
102
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#clientaction"><span>Client<wbr/>Action</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#params"><span>params</span></a></li><li><a href="#_handlerinstance"><span>_handler<wbr/>Instance</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#dispose"><span>dispose</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#signal"><span>signal</span></a></li><li><a href="#signallive"><span>signal<wbr/>Live</span></a></li><li><a href="#signalbacktest"><span>signal<wbr/>Backtest</span></a></li><li><a href="#breakevenavailable"><span>breakeven<wbr/>Available</span></a></li><li><a href="#partialprofitavailable"><span>partial<wbr/>Profit<wbr/>Available</span></a></li><li><a href="#partiallossavailable"><span>partial<wbr/>Loss<wbr/>Available</span></a></li><li><a href="#pingscheduled"><span>ping<wbr/>Scheduled</span></a></li><li><a href="#scheduleevent"><span>schedule<wbr/>Event</span></a></li><li><a href="#pendingevent"><span>pending<wbr/>Event</span></a></li><li><a href="#pingactive"><span>ping<wbr/>Active</span></a></li><li><a href="#pingidle"><span>ping<wbr/>Idle</span></a></li><li><a href="#riskrejection"><span>risk<wbr/>Rejection</span></a></li><li><a href="#signalsync"><span>signal<wbr/>Sync</span></a></li><li><a href="#ordercheck"><span>order<wbr/>Check</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
103
 
104
  <!-- Yandex.Metrika counter -->
105
  <script type="text/javascript">
documents/docs_class_LiveUtils.html CHANGED
@@ -302,6 +302,22 @@ params.getSignal.</p>
302
  <p>priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
303
  current price; provided → opens immediately if already reached, otherwise registers a
304
  scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  <a id="getstrategystatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStrategyStatus<a href="#getstrategystatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStrategyStatus</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
306
  </code><button type="button">Copy</button></pre>
307
 
@@ -416,7 +432,7 @@ Updates effectivePriceOpen (mean of all entries) and emits average-buy commit ev
416
  </code><button type="button">Copy</button></pre>
417
 
418
  <p>Lists all active live trading instances with their current status.</p>
419
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#liveutils"><span>Live<wbr/>Utils</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_getinstance"><span>_get<wbr/>Instance</span></a></li><li><a href="#run"><span>run</span></a></li><li><a href="#background"><span>background</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#hasnopendingsignal"><span>has<wbr/>No<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasnoscheduledsignal"><span>has<wbr/>No<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionentryoverlap"><span>get<wbr/>Position<wbr/>Entry<wbr/>Overlap</span></a></li><li><a href="#getpositionpartialoverlap"><span>get<wbr/>Position<wbr/>Partial<wbr/>Overlap</span></a></li><li><a href="#stop"><span>stop</span></a></li><li><a href="#commitcancelscheduled"><span>commit<wbr/>Cancel<wbr/>Scheduled</span></a></li><li><a href="#commitclosepending"><span>commit<wbr/>Close<wbr/>Pending</span></a></li><li><a href="#commitcreatesignal"><span>commit<wbr/>Create<wbr/>Signal</span></a></li><li><a href="#getstrategystatus"><span>get<wbr/>Strategy<wbr/>Status</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#commitpartialprofitcost"><span>commit<wbr/>Partial<wbr/>Profit<wbr/>Cost</span></a></li><li><a href="#commitpartiallosscost"><span>commit<wbr/>Partial<wbr/>Loss<wbr/>Cost</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#committrailingstopcost"><span>commit<wbr/>Trailing<wbr/>Stop<wbr/>Cost</span></a></li><li><a href="#committrailingtakecost"><span>commit<wbr/>Trailing<wbr/>Take<wbr/>Cost</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitactivatescheduled"><span>commit<wbr/>Activate<wbr/>Scheduled</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#commitsignalnotify"><span>commit<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#getreport"><span>get<wbr/>Report</span></a></li><li><a href="#dump"><span>dump</span></a></li><li><a href="#list"><span>list</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
420
 
421
  <!-- Yandex.Metrika counter -->
422
  <script type="text/javascript">
 
302
  <p>priceOpen decides the outcome via the existing pipeline: omitted → opens immediately at the
303
  current price; provided → opens immediately if already reached, otherwise registers a
304
  scheduled signal. Validated, and rejected if a signal or deferred action is already in flight.</p>
305
+ <a id="commitcreatetakeprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitCreateTakeProfit<a href="#commitcreatetakeprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitCreateTakeProfit</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
306
+ </code><button type="button">Copy</button></pre>
307
+
308
+ <p>Reports that the pending position's take-profit order was actually filled on the exchange
309
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based TP check.</p>
310
+ <p>The exchange and the strategy are parallel states: the framework evaluates TP/SL against VWAP,
311
+ but the real order may fill on high/low. The close is deferred and emitted with closeReason
312
+ &quot;take_profit&quot; on the next live tick. No-op if no pending signal exists.</p>
313
+ <a id="commitcreatestoploss" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitCreateStopLoss<a href="#commitcreatestoploss" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">commitCreateStopLoss</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
314
+ </code><button type="button">Copy</button></pre>
315
+
316
+ <p>Reports that the pending position's stop-loss order was actually filled on the exchange
317
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based SL check.</p>
318
+ <p>The exchange and the strategy are parallel states: the framework evaluates TP/SL against VWAP,
319
+ but the real order may fill on high/low. The close is deferred and emitted with closeReason
320
+ &quot;stop_loss&quot; on the next live tick. No-op if no pending signal exists.</p>
321
  <a id="getstrategystatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStrategyStatus<a href="#getstrategystatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStrategyStatus</span><span class="hl-2">: (</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
322
  </code><button type="button">Copy</button></pre>
323
 
 
432
  </code><button type="button">Copy</button></pre>
433
 
434
  <p>Lists all active live trading instances with their current status.</p>
435
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#liveutils"><span>Live<wbr/>Utils</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#_getinstance"><span>_get<wbr/>Instance</span></a></li><li><a href="#run"><span>run</span></a></li><li><a href="#background"><span>background</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#hasnopendingsignal"><span>has<wbr/>No<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasnoscheduledsignal"><span>has<wbr/>No<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionentryoverlap"><span>get<wbr/>Position<wbr/>Entry<wbr/>Overlap</span></a></li><li><a href="#getpositionpartialoverlap"><span>get<wbr/>Position<wbr/>Partial<wbr/>Overlap</span></a></li><li><a href="#stop"><span>stop</span></a></li><li><a href="#commitcancelscheduled"><span>commit<wbr/>Cancel<wbr/>Scheduled</span></a></li><li><a href="#commitclosepending"><span>commit<wbr/>Close<wbr/>Pending</span></a></li><li><a href="#commitcreatesignal"><span>commit<wbr/>Create<wbr/>Signal</span></a></li><li><a href="#commitcreatetakeprofit"><span>commit<wbr/>Create<wbr/>Take<wbr/>Profit</span></a></li><li><a href="#commitcreatestoploss"><span>commit<wbr/>Create<wbr/>Stop<wbr/>Loss</span></a></li><li><a href="#getstrategystatus"><span>get<wbr/>Strategy<wbr/>Status</span></a></li><li><a href="#commitpartialprofit"><span>commit<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#commitpartialloss"><span>commit<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#commitpartialprofitcost"><span>commit<wbr/>Partial<wbr/>Profit<wbr/>Cost</span></a></li><li><a href="#commitpartiallosscost"><span>commit<wbr/>Partial<wbr/>Loss<wbr/>Cost</span></a></li><li><a href="#committrailingstop"><span>commit<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#committrailingtake"><span>commit<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#committrailingstopcost"><span>commit<wbr/>Trailing<wbr/>Stop<wbr/>Cost</span></a></li><li><a href="#committrailingtakecost"><span>commit<wbr/>Trailing<wbr/>Take<wbr/>Cost</span></a></li><li><a href="#commitbreakeven"><span>commit<wbr/>Breakeven</span></a></li><li><a href="#commitactivatescheduled"><span>commit<wbr/>Activate<wbr/>Scheduled</span></a></li><li><a href="#commitaveragebuy"><span>commit<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#commitsignalnotify"><span>commit<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#getreport"><span>get<wbr/>Report</span></a></li><li><a href="#dump"><span>dump</span></a></li><li><a href="#list"><span>list</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
436
 
437
  <!-- Yandex.Metrika counter -->
438
  <script type="text/javascript">
documents/docs_class_MarkdownFileBase.html CHANGED
@@ -30,13 +30,13 @@ Each line contains: markdownName, data, symbol, strategyName, exchangeName, fram
30
  </code><button type="button">Copy</button></pre>
31
 
32
  <p>Base directory for all JSONL markdown files</p>
33
- <a id="__wait_for_init_symbol4441" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4441<a href="#__wait_for_init_symbol4441" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4441</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
34
  </code><button type="button">Copy</button></pre>
35
 
36
  <p>Singleshot initialization function that creates directory and stream.
37
  Protected by singleshot to ensure one-time execution.
38
  Sets up error handler that emits to exitEmitter.</p>
39
- <a id="__write_safe_symbol4442" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4442<a href="#__write_safe_symbol4442" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WRITE_SAFE_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4442</span><span class="hl-2">: (</span><span class="hl-5">line</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">symbol</span><span class="hl-2"> | </span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
40
  </code><button type="button">Copy</button></pre>
41
 
42
  <p>Timeout-protected write function with backpressure handling.
@@ -58,7 +58,7 @@ Appends a single line with JSON object containing:</p>
58
  <li>Search flags: symbol, strategyName, exchangeName, frameName, signalId</li>
59
  <li>timestamp: Current timestamp in milliseconds</li>
60
  </ul>
61
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#markdownfilebase"><span>Markdown<wbr/>File<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#markdownname"><span>markdown<wbr/>Name</span></a></li><li><a href="#_filepath"><span>_file<wbr/>Path</span></a></li><li><a href="#_stream"><span>_stream</span></a></li><li><a href="#_basedir"><span>_base<wbr/>Dir</span></a></li><li><a href="#__wait_for_init_symbol4441"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4441</span></a></li><li><a href="#__write_safe_symbol4442"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4442</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#dump"><span>dump</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
62
 
63
  <!-- Yandex.Metrika counter -->
64
  <script type="text/javascript">
 
30
  </code><button type="button">Copy</button></pre>
31
 
32
  <p>Base directory for all JSONL markdown files</p>
33
+ <a id="__wait_for_init_symbol4515" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4515<a href="#__wait_for_init_symbol4515" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4515</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
34
  </code><button type="button">Copy</button></pre>
35
 
36
  <p>Singleshot initialization function that creates directory and stream.
37
  Protected by singleshot to ensure one-time execution.
38
  Sets up error handler that emits to exitEmitter.</p>
39
+ <a id="__write_safe_symbol4516" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4516<a href="#__write_safe_symbol4516" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WRITE_SAFE_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4516</span><span class="hl-2">: (</span><span class="hl-5">line</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">symbol</span><span class="hl-2"> | </span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
40
  </code><button type="button">Copy</button></pre>
41
 
42
  <p>Timeout-protected write function with backpressure handling.
 
58
  <li>Search flags: symbol, strategyName, exchangeName, frameName, signalId</li>
59
  <li>timestamp: Current timestamp in milliseconds</li>
60
  </ul>
61
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#markdownfilebase"><span>Markdown<wbr/>File<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#markdownname"><span>markdown<wbr/>Name</span></a></li><li><a href="#_filepath"><span>_file<wbr/>Path</span></a></li><li><a href="#_stream"><span>_stream</span></a></li><li><a href="#_basedir"><span>_base<wbr/>Dir</span></a></li><li><a href="#__wait_for_init_symbol4515"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4515</span></a></li><li><a href="#__write_safe_symbol4516"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4516</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#dump"><span>dump</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
62
 
63
  <!-- Yandex.Metrika counter -->
64
  <script type="text/javascript">
documents/docs_class_PersistBase.html CHANGED
@@ -20,7 +20,7 @@
20
  </code><button type="button">Copy</button></pre>
21
 
22
  <p>Computed directory path for entity storage</p>
23
- <a id="__base_wait_for_init_symbol3603" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@BASE_WAIT_FOR_INIT_SYMBOL@3603<a href="#__base_wait_for_init_symbol3603" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">BASE_WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">3603</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
24
  </code><button type="button">Copy</button></pre>
25
 
26
  <a id="methods" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Methods<a href="#methods" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="_getfilepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_getFilePath<a href="#_getfilepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">_getFilePath</span><span class="hl-2">(</span><span class="hl-5">entityId</span><span class="hl-2">: </span><span class="hl-5">EntityId</span><span class="hl-2">): </span><span class="hl-5">string</span><span class="hl-2">;</span>
@@ -50,7 +50,7 @@ Uses singleshot to ensure one-time execution.</p>
50
  <p>Async generator yielding all entity IDs.
51
  Sorted alphanumerically.
52
  Used internally by waitForInit for validation.</p>
53
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#persistbase"><span>Persist<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#entityname"><span>entity<wbr/>Name</span></a></li><li><a href="#basedir"><span>base<wbr/>Dir</span></a></li><li><a href="#_directory"><span>_directory</span></a></li><li><a href="#__base_wait_for_init_symbol3603"><span>__@BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@3603</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#_getfilepath"><span>_get<wbr/>File<wbr/>Path</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#readvalue"><span>read<wbr/>Value</span></a></li><li><a href="#hasvalue"><span>has<wbr/>Value</span></a></li><li><a href="#writevalue"><span>write<wbr/>Value</span></a></li><li><a href="#keys"><span>keys</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
54
 
55
  <!-- Yandex.Metrika counter -->
56
  <script type="text/javascript">
 
20
  </code><button type="button">Copy</button></pre>
21
 
22
  <p>Computed directory path for entity storage</p>
23
+ <a id="__base_wait_for_init_symbol3677" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@BASE_WAIT_FOR_INIT_SYMBOL@3677<a href="#__base_wait_for_init_symbol3677" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">BASE_WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">3677</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
24
  </code><button type="button">Copy</button></pre>
25
 
26
  <a id="methods" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Methods<a href="#methods" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><a id="_getfilepath" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_getFilePath<a href="#_getfilepath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-1">_getFilePath</span><span class="hl-2">(</span><span class="hl-5">entityId</span><span class="hl-2">: </span><span class="hl-5">EntityId</span><span class="hl-2">): </span><span class="hl-5">string</span><span class="hl-2">;</span>
 
50
  <p>Async generator yielding all entity IDs.
51
  Sorted alphanumerically.
52
  Used internally by waitForInit for validation.</p>
53
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#persistbase"><span>Persist<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#entityname"><span>entity<wbr/>Name</span></a></li><li><a href="#basedir"><span>base<wbr/>Dir</span></a></li><li><a href="#_directory"><span>_directory</span></a></li><li><a href="#__base_wait_for_init_symbol3677"><span>__@BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@3677</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#_getfilepath"><span>_get<wbr/>File<wbr/>Path</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#readvalue"><span>read<wbr/>Value</span></a></li><li><a href="#hasvalue"><span>has<wbr/>Value</span></a></li><li><a href="#writevalue"><span>write<wbr/>Value</span></a></li><li><a href="#keys"><span>keys</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
54
 
55
  <!-- Yandex.Metrika counter -->
56
  <script type="text/javascript">
documents/docs_class_ReportBase.html CHANGED
@@ -29,13 +29,13 @@ Each line contains: reportName, data, metadata, timestamp</p>
29
  </code><button type="button">Copy</button></pre>
30
 
31
  <p>WriteStream instance for append-only writes, null until initialized</p>
32
- <a id="__wait_for_init_symbol4441" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4441<a href="#__wait_for_init_symbol4441" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4441</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
33
  </code><button type="button">Copy</button></pre>
34
 
35
  <p>Singleshot initialization function that creates directory and stream.
36
  Protected by singleshot to ensure one-time execution.
37
  Sets up error handler that emits to exitEmitter.</p>
38
- <a id="__write_safe_symbol4442" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4442<a href="#__write_safe_symbol4442" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WRITE_SAFE_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4442</span><span class="hl-2">: </span><span class="hl-5">IWrappedQueuedFn</span><span class="hl-2">&lt;</span><span class="hl-5">symbol</span><span class="hl-2"> | </span><span class="hl-4">void</span><span class="hl-2">, [</span><span class="hl-5">line</span><span class="hl-2">: </span><span class="hl-5">string</span><span class="hl-2">]&gt;</span>
39
  </code><button type="button">Copy</button></pre>
40
 
41
  <p>Timeout-protected write function with backpressure handling.
@@ -57,7 +57,7 @@ Appends a single line with JSON object containing:</p>
57
  <li>Search flags: symbol, strategyName, exchangeName, frameName, signalId, walkerName</li>
58
  <li>timestamp: Current timestamp in milliseconds</li>
59
  </ul>
60
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#reportbase"><span>Report<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#reportname"><span>report<wbr/>Name</span></a></li><li><a href="#basedir"><span>base<wbr/>Dir</span></a></li><li><a href="#_filepath"><span>_file<wbr/>Path</span></a></li><li><a href="#_stream"><span>_stream</span></a></li><li><a href="#__wait_for_init_symbol4441"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4441</span></a></li><li><a href="#__write_safe_symbol4442"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4442</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#write"><span>write</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
61
 
62
  <!-- Yandex.Metrika counter -->
63
  <script type="text/javascript">
 
29
  </code><button type="button">Copy</button></pre>
30
 
31
  <p>WriteStream instance for append-only writes, null until initialized</p>
32
+ <a id="__wait_for_init_symbol4515" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4515<a href="#__wait_for_init_symbol4515" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WAIT_FOR_INIT_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4515</span><span class="hl-2">: (() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;() </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;&gt;</span>
33
  </code><button type="button">Copy</button></pre>
34
 
35
  <p>Singleshot initialization function that creates directory and stream.
36
  Protected by singleshot to ensure one-time execution.
37
  Sets up error handler that emits to exitEmitter.</p>
38
+ <a id="__write_safe_symbol4516" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4516<a href="#__write_safe_symbol4516" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-5">__</span><span class="hl-2">@</span><span class="hl-7">WRITE_SAFE_SYMBOL</span><span class="hl-2">@</span><span class="hl-8">4516</span><span class="hl-2">: </span><span class="hl-5">IWrappedQueuedFn</span><span class="hl-2">&lt;</span><span class="hl-5">symbol</span><span class="hl-2"> | </span><span class="hl-4">void</span><span class="hl-2">, [</span><span class="hl-5">line</span><span class="hl-2">: </span><span class="hl-5">string</span><span class="hl-2">]&gt;</span>
39
  </code><button type="button">Copy</button></pre>
40
 
41
  <p>Timeout-protected write function with backpressure handling.
 
57
  <li>Search flags: symbol, strategyName, exchangeName, frameName, signalId, walkerName</li>
58
  <li>timestamp: Current timestamp in milliseconds</li>
59
  </ul>
60
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#reportbase"><span>Report<wbr/>Base</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#reportname"><span>report<wbr/>Name</span></a></li><li><a href="#basedir"><span>base<wbr/>Dir</span></a></li><li><a href="#_filepath"><span>_file<wbr/>Path</span></a></li><li><a href="#_stream"><span>_stream</span></a></li><li><a href="#__wait_for_init_symbol4515"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4515</span></a></li><li><a href="#__write_safe_symbol4516"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4516</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#write"><span>write</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
61
 
62
  <!-- Yandex.Metrika counter -->
63
  <script type="text/javascript">
documents/docs_class_StrategyConnectionService.html CHANGED
@@ -358,6 +358,20 @@ detects the pending signal was closed.</p>
358
  <p>Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.</p>
359
  <p>Delegates to ClientStrategy.createSignal(). Validated and rejected if a signal/deferred
360
  action is already in flight. Works out of the async-hooks execution context.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  <a id="getstatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStatus<a href="#getstatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStatus</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
362
  </code><button type="button">Copy</button></pre>
363
 
@@ -436,7 +450,7 @@ Delegates to <code>ClientStrategy.validateAverageBuy()</code> — no throws, pur
436
 
437
  <p>Adds a new DCA entry to the active pending signal.</p>
438
  <p>Delegates to ClientStrategy.averageBuy() with current execution context.</p>
439
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#strategyconnectionservice"><span>Strategy<wbr/>Connection<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#executioncontextservice"><span>execution<wbr/>Context<wbr/>Service</span></a></li><li><a href="#methodcontextservice"><span>method<wbr/>Context<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskconnectionservice"><span>risk<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#exchangeconnectionservice"><span>exchange<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#partialconnectionservice"><span>partial<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#breakevenconnectionservice"><span>breakeven<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#actioncoreservice"><span>action<wbr/>Core<wbr/>Service</span></a></li><li><a href="#timemetaservice"><span>time<wbr/>Meta<wbr/>Service</span></a></li><li><a href="#pricemetaservice"><span>price<wbr/>Meta<wbr/>Service</span></a></li><li><a href="#getstrategy"><span>get<wbr/>Strategy</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getstopped"><span>get<wbr/>Stopped</span></a></li><li><a href="#tick"><span>tick</span></a></li><li><a href="#backtest"><span>backtest</span></a></li><li><a href="#stopstrategy"><span>stop<wbr/>Strategy</span></a></li><li><a href="#haspendingsignal"><span>has<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasscheduledsignal"><span>has<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li><li><a href="#cancelscheduled"><span>cancel<wbr/>Scheduled</span></a></li><li><a href="#closepending"><span>close<wbr/>Pending</span></a></li><li><a href="#createsignal"><span>create<wbr/>Signal</span></a></li><li><a href="#getstatus"><span>get<wbr/>Status</span></a></li><li><a href="#validatepartialprofit"><span>validate<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#partialprofit"><span>partial<wbr/>Profit</span></a></li><li><a href="#validatepartialloss"><span>validate<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#partialloss"><span>partial<wbr/>Loss</span></a></li><li><a href="#validatetrailingstop"><span>validate<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#trailingstop"><span>trailing<wbr/>Stop</span></a></li><li><a href="#validatetrailingtake"><span>validate<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#trailingtake"><span>trailing<wbr/>Take</span></a></li><li><a href="#validatebreakeven"><span>validate<wbr/>Breakeven</span></a></li><li><a href="#breakeven"><span>breakeven</span></a></li><li><a href="#activatescheduled"><span>activate<wbr/>Scheduled</span></a></li><li><a href="#validateaveragebuy"><span>validate<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#averagebuy"><span>average<wbr/>Buy</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
440
 
441
  <!-- Yandex.Metrika counter -->
442
  <script type="text/javascript">
 
358
  <p>Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.</p>
359
  <p>Delegates to ClientStrategy.createSignal(). Validated and rejected if a signal/deferred
360
  action is already in flight. Works out of the async-hooks execution context.</p>
361
+ <a id="createtakeprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">createTakeProfit<a href="#createtakeprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">createTakeProfit</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
362
+ </code><button type="button">Copy</button></pre>
363
+
364
+ <p>Reports that the pending position's take-profit order was actually filled on the exchange
365
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based TP check.</p>
366
+ <p>Delegates to ClientStrategy.createTakeProfit(). The close is deferred and emitted with
367
+ closeReason &quot;take_profit&quot; on the next tick()/backtest(). Works out of the execution context.</p>
368
+ <a id="createstoploss" class="tsd-anchor"></a><h3 class="tsd-anchor-link">createStopLoss<a href="#createstoploss" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">createStopLoss</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
369
+ </code><button type="button">Copy</button></pre>
370
+
371
+ <p>Reports that the pending position's stop-loss order was actually filled on the exchange
372
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based SL check.</p>
373
+ <p>Delegates to ClientStrategy.createStopLoss(). The close is deferred and emitted with
374
+ closeReason &quot;stop_loss&quot; on the next tick()/backtest(). Works out of the execution context.</p>
375
  <a id="getstatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStatus<a href="#getstatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStatus</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
376
  </code><button type="button">Copy</button></pre>
377
 
 
450
 
451
  <p>Adds a new DCA entry to the active pending signal.</p>
452
  <p>Delegates to ClientStrategy.averageBuy() with current execution context.</p>
453
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#strategyconnectionservice"><span>Strategy<wbr/>Connection<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#executioncontextservice"><span>execution<wbr/>Context<wbr/>Service</span></a></li><li><a href="#methodcontextservice"><span>method<wbr/>Context<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskconnectionservice"><span>risk<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#exchangeconnectionservice"><span>exchange<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#partialconnectionservice"><span>partial<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#breakevenconnectionservice"><span>breakeven<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#actioncoreservice"><span>action<wbr/>Core<wbr/>Service</span></a></li><li><a href="#timemetaservice"><span>time<wbr/>Meta<wbr/>Service</span></a></li><li><a href="#pricemetaservice"><span>price<wbr/>Meta<wbr/>Service</span></a></li><li><a href="#getstrategy"><span>get<wbr/>Strategy</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getstopped"><span>get<wbr/>Stopped</span></a></li><li><a href="#tick"><span>tick</span></a></li><li><a href="#backtest"><span>backtest</span></a></li><li><a href="#stopstrategy"><span>stop<wbr/>Strategy</span></a></li><li><a href="#haspendingsignal"><span>has<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasscheduledsignal"><span>has<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li><li><a href="#cancelscheduled"><span>cancel<wbr/>Scheduled</span></a></li><li><a href="#closepending"><span>close<wbr/>Pending</span></a></li><li><a href="#createsignal"><span>create<wbr/>Signal</span></a></li><li><a href="#createtakeprofit"><span>create<wbr/>Take<wbr/>Profit</span></a></li><li><a href="#createstoploss"><span>create<wbr/>Stop<wbr/>Loss</span></a></li><li><a href="#getstatus"><span>get<wbr/>Status</span></a></li><li><a href="#validatepartialprofit"><span>validate<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#partialprofit"><span>partial<wbr/>Profit</span></a></li><li><a href="#validatepartialloss"><span>validate<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#partialloss"><span>partial<wbr/>Loss</span></a></li><li><a href="#validatetrailingstop"><span>validate<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#trailingstop"><span>trailing<wbr/>Stop</span></a></li><li><a href="#validatetrailingtake"><span>validate<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#trailingtake"><span>trailing<wbr/>Take</span></a></li><li><a href="#validatebreakeven"><span>validate<wbr/>Breakeven</span></a></li><li><a href="#breakeven"><span>breakeven</span></a></li><li><a href="#activatescheduled"><span>activate<wbr/>Scheduled</span></a></li><li><a href="#validateaveragebuy"><span>validate<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#averagebuy"><span>average<wbr/>Buy</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
454
 
455
  <!-- Yandex.Metrika counter -->
456
  <script type="text/javascript">
documents/docs_class_StrategyCoreService.html CHANGED
@@ -174,6 +174,22 @@ Does not require execution context.</p>
174
  <p>Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.</p>
175
  <p>Validates the context, then delegates to StrategyConnectionService.createSignal().
176
  Rejected if a signal or deferred action is already in flight. Does not require execution context.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  <a id="getstatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStatus<a href="#getstatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStatus</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
178
  </code><button type="button">Copy</button></pre>
179
 
@@ -393,7 +409,7 @@ Returns null if no pending signal exists.</p>
393
  <p>Returns the peak-to-trough PnL cost distance between the position's highest profit and deepest drawdown.</p>
394
  <p>Delegates to StrategyConnectionService.getMaxDrawdownDistancePnlCost().
395
  Returns null if no pending signal exists.</p>
396
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#strategycoreservice"><span>Strategy<wbr/>Core<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#strategyconnectionservice"><span>strategy<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskvalidationservice"><span>risk<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyvalidationservice"><span>strategy<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#exchangevalidationservice"><span>exchange<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#framevalidationservice"><span>frame<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#actionvalidationservice"><span>action<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#validate"><span>validate</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getstopped"><span>get<wbr/>Stopped</span></a></li><li><a href="#tick"><span>tick</span></a></li><li><a href="#backtest"><span>backtest</span></a></li><li><a href="#stopstrategy"><span>stop<wbr/>Strategy</span></a></li><li><a href="#cancelscheduled"><span>cancel<wbr/>Scheduled</span></a></li><li><a href="#closepending"><span>close<wbr/>Pending</span></a></li><li><a href="#createsignal"><span>create<wbr/>Signal</span></a></li><li><a href="#getstatus"><span>get<wbr/>Status</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li><li><a href="#validatepartialprofit"><span>validate<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#partialprofit"><span>partial<wbr/>Profit</span></a></li><li><a href="#validatepartialloss"><span>validate<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#partialloss"><span>partial<wbr/>Loss</span></a></li><li><a href="#validatetrailingstop"><span>validate<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#trailingstop"><span>trailing<wbr/>Stop</span></a></li><li><a href="#validatetrailingtake"><span>validate<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#trailingtake"><span>trailing<wbr/>Take</span></a></li><li><a href="#validatebreakeven"><span>validate<wbr/>Breakeven</span></a></li><li><a href="#breakeven"><span>breakeven</span></a></li><li><a href="#activatescheduled"><span>activate<wbr/>Scheduled</span></a></li><li><a href="#validateaveragebuy"><span>validate<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#averagebuy"><span>average<wbr/>Buy</span></a></li><li><a href="#haspendingsignal"><span>has<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasscheduledsignal"><span>has<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
397
 
398
  <!-- Yandex.Metrika counter -->
399
  <script type="text/javascript">
 
174
  <p>Queues a user-supplied signal DTO to be consumed by the next tick instead of getSignal.</p>
175
  <p>Validates the context, then delegates to StrategyConnectionService.createSignal().
176
  Rejected if a signal or deferred action is already in flight. Does not require execution context.</p>
177
+ <a id="createtakeprofit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">createTakeProfit<a href="#createtakeprofit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">createTakeProfit</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
178
+ </code><button type="button">Copy</button></pre>
179
+
180
+ <p>Reports that the pending position's take-profit order was actually filled on the exchange
181
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based TP check.</p>
182
+ <p>Validates the context, then delegates to StrategyConnectionService.createTakeProfit().
183
+ The close is deferred and emitted with closeReason &quot;take_profit&quot; on the next tick/backtest.
184
+ Does not require execution context.</p>
185
+ <a id="createstoploss" class="tsd-anchor"></a><h3 class="tsd-anchor-link">createStopLoss<a href="#createstoploss" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">createStopLoss</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-4">void</span><span class="hl-2">&gt;</span>
186
+ </code><button type="button">Copy</button></pre>
187
+
188
+ <p>Reports that the pending position's stop-loss order was actually filled on the exchange
189
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based SL check.</p>
190
+ <p>Validates the context, then delegates to StrategyConnectionService.createStopLoss().
191
+ The close is deferred and emitted with closeReason &quot;stop_loss&quot; on the next tick/backtest.
192
+ Does not require execution context.</p>
193
  <a id="getstatus" class="tsd-anchor"></a><h3 class="tsd-anchor-link">getStatus<a href="#getstatus" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><pre><code class="ts"><span class="hl-9">getStatus</span><span class="hl-2">: (</span><span class="hl-5">backtest</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">context</span><span class="hl-2">: { </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">exchangeName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">; }) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-5">StrategyStatus</span><span class="hl-2">&gt;</span>
194
  </code><button type="button">Copy</button></pre>
195
 
 
409
  <p>Returns the peak-to-trough PnL cost distance between the position's highest profit and deepest drawdown.</p>
410
  <p>Delegates to StrategyConnectionService.getMaxDrawdownDistancePnlCost().
411
  Returns null if no pending signal exists.</p>
412
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#strategycoreservice"><span>Strategy<wbr/>Core<wbr/>Service</span></a><ul><li><a href="#constructor"><span>Constructor</span></a></li><li><a href="#properties"><span>Properties</span></a></li><li><ul><li><a href="#loggerservice"><span>logger<wbr/>Service</span></a></li><li><a href="#strategyconnectionservice"><span>strategy<wbr/>Connection<wbr/>Service</span></a></li><li><a href="#strategyschemaservice"><span>strategy<wbr/>Schema<wbr/>Service</span></a></li><li><a href="#riskvalidationservice"><span>risk<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#strategyvalidationservice"><span>strategy<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#exchangevalidationservice"><span>exchange<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#framevalidationservice"><span>frame<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#actionvalidationservice"><span>action<wbr/>Validation<wbr/>Service</span></a></li><li><a href="#validate"><span>validate</span></a></li><li><a href="#getpendingsignal"><span>get<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#gettotalpercentclosed"><span>get<wbr/>Total<wbr/>Percent<wbr/>Closed</span></a></li><li><a href="#gettotalcostclosed"><span>get<wbr/>Total<wbr/>Cost<wbr/>Closed</span></a></li><li><a href="#getpositioneffectiveprice"><span>get<wbr/>Position<wbr/>Effective<wbr/>Price</span></a></li><li><a href="#getpositioninvestedcount"><span>get<wbr/>Position<wbr/>Invested<wbr/>Count</span></a></li><li><a href="#getpositioninvestedcost"><span>get<wbr/>Position<wbr/>Invested<wbr/>Cost</span></a></li><li><a href="#getpositionpnlpercent"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Percent</span></a></li><li><a href="#getpositionpnlcost"><span>get<wbr/>Position<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionlevels"><span>get<wbr/>Position<wbr/>Levels</span></a></li><li><a href="#getpositionpartials"><span>get<wbr/>Position<wbr/>Partials</span></a></li><li><a href="#getpositionentries"><span>get<wbr/>Position<wbr/>Entries</span></a></li><li><a href="#getscheduledsignal"><span>get<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getbreakeven"><span>get<wbr/>Breakeven</span></a></li><li><a href="#getstopped"><span>get<wbr/>Stopped</span></a></li><li><a href="#tick"><span>tick</span></a></li><li><a href="#backtest"><span>backtest</span></a></li><li><a href="#stopstrategy"><span>stop<wbr/>Strategy</span></a></li><li><a href="#cancelscheduled"><span>cancel<wbr/>Scheduled</span></a></li><li><a href="#closepending"><span>close<wbr/>Pending</span></a></li><li><a href="#createsignal"><span>create<wbr/>Signal</span></a></li><li><a href="#createtakeprofit"><span>create<wbr/>Take<wbr/>Profit</span></a></li><li><a href="#createstoploss"><span>create<wbr/>Stop<wbr/>Loss</span></a></li><li><a href="#getstatus"><span>get<wbr/>Status</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#clear"><span>clear</span></a></li><li><a href="#validatepartialprofit"><span>validate<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#partialprofit"><span>partial<wbr/>Profit</span></a></li><li><a href="#validatepartialloss"><span>validate<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#partialloss"><span>partial<wbr/>Loss</span></a></li><li><a href="#validatetrailingstop"><span>validate<wbr/>Trailing<wbr/>Stop</span></a></li><li><a href="#trailingstop"><span>trailing<wbr/>Stop</span></a></li><li><a href="#validatetrailingtake"><span>validate<wbr/>Trailing<wbr/>Take</span></a></li><li><a href="#trailingtake"><span>trailing<wbr/>Take</span></a></li><li><a href="#validatebreakeven"><span>validate<wbr/>Breakeven</span></a></li><li><a href="#breakeven"><span>breakeven</span></a></li><li><a href="#activatescheduled"><span>activate<wbr/>Scheduled</span></a></li><li><a href="#validateaveragebuy"><span>validate<wbr/>Average<wbr/>Buy</span></a></li><li><a href="#averagebuy"><span>average<wbr/>Buy</span></a></li><li><a href="#haspendingsignal"><span>has<wbr/>Pending<wbr/>Signal</span></a></li><li><a href="#hasscheduledsignal"><span>has<wbr/>Scheduled<wbr/>Signal</span></a></li><li><a href="#getpositionestimateminutes"><span>get<wbr/>Position<wbr/>Estimate<wbr/>Minutes</span></a></li><li><a href="#getpositioncountdownminutes"><span>get<wbr/>Position<wbr/>Countdown<wbr/>Minutes</span></a></li><li><a href="#getpositionactiveminutes"><span>get<wbr/>Position<wbr/>Active<wbr/>Minutes</span></a></li><li><a href="#getpositionwaitingminutes"><span>get<wbr/>Position<wbr/>Waiting<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitprice"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Price</span></a></li><li><a href="#getpositionhighestprofittimestamp"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Timestamp</span></a></li><li><a href="#getpositionhighestpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitbreakeven"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Breakeven</span></a></li><li><a href="#getpositiondrawdownminutes"><span>get<wbr/>Position<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionhighestprofitminutes"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownminutes"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Minutes</span></a></li><li><a href="#getpositionmaxdrawdownprice"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Price</span></a></li><li><a href="#getpositionmaxdrawdowntimestamp"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Timestamp</span></a></li><li><a href="#getpositionmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestprofitdistancepnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestprofitdistancepnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Profit<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlpercentage"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getpositionhighestmaxdrawdownpnlcost"><span>get<wbr/>Position<wbr/>Highest<wbr/>Max<wbr/>Drawdown<wbr/>Pnl<wbr/>Cost</span></a></li><li><a href="#getmaxdrawdowndistancepnlpercentage"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Percentage</span></a></li><li><a href="#getmaxdrawdowndistancepnlcost"><span>get<wbr/>Max<wbr/>Drawdown<wbr/>Distance<wbr/>Pnl<wbr/>Cost</span></a></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
413
 
414
  <!-- Yandex.Metrika counter -->
415
  <script type="text/javascript">
documents/docs_data_positional-args-audit.html ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>docs\data\positional-args-audit | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="docs_data_positional-args-audit.html">docs\data\positional-args-audit</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="positional-argument-swap-audit--src" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Positional-Argument Swap Audit — <code>./src</code><a href="#positional-argument-swap-audit--src" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p><strong>Date:</strong> 2026-06-16
2
+ <strong>Scope:</strong> entire <code>./src</code> (~250 <code>.ts</code> files), all primitive types (number/number, string/string, boolean).
3
+ <strong>Goal:</strong> find swapped positional arguments of the same primitive type — bugs TypeScript's structural typing cannot catch (<code>f(timestamp, price)</code> ≡ <code>f(price, timestamp)</code> when both are <code>number</code>).
4
+ <strong>Method:</strong> signature → call-sites → compare each actual argument's variable name against the parameter name at that position. (Same method that found the one real bug in this session.)</p>
5
+ <a id="summary" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Summary<a href="#summary" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
6
+ <thead>
7
+ <tr>
8
+ <th>Result</th>
9
+ <th>Count</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <tr>
14
+ <td>Risky functions/signatures inventoried</td>
15
+ <td>~40</td>
16
+ </tr>
17
+ <tr>
18
+ <td>Call-sites verified</td>
19
+ <td>120+</td>
20
+ </tr>
21
+ <tr>
22
+ <td>❌ Bugs found (this audit)</td>
23
+ <td><strong>0</strong></td>
24
+ </tr>
25
+ <tr>
26
+ <td>❌ Bug found &amp; already fixed (commit <code>c7958a73</code>)</td>
27
+ <td>1</td>
28
+ </tr>
29
+ <tr>
30
+ <td>⚠️ Suspects needing human review</td>
31
+ <td>0 (see notes)</td>
32
+ </tr>
33
+ </tbody>
34
+ </table>
35
+ <p><strong>Verdict: no swapped-argument bugs remain in <code>./src</code>.</strong> The single real bug of this class — <code>PROCESS_COMMIT_QUEUE_FN(currentTime, currentPrice)</code> instead of <code>(currentPrice, currentTime)</code> in <code>ClientStrategy.tick()</code> — was already fixed by commit <code>c7958a73</code> before this audit.</p>
36
+ <a id="coverage-by-directory" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Coverage by directory<a href="#coverage-by-directory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
37
+ <thead>
38
+ <tr>
39
+ <th>Directory</th>
40
+ <th>Status</th>
41
+ <th>What was checked</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <tr>
46
+ <td><code>src/math/</code></td>
47
+ <td>✅ clean</td>
48
+ <td>All number-only fns (<code>investedCostToPercent</code>, <code>percentToCloseCost</code>, <code>slPriceToPercentShift</code>, <code>tpPriceToPercentShift</code>, <code>slPercentShiftToPrice</code>, <code>tpPercentShiftToPrice</code>, <code>breakevenNew*Price</code>, <code>percentValue</code>, <code>percentDiff</code>) — 30+ call-sites across <code>function/strategy.ts</code>, <code>classes/Backtest.ts</code>, <code>classes/Live.ts</code>.</td>
49
+ </tr>
50
+ <tr>
51
+ <td><code>src/interfaces/</code></td>
52
+ <td>✅ clean</td>
53
+ <td>System callback signatures vs their ClientStrategy call-sites: <code>onHighestProfit</code>/<code>onMaxDrawdown</code> (<code>signal, currentPrice, timestamp</code>), <code>onSchedulePing</code>/<code>onActivePing</code>/<code>onIdlePing</code> (system), <code>onInit</code>/<code>onDispose</code> (string-quad).</td>
54
+ </tr>
55
+ <tr>
56
+ <td><code>src/client/</code></td>
57
+ <td>✅ clean</td>
58
+ <td><code>ClientStrategy.ts</code> fully audited during this session (all <code>CALL_*_FN</code>, <code>PARTIAL_*_FN</code>, sync, ping, breakeven groups). <code>ClientPartial/Breakeven/Risk/Exchange/Frame/Sizing/Action</code> — agent-checked clean.</td>
59
+ </tr>
60
+ <tr>
61
+ <td><code>src/lib/services/markdown/</code></td>
62
+ <td>✅ clean</td>
63
+ <td><code>getStorage</code> memoize + <code>new ReportStorage(...)</code> string-quads in all 12 services + every <code>this.getStorage(...)</code> call-site — order <code>symbol, strategyName, exchangeName, frameName[, backtest]</code> correct everywhere.</td>
64
+ </tr>
65
+ <tr>
66
+ <td><code>src/lib/services/core</code> + <code>connection</code></td>
67
+ <td>✅ clean</td>
68
+ <td><code>breakeven</code>/<code>trailingStop</code>/<code>trailingTake</code>/<code>partialProfit</code>/<code>partialLoss</code>/<code>averageBuy</code> end-to-end (Core→Connection→ClientStrategy), <code>getStrategy(...)</code> string-quad, <code>getTimestamp</code>/<code>getCurrentPrice(symbol, context, backtest)</code>.</td>
69
+ </tr>
70
+ <tr>
71
+ <td><code>src/function/strategy.ts</code></td>
72
+ <td>✅ clean</td>
73
+ <td><code>commit*</code> forwarding to <code>strategyCoreService.*</code> — partial/averageBuy/breakeven/trailing all in correct order.</td>
74
+ </tr>
75
+ <tr>
76
+ <td><code>src/classes/</code></td>
77
+ <td>✅ clean</td>
78
+ <td><code>Backtest</code>/<code>Live</code> <code>commit*</code> facades (breakeven/trailing with new <code>timestamp</code>), Persist adapter triples.</td>
79
+ </tr>
80
+ <tr>
81
+ <td><code>src/helpers, validation, contract, model, utils, config</code></td>
82
+ <td>✅ no risk patterns</td>
83
+ <td>Spot-checked; no 2+ adjacent same-type positional bugs in hot paths.</td>
84
+ </tr>
85
+ </tbody>
86
+ </table>
87
+ <a id="the-fixed-bug-reference" class="tsd-anchor"></a><h2 class="tsd-anchor-link">The fixed bug (reference)<a href="#the-fixed-bug-reference" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p><code>src/client/ClientStrategy.ts</code> <code>tick()</code> — <code>PROCESS_COMMIT_QUEUE_FN(self, currentPrice, timestamp)</code>:</p>
88
+ <ul>
89
+ <li><strong>Was:</strong> <code>PROCESS_COMMIT_QUEUE_FN(this, currentTime, currentPrice)</code> — <code>currentTime</code> passed as <code>currentPrice</code>, <code>currentPrice</code> as <code>timestamp</code>.</li>
90
+ <li><strong>Now (commit <code>c7958a73</code>):</strong> <code>PROCESS_COMMIT_QUEUE_FN(this, currentPrice, currentTime)</code>.</li>
91
+ <li><strong>Why it was invisible:</strong> both args are <code>number</code>; structural typing accepts either order.</li>
92
+ </ul>
93
+ <a id="inventory-of-fragile-signatures-forward-looking-risk-map" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Inventory of fragile signatures (forward-looking risk map)<a href="#inventory-of-fragile-signatures-forward-looking-risk-map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>These compile-safely accept swapped args — guard future edits here. All are currently correct.</p>
94
+ <a id="numbernumber-adjacent--no-type-separator-highest-risk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">number/number adjacent — NO type separator (highest risk)<a href="#numbernumber-adjacent--no-type-separator-highest-risk" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><table>
95
+ <thead>
96
+ <tr>
97
+ <th>Function</th>
98
+ <th>File</th>
99
+ <th>Adjacent same-type params</th>
100
+ </tr>
101
+ </thead>
102
+ <tbody>
103
+ <tr>
104
+ <td><code>onHighestProfit</code> / <code>onMaxDrawdown</code></td>
105
+ <td><code>interfaces/Strategy.interface.ts</code></td>
106
+ <td><code>currentPrice, timestamp</code></td>
107
+ </tr>
108
+ <tr>
109
+ <td><code>PROCESS_COMMIT_QUEUE_FN</code></td>
110
+ <td><code>client/ClientStrategy.ts</code></td>
111
+ <td><code>currentPrice, timestamp</code> ← was the bug</td>
112
+ </tr>
113
+ <tr>
114
+ <td><code>PARTIAL_PROFIT_FN</code> / <code>PARTIAL_LOSS_FN</code></td>
115
+ <td><code>client/ClientStrategy.ts</code></td>
116
+ <td><code>percentToClose, currentPrice, timestamp</code> (3 in a row)</td>
117
+ </tr>
118
+ <tr>
119
+ <td><code>AVERAGE_BUY_FN</code></td>
120
+ <td><code>client/ClientStrategy.ts</code></td>
121
+ <td><code>currentPrice, timestamp, cost</code> (3 in a row)</td>
122
+ </tr>
123
+ <tr>
124
+ <td><code>slPriceToPercentShift</code> / <code>tpPriceToPercentShift</code></td>
125
+ <td><code>math/</code></td>
126
+ <td><code>newPrice, originalPrice, effectivePriceOpen</code> (3 in a row)</td>
127
+ </tr>
128
+ <tr>
129
+ <td><code>investedCostToPercent</code> / <code>percentToCloseCost</code></td>
130
+ <td><code>math/</code></td>
131
+ <td><code>dollarAmount/percentToClose, investedCost</code> — swap = 40–400× error</td>
132
+ </tr>
133
+ <tr>
134
+ <td><code>readCandlesData</code></td>
135
+ <td><code>classes/Persist.ts</code> (iface)</td>
136
+ <td><code>limit, sinceTimestamp, untilTimestamp</code></td>
137
+ </tr>
138
+ </tbody>
139
+ </table>
140
+ <a id="stringstringstringstring--context-triplesquads-path--cache-risk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">string/string/string(/string) — context triples/quads (path &amp; cache risk)<a href="#stringstringstringstring--context-triplesquads-path--cache-risk" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><table>
141
+ <thead>
142
+ <tr>
143
+ <th>Function</th>
144
+ <th>File</th>
145
+ <th>Adjacent strings</th>
146
+ </tr>
147
+ </thead>
148
+ <tbody>
149
+ <tr>
150
+ <td><code>getStorage</code> / <code>new ReportStorage</code></td>
151
+ <td>all <code>lib/services/markdown/*.ts</code></td>
152
+ <td><code>symbol, strategyName, exchangeName, frameName</code></td>
153
+ </tr>
154
+ <tr>
155
+ <td><code>getStrategy</code></td>
156
+ <td><code>lib/services/connection/StrategyConnectionService.ts</code></td>
157
+ <td><code>symbol, strategyName, exchangeName, frameName</code></td>
158
+ </tr>
159
+ <tr>
160
+ <td><code>Persist*Instance</code> constructors</td>
161
+ <td><code>classes/Persist.ts</code></td>
162
+ <td><code>symbol, strategyName, exchangeName</code></td>
163
+ </tr>
164
+ <tr>
165
+ <td><code>onInit</code> / <code>onDispose</code></td>
166
+ <td><code>interfaces/Strategy.interface.ts</code></td>
167
+ <td><code>symbol, strategyName, exchangeName, frameName</code></td>
168
+ </tr>
169
+ </tbody>
170
+ </table>
171
+ <a id="protected-by-a-type-separator-lower-risk--ts-catches-a-swap" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Protected by a type separator (lower risk — TS catches a swap)<a href="#protected-by-a-type-separator-lower-risk--ts-catches-a-swap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Where a <code>string</code> discriminant (e.g. <code>closeReason</code>) or a <code>boolean</code> (<code>backtest</code>) sits between two <code>number</code>s, TypeScript <em>does</em> reject a swap. Examples: <code>CLOSE_*_IN_BACKTEST_FN(..., averagePrice, closeReason, closeTimestamp)</code>, the ping callbacks <code>(..., currentPrice, backtest, timestamp)</code>. These were verified but are self-defending.</p>
172
+ <a id="notes-on-agent-flagged-false-positives" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Notes on agent-flagged false positives<a href="#notes-on-agent-flagged-false-positives" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>An exploratory pass flagged 10 markdown <code>getStorage</code> factories as &quot;cache-collision bugs&quot; because the memoize <strong>key</strong> includes <code>backtest</code> while the <code>ReportStorage</code> <strong>constructor</strong> receives only 4 args (no <code>backtest</code>). This was reviewed and is <strong>not a bug and not in scope</strong>: <code>ReportStorage</code> legitimately doesn't need <code>backtest</code> (it isn't stored; each event carries its own <code>backtest</code>), and including <code>backtest</code> in the memo key correctly <em>separates</em> live vs backtest instances (the opposite of a collision). The string order <code>symbol, strategyName, exchangeName, frameName</code> — the only thing relevant to <em>this</em> audit — is correct in all 12 services.</p>
173
+ <a id="recommendation-out-of-scope-for-this-audit-for-follow-up" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Recommendation (out of scope for this audit, for follow-up)<a href="#recommendation-out-of-scope-for-this-audit-for-follow-up" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The codebase has <code>strict: false</code>, no ESLint, no branded types — so this class of bug is undetectable at compile time. To prevent recurrence:</p>
174
+ <ol>
175
+ <li>Branded primitives: <code>type Timestamp = number &amp; { readonly __t: 'ms' }</code>, <code>type Price = number &amp; { readonly __t: 'price' }</code>, <code>type Percent = ...</code> — would make <code>onHighestProfit</code>/<code>PROCESS_COMMIT_QUEUE_FN</code>/<code>investedCostToPercent</code> swaps a compile error.</li>
176
+ <li>Replace positional <code>(symbol, strategyName, exchangeName, frameName)</code> quads with the existing <code>context</code> object pattern (already used in Core/Connection) at the markdown/persist layers.</li>
177
+ </ol>
178
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#positional-argument-swap-audit--src"><span>Positional-<wbr/>Argument <wbr/>Swap <wbr/>Audit — ./src</span></a><ul><li><a href="#summary"><span>Summary</span></a></li><li><a href="#coverage-by-directory"><span>Coverage by directory</span></a></li><li><a href="#the-fixed-bug-reference"><span>The fixed bug (reference)</span></a></li><li><a href="#inventory-of-fragile-signatures-forward-looking-risk-map"><span>Inventory of fragile signatures (forward-<wbr/>looking risk map)</span></a></li><li><ul><li><a href="#numbernumber-adjacent--no-type-separator-highest-risk"><span>number/number adjacent — NO type separator (highest risk)</span></a></li><li><a href="#stringstringstringstring--context-triplesquads-path--cache-risk"><span>string/string/string(/string) — context triples/quads (path &amp; cache risk)</span></a></li><li><a href="#protected-by-a-type-separator-lower-risk--ts-catches-a-swap"><span>Protected by a type separator (lower risk — TS catches a swap)</span></a></li></ul></li><li><a href="#notes-on-agent-flagged-false-positives"><span>Notes on agent-<wbr/>flagged false positives</span></a></li><li><a href="#recommendation-out-of-scope-for-this-audit-for-follow-up"><span>Recommendation (out of scope for this audit, for follow-<wbr/>up)</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
179
+
180
+ <!-- Yandex.Metrika counter -->
181
+ <script type="text/javascript">
182
+ (function(m,e,t,r,i,k,a){
183
+ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
184
+ m[i].l=1*new Date();
185
+ for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
186
+ k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
187
+ })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
188
+
189
+ ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
190
+ </script>
191
+ <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
192
+ <!-- /Yandex.Metrika counter -->
193
+
194
+ <!-- Google tag (gtag.js) -->
195
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
196
+ <script>
197
+ window.dataLayer = window.dataLayer || [];
198
+ function gtag(){dataLayer.push(arguments);}
199
+ gtag('js', new Date());
200
+
201
+ gtag('config', 'G-3MQZEBBDDR');
202
+ </script>
documents/docs_function_commitCreateStopLoss.html ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>docs/function/commitCreateStopLoss | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="docs_function_commitCreateStopLoss.html">docs/function/commitCreateStopLoss</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="commitcreatestoploss" class="tsd-anchor"></a><h1 class="tsd-anchor-link">commitCreateStopLoss<a href="#commitcreatestoploss" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><pre><code class="ts"><span class="hl-4">declare</span><span class="hl-2"> </span><span class="hl-4">function</span><span class="hl-2"> </span><span class="hl-1">commitCreateStopLoss</span><span class="hl-2">(</span><span class="hl-5">symbol</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">, </span><span class="hl-5">payload</span><span class="hl-2">?: </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">CommitPayload</span><span class="hl-2">&gt;): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">void</span><span class="hl-2">&gt;;</span>
2
+ </code><button type="button">Copy</button></pre>
3
+
4
+ <p>Reports that the pending position's stop-loss order was actually filled on the exchange
5
+ (e.g. by candle high/low), forcing a close that bypasses the VWAP-based SL check.</p>
6
+ <p>The exchange and the strategy are parallel states: the framework evaluates TP/SL against VWAP,
7
+ but the real order may fill on high/low. The close is deferred and emitted with closeReason
8
+ &quot;stop_loss&quot; on the next tick. No-op if no pending signal exists.</p>
9
+ <p>Automatically detects backtest/live mode from execution context.</p>
10
+ <a id="parameters" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Parameters<a href="#parameters" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><table>
11
+ <thead>
12
+ <tr>
13
+ <th>Parameter</th>
14
+ <th>Description</th>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ <tr>
19
+ <td><code>symbol</code></td>
20
+ <td>Trading pair symbol</td>
21
+ </tr>
22
+ <tr>
23
+ <td><code>payload</code></td>
24
+ <td>Optional commit payload with id and note</td>
25
+ </tr>
26
+ </tbody>
27
+ </table>
28
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#commitcreatestoploss"><span>commit<wbr/>Create<wbr/>Stop<wbr/>Loss</span></a><ul><li><a href="#parameters"><span>Parameters</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
29
+
30
+ <!-- Yandex.Metrika counter -->
31
+ <script type="text/javascript">
32
+ (function(m,e,t,r,i,k,a){
33
+ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
34
+ m[i].l=1*new Date();
35
+ for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
36
+ k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
37
+ })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
38
+
39
+ ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
40
+ </script>
41
+ <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
42
+ <!-- /Yandex.Metrika counter -->
43
+
44
+ <!-- Google tag (gtag.js) -->
45
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
46
+ <script>
47
+ window.dataLayer = window.dataLayer || [];
48
+ function gtag(){dataLayer.push(arguments);}
49
+ gtag('js', new Date());
50
+
51
+ gtag('config', 'G-3MQZEBBDDR');
52
+ </script>