tripolskypetr commited on
Commit
eb31fc0
Β·
1 Parent(s): 56c9daa
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/cli_readme.html +6 -1
  33. documents/concept_01_highload_candle_storage.html +88 -0
  34. documents/docs.html +4 -3
  35. documents/docs_class_BrokerAdapter.html +8 -7
  36. documents/docs_class_BrokerBase.html +29 -13
  37. documents/docs_class_ClientAction.html +7 -1
  38. documents/docs_class_ClientRisk.html +12 -2
  39. documents/docs_class_CronUtils.html +11 -3
  40. documents/docs_class_MarkdownFileBase.html +3 -3
  41. documents/docs_class_NotificationAdapter.html +1 -1
  42. documents/docs_class_NotificationBacktestAdapter.html +6 -1
  43. documents/docs_class_NotificationLiveAdapter.html +6 -1
  44. documents/docs_class_PersistBase.html +2 -2
  45. documents/docs_class_ReportBase.html +3 -3
  46. documents/docs_function_getConfig.html +1 -1
  47. documents/docs_function_getDefaultConfig.html +1 -1
  48. documents/docs_interface_IAction.html +1 -1
  49. documents/docs_interface_IActionCallbacks.html +1 -1
  50. documents/docs_interface_IBroker.html +28 -18
assets/hierarchy.js CHANGED
@@ -1 +1 @@
1
- window.hierarchyData = "eJylmV+PmzgUxb8Lz24XX9tg8tamWmm001WUWW0fVn3wgieDQqACp7uz1Xz3leNMxiYm2PQliRIO5wf3+g8nP5K+69SQrP7CPC8QpAVHADhDAIQgAKo/Mf1dzhAApwhIihEQyBAQwhAQyhEQfQjJCgQk15+KVL8UCCjGCCikCBglCHKSIeC0QMCZfsk4YoCzryjp5WMjS1V37ZCsfiSYsEK/t+Igk1Xyse/2sv8oBpmgZF+3VbLCwFFy7JtklZSNGAY5/KKev8nh/dux75/UoUmQ+T1ZJWqo3mnxO/PFC0r0RVs2d0Z78QCWvXrUrZL9oygvNudjJz0uAv3jU91UvWz1bSas+PqCEkgzx/m+24XZ3ne7AM+TQ8FHDrvQazPHxl6bvqbTtQHObOeN7Id6UE75btpbglgGUqTMMBDiY+il2Mvvsr1rByXaMhJorI6no9jQUd8dWou2auQiNFcaz5VRw8W4h+tOq76LZhHZWBzPxjPDljMP2323W4Rl6WKJaJpyQ8Sph+izFMOxX1bGkTaeDEx/kRR7yQ5d/7wQzJbGc1FiuMDX9793qn6sS6Gn/0V0vhPEM+amzwjx9dlG9KpeOARG2niy4lxV6hudW1nKVi0Cc6XRXBibWYN4Z41tPeyXUVnCeCZixiZx19fzqR/KJ1kdF86xY3E8Gzuz5b779SCHYekAGGnjyfLckBWpj6zetQtb35VGc0F67rDCW00l1MJS2sp4KjCzGcW+WfZBdb3YLeVytPFk53mWgreOqhdK7patAGNxPNu5+ylz14Dj301dmj7Zdv8EMrmi6J0qY6bfGXV2iXrmWT/Jcv+h3w1hJI4kmiPDYDhYPuaIvCOOJPAJIcMwdv1TNHV1Wkc34rnpRBXufiUNpSDO2H6dZStzNWvda+G3YUodysLxDZalFEs6NCPmWSonzmgxJ/ykukCQ18Oj/XP96J8zsyXKqQfidWMfCWPJAouSM497eC0Wl4CyDOmOON0CjnMX4r+63W1ELw7Dhz+2oSiOKPDyOfAp51/rf2W1kb3exYld4Hx+4wShRGSS6DfZNM/xHCdZqDstrt31iDuIyEpcRNGtwbFZPzibZPmJ2nhPEM8IZr3lmadaxiK6WpYsnsfszElKnTn2i2j2st/K4diowDXXkYR1jc6FLFdfJDWZKIbEUZdIUUc8HqPJ3GnWNThzshAyeo0wES7N+QcGS5Y5z67NJxOkOfvg9OgCoNOZawBfTDTnHRIRWbbgqftUFjRnHZoDWfbOTvZ24DPvHhT2WOa5p+Y3U505hKhExwIpPEWYim7mGEJjmzd7jD0DbyKfmXMPzGYsc+Lpe28IM2sdEsBYxsxjPJm0zJkHpywWQJ57ACbilFn/wCjlzR5ST9UnMpNZ97C8xDIHz7j3ByOz3kGhiGXtm3Km0o9587Dkw7L3tt1UxDHvHxhvXACY+zeX2ZSsu8O3Riq57lrVi1IFbWj80ug/SlKKEQN6em7U71dwusD1oOpy+NxVsolgGylD9lwvL/8DZ644kA=="
 
1
+ window.hierarchyData = "eJylmV1v2zYYhf+LrtlO/KZ817oYECwdDGdYL4ZecBKjCJalQqS7ZUX++8DQcSiZikj1Jk4cHZ2HfF9S9PGPbOh7o7PNX1AUBUAQCoAQLgBClAGEmP1NQIBQIQDCOQcIIwIQJgVAmNr3OAQI20twgQAiOQSIQAwQQfZPTAAiBANEGQOI0wIgwRFAQtgfBQQUCfwVZIO6b1Vpmr7T2eZHBjGj9rWTR5Vtso9Df1DDR6lVBrJD01XZBiIBstPQZpusbKXWSv9iHr8p/f712vcP5thmwP0/22RGV++s+J174wlkdtCezY3TXjzsHJw9ms6o4V6WF5vztbMeF4H950PTVoPq7DRjRr8+gQzlYuR829dxtrd9HeFpHSAUE4c6dmzu2tSx2TE9jw3h0dh2atCNNqPyvWnvCVIZcMGRY6AsxDAoeVDfVXfTaSO7MhFoqk6lI3kuHB0LzdBWdlWrVqGNpelcGDouAQNcN1b1XbaryKbidDaKHVshAmy3fb0Ky9OlE3G3hnHOA0SfldSnYV0ZJ9p0MuH6CyMSJDv2w+NKMF+azAVh7rhIqO9/701z35TSbv+r6EI3SGckrs8wDfXZTg6mWbkEJtp0MnquKg+tzr0qVWdWgY2l6VzC7Ro4uGvsG31YR+UJk5lQfl6bBQow3ZUPqjqt3GOn4nQ25NhIHpqvO6X12gUw0aaTEeLIIA6RNXW3svXH0nQu7jqMoGA1jTQrS+kr06kKt5sRHNpl70w/yHot10ibTIbP+ywhwTqaQRpVr3sCTMXpbC/dz8fPgNPfbVO6Ptn3/0QyjUXJJ1Uq3DxRNjol2p1n+6DKw4eh1nEkI0kyB8NuTqjIpxyJMzKSRH5CYJhOXf+UbVM9P0d38rHtZRXvfiWNpWCjtf2yy1ZuNFvba/HTMKeOZOE5eYNlLcWaDmXMfY7hdLRa3A0/mT4S5OXyZH9uP/pz7j7QcRaAeDnYJ8J4stii8IB7fC1Wl4BwOwW5ezIKko8h/mu6eicHedQf/tjHooxEkcMXFM45/9r8q6qdGuwpTtaR+/kbN4glYrNEv6m2fUzneJbFunN07W5X3FEmVuIiSm4NQdzzQ4hZlp+oTfAG6YzUnZ1EEaiWs0iulidL52HPPDhnoz32i2wPatgrfWpN5DN3JInrGpsLea6hSGo2UYyJoy6Roo14AkazudOia3Tm5CFgeI0wEy4t+UcGS545xdfmswnSkn10euQBcHoNEIqJlrxjIiLPVgTqPpcFLVnH5kCv9hDmIftg4LPsHhX2eOYkUPM3U50lhKRExwOhgSLMRTdLDLGxjWcvAgtvJp9Zco/MZl7NUR7o+2AIs2gdE8B4xihgPJu0LJlHpyweACEBgJk4ZdE/Mkrx7Hmg6jOZyaJ7XF7imReBdR8ORha9o0KRV2sc2nLm0o9l87jkw7MPtt1cxLHsHxlvXADsN5cegDuUbPvjt1YZte07M8jSRB1owtLkr75yRgDFkNlTln29grMFbrRpSv25r1SbwDZRxpy5np7+BzctODg="
assets/navigation.js CHANGED
@@ -1 +1 @@
1
- window.navigationData = "eJytfVmT3MiR5n+h7aO04k223tg8pktid3PI2tHDmAwWREZlQYUEcgFkkdVr89/XAmccHu6fg3oirfI74kIgLnj89/97NNjvw6O/PjLdUJW1ffSnR+VtVR862zz663+vvz5+UtRte1eYW2sOxdfK9I/+9OhshttHf310aMvLyTZD/5dZo0jR//t2ONWP/vTormoOj/76+tnr1y8fv/6fP236T4velm1zKNruYLuivDUtb0ERRJdnRVmby8EWQ2cOtmMNIqyo/bxoz0PVNsWtPRyr5siKx2BR/UVhqqIfOjPY40Pxre3ubur2G+tBU0SnlwHta32x565qBtYqwxG9XjleY7/1YyFXzbHoq2Njar7qsyzR77Vj1tX/vVSHangobk13b/tBqqwsS/T7qThXje3LrjoPRd2Wpi5OpruzA5/BPE1yfPK4OJSmMPe2M8exZOZK4fyyJNrtn57fV3usmnyfce7af9lyKNp7291Xlmyvo0RBgIE+42iHYUqw6QZ7KMq2uamOl864Z4sxE5hAP9I/9IM9FaYrb6vBlsOls0gueSLQx9T1qbhpO1uafihsc6waW9TtsSoZU4YF9Dsr71ydbe2Y7WVw/zKODAvpfw73Vd92/fSMTy2/OJjBMI4MC+iFRsqNHcpb1yZKM/07/sH9xPiKXKBPauvanExRtqdzbV374wwpONAPrT3l0knf2K/F08dPX7I9xOyJ0IGeaeqli6Nt7PScFb1thspZFSdzPmf64SkRGF9MxZPi3PbVSK6rG1s+uA7Qfq8G6SmSmKLz0+KrKe8G2w/FqT1calvcdOZk0T4L44upeOZqrruY7mGqvtL0tuiHy+GhONvupu1OpimZRxsUENPxfMvNXTVMWXFDFMY5RxG9XqxE14Ttd1texmrs7Lntcm//2VTkiu4vl3bbD2awxWnsILgSpgmiz6uiru7t+qSe2gNnQqBFh9dFV/V3xck05midGqOfYEX1n4IxpBsen6o/psf8m6nv6NH67CZyJfenjwv7vbw1zdEWVTPY49zBTE8a0x8LRNH3SVGW34dNwxzMeeDymmOITk+L/uH0ta3RDidDEH2eFce67XvTMW8UDySPMcu6+ktnzeFEtueyrorpVyllZduU9jzkR6untmndc12cTWfq2tbb8046T3oFzwRGsX/Yri3s97Mth6nx2L40Zzq3i2eWBYxdT6a5mLFah66tuSa32uVIcu0d7KnNFLk5d+4d8pxydrRiAUh5mnEvJaGXktDBlg73Iiu0ACSheXj0JCu0AEChfNYWgCT0L9PwQgtAEjoZobAXgCTUlgNfRgtAFGLmXZMQO78KW6t79+a7CN7KcQsPBTz7d9aNpY2bBpJvmUU0RAIPedX0g6nrqWswzaHo7XA5cxY5DjAr/b+Xqryb5tLF8VLRI4/Fh4AD09Cy7caxruuP2JKKoMB8cxvVuWEQK56AgcnlPJrbJg1II2JowIzSzQ3bxs2LOnusxoFR5iW2+OU4yNTSns5tZ+qi6luv7bgV4D9PK8Dnzt67mRqfBJ0SMN/011gY4wgJTCFr82C7orP9uW366mtVV0PFtpssB5g1HuzZNgfblA9F1bgFsnHiO64icY4sEZgmuhe9/T64VbmzOUrthyYAs8CxOoHshEhgyne+fK2rsjBnNzy8sZ3NTGsXA5oBzO6C0XFxc2nK7BLO4pUlAZM8+jHFfGU2MAdcJ+HmXHFmIRKY/gUTUkE8RQMzvGkqKEgHOGD6drZdX/WDayzFZZC7ghwFmL+tUz6kskk8MHmbHrN6TJ/tWIcELMo/9xpgX97aE72PuBgQcNHixbYOADikaNHg5VaugEGKFg1ezQt7gHoEFaXnVRlAOUSKwj8VffXHuEAsS8dYSfzZ+kTK4glWFH+yLBdh+gRctHhalHXl2nDlVuydnpGe3ixHNHs2E7ll/cUkxoriz2fC0qY58Rgrir+YCWOT5pQDoCj7cka79syp+jhR9NVScmNL5mRDpCj8eoaf3easqTnlCCpK/zTj1wbMiSdgSf7546J385PSTkNdRjyGitJPVjy837pYCVTR+qkbqjXL4HmS4h5cmiDaPJs7E8giAYvyz4t7U1cHA+eCJIg2L9yq7le3cwFYJGBR/uW00wapx1hR/NW4ZXxov2EFRMBFi9fJnJ5zSNGiwU/BzhGb/ggqSb+gdl/d3HxrJowbwBYT8GRs9G5T5cAdElocCbho8XRJpTdA5zwovGjyrDg3dVGaurzUYrklYFH+ub9fyUkHQFF22wb1FsByJ9AWiyxJtHtZuG39aWy7NRnOi2aIRq+KG9MPf75pu2+mcy3lBNRKliTavQ6mrZxHiBSF5/kwXjckQbJ5+bgoO9PfFp0t3RuUG1wmWFH8idvHq//s6tFtqFVD2/GFlGGIRk/Hndru3tTFcNu1gzuXxPqQBNHm2TIVyW3FL/IBUJR9vqDhys5RRCtvduwm4qarevbJoAmizcsledOhCq5fT7Ci+Cvk0MKinoBF+XmefO7amypzUGARj6Ci9E8THnrDpmBJ/tXj7TzT0Jnyjn8GKLho8WQ7JjO+7k1j6oehKrliypNEu6fbmGySwN4dLE80feYfeypOduiE/JEE0eb5OFCrelcQ4OghyxHNXhTznHJqrO6EW99DrYRnisYvi1trhpM5Y02FgIsWr+TzL4v8K93Jl1evlxkN7EAzRKOf/NmZO3JysgO/VpujSFavH7txlXsUIRsKLlo8Kcqu7fs/l5fpSPa4c9uxy2NZjmj21M0Lp0Pu0p5TghXFnxW269quuDXNQRhTJFhR/HmwbyCtsVBw0eKFO0TtuqVDMbRn/uFLwaL8y6K89EN7Ik/McVYsUbR9tbD9AnEzE9sc2ByyRNH29cKOXsysZZYk2v1UnC71UP15PrM3j8P4vag8SbL76XFhqj+f22+2cxNs6uQl4wuwxQT4C/HgRn+WI5o9HT8kKMq2rueVveWzBs4uzxINn42fbGCPRwoW5Z/74/QDOMdmWKLhCzcGqBrXl973xXKcunPPMtdAWR5wmqvNdGFtpreiz32Vten7zJmwN2PF/mx6uiW0buTl6MUGlAprQr5dV5G/TOuLkH7CQs06q7NZ8ZjBp679Tq8WxNIjEhP9Mq6Ca9IdMDCT/1r7YI1RwpLMfp5Xyt62p5NpDpgXTUKtProF8k9ddW8GsPIZps50PGmzx9Mnopa/zpM7nV/EQs0+jxNInVXAQY3+z1BlVsBTgxErCnfW3LkDHdqeJ0+ELf9jnAUp7QISbKVsDRkabKdqDyQJtoJaRACWpds7273Jfx8QKHtYTBh4a25ASfKtKW8tUgQbUJQcd8CnDl0S9aCY7HvuCEUs/B48QzGhP2QPUMS6H5ATFBP0c+74RKz5GTg/MSG/5A9PxKJfoNMTb9v6clK/sTMs2cwt2ejNSBZg1g+mgXr9ACsKdy3Ucaw4SfDd5XTGegwPKYku7V/7asrycEN0YEwwUBPNOJbkoEZIRQdYVFj7FGR5kuHYYWlbAU0CrdD6j+GQvKbmUwJkoa0amiRZ/WKNcpxNMBATzXgqwSMGyDOy4kTB6nhr++HTuBeiLB+GqrJVlViWqLKEyjAhSBZX8x48oh5gJeGP1b1VzbtTAmKhn29nWLiZYp5NkxArXbsmGIiJphUneMQAaVUrThRsj9gYaAMCkkfbgQXgY2Xh9u5yhrK/ISXRpYaxUojQqPiHqrbAHDKGw/JtfYAmqSkBtUBKPcCiwv/oqgGduZMc2ej7u858czzd858nKiw1vUGOprDDqimEi/L21HYPYA35WEx4WfrTGEQczMj1iRoTDy8Z/NYO1U1VjuNQzIJgaEx0hcYwNaa/2PqMduxZnsYQr7EMSzL7NB0B0k7TcjTQTrOGTFFAG11vR5NAK00vR1FAG6R386GiLB9HzFfFA4Z5UGUNZIkKS1VNZGiAnTtkAow3PCQquiz7X41Lg0geSJrWDmpaFAc0eusOT1ldpkKOykiRHY8AWixTVl1uYpbSTJEj1ZR65nxsj7rseATcQpGJBQ2K/2pNf+mUDSwi6awUefEZsIkbgmmz43NURqrMrATQwh+c6HJEMXeYKnKX0EC7+bWry15E0lkpMqUcEzjKZ1vaZtBlJ+SojBSZ8QioRdXfKXPiMRQmmlwscFD+y/yNpC4fMUtppshPQEFtbN+ru4SIpLPSZMhjoCbjN6bK7AQclZEmMxsBtXAfGyuz4lM0NpqMrHjYoO3MUZ2TgKSzUuVmY8Am07lebYZCltJMlSWPItrM36lJ0jMMlftS/YHVQowXDbqqtL/aAdwHjuGS/PRmwxZ8AiwmrFszIzmYEb5sleBlgxt3Qh+pXR8qy7rpP5pmD4sJAysFGxCTxEpgRWKimr0IgiGaVP2ddqmR5CBGmkXGBI8Y6Ba3CAZiolnOSvCIgeZcS4JHDKCGig6GHVB7TIbkSEbLcFZXyRkWaqapbJKDGiF1ohrQz4NlrOcIwaC07uVFk0Ar/PWVEkSL8XSsthPMsDAzTUdIMDATTTdCMDAT7ZOfYYlmbo4BNgAPCskqmzFBgWwUTTiCy/LjlAUV98GgtLaIKBJopSmmmCBbTBMh9bOe4+GG6EFYgoGaKN+LNAs1U70XKQ5qpOrFKA5qBL2ANTPpBazuInM80fChKZWNIGUgJqrKj/GIAVQXC04WdOEnMMkVKYleVyfFqkOElsT/MQZpUh2qpSiYjf5gbZanMVQcrs3RMDvdE0FyMCPNU0EwMBNNd0gwMBPkWfGQmKi2G8ywaDM/bsESrz13b9Lh4H/Onk3FIlNEBCm35nAIPzOCHEIK4OF90AIZeHhAfVtWgMQ3OKDtzzUgdZ+A6AejAMwhoAAe/qMFOfgESd/dgmqnIzD5p3AV99Gi8q0t73BlDy0qt6dTNX7CO74PluixgAlNBP3GS5ftz5d8dIzYaGVgDuvBKtRgJWD6b93WT60ur4gGetVtbz/ZJhs9lTLyOKBLZ11FjrubsIvHUbkM7flj2yNtmWBpnK7NnZ2+ttJ5bTzMbT4WosmUR1F7vG17OEMRTeWlK7qAtMNnR642IuY3tdXxZBLc9/gczOW6M5ULb+daLOric/QumqKLeTo392RonRxH77InTwtPdPN6rnHdDjCKKZLHwX3qf3Rby03/jVkWWx0iAqL/3oVTxJRHKKL5t1y840Tyb0CgY4f7bMu2A16SGxZRvTZfM5cJJKIjFNJ0/8Uk7XexlY1H4ofx7IIs6oEx3f+8mGaoBqAfC/GS+tEOuplWRED0j8fOHs1gD9edyd0+mXhEJMRnGjaCNRARAP1lrfx6CcMPmSQsxAkf0PpoQBmeV2xYRHUcgMLlvsER7TF2DZjiCQupuiA1oKiDYpoD1KNsWED1HfS+moGInr0xl1pVrCFF4wEXcsAAHLSrNwkF8FCt3oR4QP2ju5RmQKdgEQHQ977WfVdNpxc/NTU2zGLpu70/2c6dWjNMRDA5BZsIko6quQy2/1I1pfWLb5r2AWMUWQNJRe5yjMQKuBzjaIff7HdVP+7hAfXfO/eFf9vmQ6H52isaUJ5XKBRNPmAgDvPB1HGlys41hzlRTIXj2/bSDOMX/ztMY7LCdw00sMM24ipc39/c2LGg8Hc+TdV4unsLlTmcOUqXh9/vbVcbYDKfIWr8+qE6mWFXW424Ctc5MpHXw2peDaLKj6ZE+aIAtfSp+oFC2V0SP5z9H83zuMamm4DwEnvTsGfUggj9G9LzgzWUl9ubtj3dByWw11//Hkjpe73dxLofzEnXX9MSijRcNfe2H+xB3TZ94i6/S+aGL9nwIl/35fE+2nvLHDGgrCaKwsOPlbSjDaf0fd57+pgfeu/9W154/4Y3nS+hfoZj8j7ffc8vJaDwn3eU9oz0QqreU9fCF5LGZ0dj1rfgrcVpjWaawusfpnK3ouzpIUIq4PnZfNNMrjc4om1P01Uvrqx/Nn0FeiQ0xEtxOiiAI9qXxt1IetXctJj4hgfU1xMTipWCiIO4TN+gvDMDVkAeHlHXbDaGeEhdczorIiD6ytNZCUXjMZjhgj0HIQXxGC/9wrRHKKCpe11p3k3X7WDGXnjcH8FWJyMO6jJ3wVqjgKb0+sXWeidHAnx0J/0igqR/a/rfWuXaZcqBXNQ9H8UCnMYtVXi7KiJI+vV4j+C0kPoJOsUWM7QOv3PxHLIuvwPxHGbOzWC79w3QfEO8Tl2VC4+DuSzb0J+69thZ5OAazQPd7I37NmowHdC+EoraQ1N0EQ30Whaz3tybqsaOouSYex1VmSTZmPNbd6IYNRrBCl1NJlYCpv+ubdbPGVELn6N30WQm5uFu7ttJjYvD69S1+Vg4uMv0vtV4TAytgzYnGwtzAk/geWBQ9zty8HbDYqrBGicqH5B2+GiqICFifleHWjWyWPA6dU1GfA7m4q1foSYeRe2hyUxEw7y8g+fqdyTF3e+qyWqOr3Kfmu/eXEfsH3HekXNCAUwBEAI7tsRjYU8E9kK+SBy5k29DakpqwWPqy2Ts/T20MkqQdvhospMQdX6aftfn6F32ZErXB6OzbB+tUdaORkPWHidVmSVMjaOufW8UtYc+S9qWPZI0o+yNoXXQZ0Y31tZ98ZRy9C76HG08jZveR+GwxnNxXxfBLgFrj5MqTwkTdHxoStjjoSlxVVXqZzymvsUTQPU3Buagm49q5qJrjI9zbZG9H4qlcdLUgna2O+G1K4YhC3HSHuZPOYiL6jh/RED0p/j+mPSERVQ127ghHlHXbSTGDMhBuZWYchAX3QZQzJAc2nvbddXB6j6Uo1iok/aJoHmom+rJIEioj6YtpxzURdemKRbspGzbNA9107VxiiU5ddYc0F5sw8qqp/be4robWlS+NFfNr215B29lxgzJobemK2/RtPtoWRn/BK+Hv2zs8S8be/TLxt4O022rkOYEBTRV52961fmbXnn+pledv+lvLwO2bLsgRcWhPS99AqDqoSXl+2lcDJTBgpQUv5lq+NB2n605AGn10bJyd4JP3nlgUdeFWkcfYQ9M6/pBzCp3X9iNGQfgVBSzJGCSMMFc9YoMU8pqhubfzbTf3FeBEjKuxrmOtjMlnOmAJNrMxyA0JhFFtFhjUeGVF1G0FtrqYuiS9bL65zq+qh+qsnffoOaXRDfXDFM03E5fKCqNYIlGyQkIZbHyArA93GoihtJgb+Z2NJmNitdfzIFN+GVmwgFaZF7RO9p9hipZRsHg4GZB8naZKZuIqCEmwotKh2c3IelttBllBUT7cWCOth4PLQp31VCVph5PkWizlOPKpvOXzJDJjEVEfxnHaqDqBJZk3fkdRR/kwyXpX6wZTuas7x1oomjnH4NRZInkqczQ7jUlqWx2FCRDl6yvphU3wGVGgoJvTV1/NeVdfnqSKK8U0OKT6cxJoT/hQXFh6SgRxxaNFrA0f03lwTnsVWY+8rn9hprRbMy4Gh7QHjEkyPJhiDN2JcQ3SWmyVTRHQMsupYlWP1cHNCczVJYUoxH4omjcgatoEAyWScrCjeCC8QmAfMttZga6LbCRefXWi1aN90gpCzByaLRUNrQs7EXFVuQgYclGSyNgryr0PXyCKD8fK1WMCWKKaPHucjpL6+eevAeHpMX7ViNt9KbVq/d8OExP9j0UCPNq2TuDJGcsLKoaOyQk2AZv6yEDNsDHELqtyKv33215GYdMeFuMOaLJBzZqp6f8AQnUOaFUNRsyMAO8Tj04Jo3XpmK392qeBIHv0w0tCn9s8/tanuLHVtzTchh4VLdgEVFumyyUBHbJrpYrblzH+PvZtXSoHRA02OradEcLPX0hQzYYN1U0r4OQARgMt+1B0X0EBFG+uWn3LMWQPNHMB+M1krJURvyNQhkf6HKhqzVMJDrWCwii/CfT9fZNd1SM9SIKbvHZ9pcaqo6Igli4TzJAaQdFJdFS9+Co9HTThGL+RPFQs2WlS28XMWVD2/VVz19A7rtscFh6meNpusQcFzWdJjc7HEMianfldO5NvcMwpqKWH9vjDjePhRr9ak1/6faUZcTEDbUvUJKI2vmd/A5Tio5az8/sDteIiRp+ti7YyA6/kAjbVf3dHjOPhlotq5477GIqbDkd1NrjGDJhw/Hs1h6/gAjbuUNie9x8Hm423p+8yy5g4obTqvwux5AqW84x2uZQeh/N4YBNn0gibPel+sO+uf6sGCtSRJXdh+q7PWwBGvdZkyKqZPzd1vXDPnOPKluOF8DqFndjDmgyPcLoWDCkiBZT7w5Pizw4IO1ulVXO6xMSaIPPIH28LM59nu2LAp9mj6D5AODc6lDpkAUZqdbsAgIm7/YR3MQPll8IuLym2UQcyATvJTY0JPzZ/suO+7/4RJqgQVb48ib+lckE1fQ6AQGSB75/jPTx7x8j+IcdFh+0Jp/MQ92afPi0rNNMlO0umm2DDY0Ii4FOQ2U0zumC/YxuOfl4UTwKCbicgQBbbJ6tNZ4OEe6zXbla0312kJF+aqOd08x5d2cS0XwEDNDg3QA16BUMyi6rNip5jwTaqEoGK5Q/uLgmgeYfQDSTGfbW1OWlNsM8Vn9z/Rm3SLn7TNElzCx5n200WdmdgkhnX2LGycvuJIxs3BgfWUYU0GJHW9I2oR+swh+puV0Vpq+nabCnKsSVorLQPX4bR2Wyu6ZIuspaWVMeSbbRLrTpVthGND7N8eCA9Lj2tr5/4EZA8NRm07ipZuJ6M44rWW/LxxLnPKFw4gnt97Nt9hlOTLXhOmDc47mSUVt42cnHA+L4MW34gPYam0j18otJsM2n5qPG4FPzEZbG1yRCBmyAL0nogkSs8OuqvJvSNK2Laaxi7g5TZeeTpe+xVnRANHeH6RX2VVOGucNQ0+vR3B2myp4vS99hPd/fs894Jou2152pajc6Gdqz6nQJSYTtrs2d3WUXEEW7ObiYpnOOKKDFVOgKg5kAyuN9pybozQJWvwEoHmC2xq3Ah54JSbJxQSP139wRLMnICxWt+EaBYCmM0G8WY4rCQl92ebJoa/veHC1s5MFl6aGrSpcepJl5aEl4PJ05fS2D13pKwmzcq1lt45MgG/du1Lr4HMjEhcEE54IBHhYf8608oZwnw7auIPa6xlzJdD7ihfYCPhyUDqLBK7MlSSiSAMdMSDhqk/2Z1AdMCMjw80awQKMowv2+rDIiqmRo69Rn7TD6kczurll1GAOSB5rp39Q0UbTb7i7Q5CxlKYx25C1LFm3ncL1LWCdNJjNU1HKJfaw2DImS3XgKBjfx4Yg0+j5asYjoeuhF+SBnuYipvtkRLMloXRJAyy0koPIjWFHrJA81U36pTdFQK30dZZiiIX9FhqcP3Y4xof7XE1iweAJKPsUln2KS61qk8uFj2KDxuBi5zzWhgpbjyx6cmsQUzMId6lVUvIOjla9+ylMWZuQOdql9fBJus6v6YyJmNy0L7zJMqZjl2pvvciXZovG8UAe/cHw8Kr6jX6aZouFDU8I5WbCI6I4cpCzJyK3Qo6lfsaJoshaPqCckvY2yDfMCqP22BaCw3Eh6m525pAUk+/kIsAUP0ftwULpqmz2f8zNsyTi840XxGqGJqJ3aRiOv7y1IHmrWntX58Um0jR/Re3g4c8G82+Y3LoCMYxcbTsoV27gnLaA9Y8HFRjlVWLEpVtgWk1s6xD87kCTQa402p/GKSZjXWhQKq5iDOS0BuRRGEQXz8VZIFVYpS+U2rdnp/QIe6DhH6B2j9SoMU5rKz41w9XYeC3NbhrTrtFHhmePqnJUZJWg6P+UzQdBAv21irLFLWBo3bVnGJI3X3OLUdiEPc/SHrgpDgqbzc4PIHX4eTfS7lHd2kN/uG05SHMNhfqhq+2G+W4QXTuCw/t/tgzySiNGyuvjx9qyLfrC9RJCZvvVBVBesqDwGVRfuPZp0PSSmKhUrdi3TDGOWv3w1edlr0csvegZ64oLnovcM03uG6j3H9J6jei8wvReo3ktM7yWq9wrTe4Xqvcb0XqN6P2F6P6F6Uucw68l9w6z3FdP7Kuu5BQfojRFARd1uC+kuyHpISfVd1Z/NUN7yigsKVZM6mwUn9zbvuvb8oeqYe8wnwQUG64lJXIByGqcYv1dCZS8oWe1ykpQuJ1FljoArjyp8pKQ6RmLFXqMBFNKVk7rCRD1o2IOOdhac1GQWnNxiVkXhJboqim/R/7BTjCcmpsKouOFExbr96nba5JGNjxQPIS8nNT62x6r81E3XI9juvmI+sxtdOKboKp90nzzwg+3uwLI+DxmW6LZ8pS6OiX0kqopPFCiGxgWaLhAE0WOKriTcvTKp+1BRl/wmWzAgOaCTwkClK3y+4OvC33yF3xhK2hEc0J/2JpenXvg2YnGhSLDX9vEO6LMRgI8v3I6AvsfI8iTHv9sHoSE5BKIivfccRn7nfWyPcvc1g+TPJabw3/KQwUfKnyyMsVHlVHpAWdPFP0UkF5ysOH6E8bllPv6bJVcgqHndtrWbOEC6C1jS9rcp5XKI0Rp1fhswkYd2/36TBuO/yWPx7SMHaQNxVEzg4HFkuXAVIbaXvRl7LxWpj1QcMJ6++Lme9jw5eYoi+jT1NF8XtBeYeDR1jK4oF/CGkxVdsEO5/9pwsmI/uItqG3Pub1uhjUVg5GgukPsZhaj9as6y2K/mjGgBpTijVOeeZckVKupO8dOAItyA6HFcWdRHiqrWdOXtFzu4b5eF8UOIlZXHYGRAcjegrInNer/As97tAKiguOLQY5XIokmIxZT9Vxq06pilgccnXUFeX87S8CNGy+pu9iE/yxtOPhhpBuTxWGCy3jiHQRRXIKgpLR6uMPQw6DS/lV+vKR51mEMkWtNLXSXFgF3G0IIak40AewBDhRCLK7vlJGzYR3NQJ6RRbkhUFXgaPaTmoPJFercEWOTwMNziA6x4FhVZU7rGVpNmmDSdnmHyjHoGvh3afOB6X9EBQU1kvehac1Pv9e51X46pdJ1CsO8w9Ymyp3hj7GyBXhZ7PZ0sAep5A4qa/n2XgHIMF/XFGy0nXfQyy2vwEshQFWyb8V2OWBPJsEQ3/iLISRu6A/IauUfR0wNLY9fORo6lcFM8nTRJ9mqPQFOfUaLasrTIfrk2SfpQlS6Q3Bgu62N3Oc3qqvubIjiS+oQgeiQ3AAI2JEd0ki7Fm7TB+/CukWvdZkX8RjcfC5RDhIbV4zvfFFYUFfUNb37DTVMe6hhf/YZ7UkzU1bsCDjeMSKhXdAMc7kcQcU9lt5DloY7UFXC4b46NukdXweHGBBH1DK+Dwy1THuzo3Qmn8ItYqFt8JRzuSDFh1/AKBYVpSoQ9g6vhFJYJD3b0g1crDGMa7hfcD6dxTIi4Z3hDnMY0ZYqu3oVcgFOEBtTdthAwlNiACk0owT5Y1uau65oVgZu6RpC4fuJAwOoJcEvTpgfOnean/s3BnAfmOsFJNwSj2or2u6cPEm4jmYWhi0hmmFhfEwyoMfws07XmLNP12I+BdeZBMV1Nfan7Uz/+OmQQwgF9IWT7ootFa1+BcpuYgUirwMKbh7pgy9h5aivPUzkqVkRyNNAPKjtNZOMJO53Y4GV9JKYq70psOFrxn8GH9/a7OU3bmdS394+fFMdpi7voB9MNdCDyWaNI0VKeHj8tbsbvDL7OS86sfAwW1Z8Vl+ZgO9enHMZUjYNEcvdlNclwRK/nRV3d22LozCHzDlktQqio/KLo3Ev9ZBpztKdM8JZVPEGL+i8LUxXteahO1R/ZcByrfoIW9V8VdX2CCiZA5lqvd6ry469kXbq/S6lqh9vxfUe1+qV9/aWz5kA/biN9bYjFBJQ8v447FLLqCAM17bzaL6ouQFDXtVBRc2zGmJ7fYkRdHwzqn6vGDr2oPMFYTb+FnU15Z462zzSUm65tuFay0IsRCObk2JnzLSI6AkHRU9scW0R0BKJ1WtfmZBDVCfnvqspVFqjNTbavDvauKu8Q4QULS4/vCEx5hOItcBpBZRpgWZu+t2QnOBOLGSJl4Wb+ooXVWkGS2hoMiJXbUHI5uKGNJ3Zq3aJW/5fxzyH7KRdGKFw1mMtmVtkQoeCTp37WlktZ11h4cTCwLVeeLsGIUv3ipWxCx8xCDfMxswjzTFBV2osJpRpKm8OBPmOxtqxZNgKGmi+fh5K57XFClNscj2XJHWZCM7u/HAtSiy6EXm7JJZajVwQIwfx6QCKZmU5SosxkMpal51mEaH6WFUi+uRls9745IO0zgrKts66OzXWbHldNUhoCuZSuUbLkbiKCso9ohEU7BobG2f2czM7uTVe5gPyL8s/klOzZU0IkG7ouSW6GwabU3rij/W72CTQOAs2Jf7XHKr3vPG4cPoppGSPsuvKHC6SSgzAyxIGrpG7os1Zh5SwY4b6GtAhZIltVC1N8MiKkQlSbCeVjsdHkphZjIeHwZOuoFOulR1qfPv7p1ZMXZO1GsV/zqSQCv2aSqHicMxTexs2FubbtfmcbthBNMSxUIIoiVbxCFEXCg4+emPPghq8bghu+SlEY06Ty0RdzKc1GX0wN2KiLOf3tUivAIQFrPMgAdjmPbNw61oMMW5exyEaryzlw8SlTDykupeCSiUuZ9WHiUWaduHiUhJEUh1LwAetGij+Zc5HjT6ZeWNxJyRHMmBhvUvIBewExzmTOh42NmPqIMRElHzImYt4nGwsx9RljBebfdePPzKuudL/P11XmB5U+ihlXTm0LX+Qg8dybnSSA4zWRKxgnERb96stFVqTqi46smKrRM8VUsRxvaRSr0ENxVTh2eXP3J9ZfAmbLMEGjNccSWUsy2GRQ1Nkgk0TVjVhpxOqhuKSVY0aSVTemAmkCU5czYx01itorUhQlZpC0ZmYeSUhGz6ckHMFlea8RidoeVhburKuP6OqljLCHRYWH9uwGVqD0jAbFx/fMOJrC5De8aOCNCSVtD6qRfdv2YrIjOCqPlUkA1kkr0r4RuG6bjqEZ9nTZ2JnEO2UEex++i52HjxXLwh9PScI+ViWMlHGMhw3ck4CKO6xKWJPyBc82jvGEHLMSuyC4gaLXdY3H7pgExlAubV01VKWpmetd0jdsjsMOBbqWWe50vzKZp0PJBk9XNoQsMY7o2uZ9M3QPbB5njJSnX8YhnaA0gTipd21D3HKTiPkwVu5yOudL2/3KlPbhcjq/OdpmeNP03/yFvLihRUCmmTnk2Fx4sREiyPwtiKxAqfwtCaXw8vmfpoU3p2HPnS2NOxYXKX+2ZdsxA58NIyTx2hU2rzNCJBl2y2JBMCL2VA2D7bJb8MvvocRzei/erCusXy5fXRihfPtadRMO0+rMvOmnUA8ZjPZy5stfF8F9GDbnue1TKawSEuewrs3j+hGF6wXaxq6bebABwRI83KfROn2PIWjPW9Mq9YDD6Fv3dsClfTin6nrA9xMJUfXgnOr3alCIbmhG87Y63tp+mIbHeDlQNMalmvcZcIOIwWifzPd3nfnmvkXH5VMS43Depj+4Q0qSHbS1QNE4ly2mId6MUhLnEN2LrrChmYDX9KTrnQIe4+POdONV4qEZzd6/cxsXp2iAi+7JI1icx+1lcE8RXv4Rg9Me5z76tkTyRB+tPqyrrOOEJDq4N6k29R5H1J+WI7RZCFicRxCATOFC8Tifh6acVyMVJglJcNBJy5r36+WruHLCYfS/BRet4h4kT/TBW+k3sHf+tt54qk27x0n0/ePP6TUr/ooFfb1KulqRxqWKk0eHpHoWiggBo1JNIFZUYDG+64dPXSAbT1o9EDNvnVD/eTFjEUlqC44RzFwD41cHc/1LWidHy0zMj5abkx/tgJ2mjoCC5PHY2aNb1LjuzIHbhyTAgvS0KyVUbATkJZcXrDsmeRMGFyN0E7QgLm+N+SheTNzW3TCC0LilJZbhBhPk4vv2KC3qur1UKNybJXXSzVlChj9gu2F4oXfsyvYMECTsjbnUUBGFUFBWLLAAyYu+v7mx0xqZq3O3sMQqp3BBHvzIIoHystBHFiGOF/xoxvUiYQ83AvKSv27z9HfVFKBgjJ7P7eywtD12n2znwqSYI9+mJbJgXTWXwfZfqqa0fvlMW8bMerbMFYzbg5Cv9iCk/Tf7HepjPRwvOB63/Llt71i5FcWLLeN3uV0GSEG07SvHnk4szxXAi1MMzORte2nGObPGJyZhVksL1jhFHMwo7AQhn5AC2jRDV4H5mLG48MPv97arDbP5niGAFv1Qncygal0RBzP6ZVrN9TowpJMV2T9gDna5oIYqITuyvie/uzP5Azkb14mxkTVP3WGreX0jAj+WhJ1Fn5fZkRzNY00Rd1jifW1K22Hn5nr9YE5YB0lTMdur5t72gzuPDDYtn6C1uDRaj0t8KChnMl5nhTWJCYrJeh2jptWlNLWd5nHf+wb5oVfHj70zfDb8bMUktZXuuaKImOV8dlIzygkpKhusTS5gUFrR/FRtbmsrqPYMx+T/YSoXzEvzsIYUwcY1uy+l4c43BTBe7rP5hkz/NpggZ0+masbPFMaY4ZUgm8AFeSAWRAAT5Ka7066am5bX23C84HoaH5ixRlhBmLoKjRLN3YSWCCLnWEOc9kTfyEaCbURAIeFgsI0ECspGNw1xssRFQ4nsw+lrK7SDEcLLYG8N8BVx3Q6mHte5+aUpD4cItv0Ai67YHW1qVJh7ZNQwgP+g5y+2xh0dmC88LMpLBGQk/6Nuv7oSzn/x5SOkfbZb0//WgqtwKZZJ5giGu0sKzYuPG2vipkgEZCR/sYbZn3a/Mjuz7ueTOeNBH2gCd948mIExCfVhXIp9HHAsnsTD6ZUCbKRgWFpR5gyNs7uid5MT/av8ZjIhSEQi+9x+k+RpFm8W7kWHIwzCJYWz8j9XB0lyhvAyYawZoShStCAehkuhBNOAKZEI9YF0KpT9TDoSS3Pp9+BXuXwl/fcSJQR4hGMom0D3AUvSu6aSHkyUS6+XovXom6Uiwdy+ayrJbbtGouSua6qY3XSN5OZOXmjLG4oV+9geOZWPbfyqT+jSB1krRhI68s/ShGBFlgvKXHX/fh7CAJupIgHn5TPXmRHKzF1mkWhz02o+4SPxrEFyIRmnnoD5tMfnsuJhA30sKxgxLJB8iAgfIfVb1Yz9Mtjzr8x0LMQx47fKWzS+bsX1HxLOyF+tG9rSGyAAsrUSfLoNvPUoPGKwDNpwi4jBm1B32BHKuQvsMnLxHXGIdsxBjMJ74QCXkIBYxNfAASYxBbHxLn8DHDw0Ih7d9AYYRAzMBO23SQJiQV3jBhhRNMQuurwNcIoYiEl4XRvgERIgC++GNsTAgyPy8XVsgEVMgWzCy48Ql5ABmQRXriEeAQGy8C8FQhx8PGYQ3KkGWQQMzCS8Qw1yCSm8zbz58qX6w765/vzJdObEjqlIAmzxofpuD9sepc6OJMPWf7d1/aAz9Ci8zXhzUHzjfTDq8yHidHUCY3PpGAskdHqWpEFOCGVlvVv4OEkPJsi5O/LAaU8C5qWr/m6O0TrXM6udoEXxMVLom+7Ip9kHipLyXDu300eJIXUfAEXJ/1q/1pI0N6RC9INC9oNGOAmTJKnTQZMiC2ozlRDO7aXScp/DL6+yep/T768iwWj7YAqfJjSHHEdjpLMQxfEximZwMpm/G9iqW0GA1DrZRyQ9MCAtFShWjuOG81tTl5faDMnrOHiDkVjxVUay3lx/5tNOc/RZiUYMatOIr0/AOIJQ244swAyoL1U1KWpHUyk762JvFahKXlfg8auYKHDyPZwr8AkMFfgKhZOpLnCSBtuBBe6BeWl0+obP2+bpF9F/hvUYweS69G6H5VO64YSETjO4T81HXm+FQXKfbX+p2Z2qEAmJyqNT7gBSRvS6Ku/i1EZ1FAOBWoop09AeSXrMUWZiDbau81ppWrvoPBDkRRwKEo2u+JCDGYbSxH1eqs3NxFEaETGHEa9M7GHRbj7uqjObSaxVGMwU2M8gCZDFFHVUYREQWIvpoNeUa7ZXDYCApNxh5c+Y0YJw90rhOYO6+prfjayrr8xGZF31g22262jym3wxktnfi6G/N9wHAxRaFp+DKYqyMw4WhNLqYUXhJR7EpzkclyQe42WDLQijqL1BNbJImURwWT651Et0SBg7TKCskCzRbFypk7RHECaFJHUFipLvvEiXkqqPVQkjSY7xkMHHYACWF/6YDLoYQTS1CxYSnvpuRHZCKkTR9G5oUVwIcuyBZKnvXAj8DSMKZQ7n0orMEV1JGinOhCBaLAcDJeUFBwsiyfWxorD3uZyk60E1skiSI7go753bgd8cFGeXEZKhHA81nNqaNm8Ra6eZIn8EUzbdQqyKLhtUlHW7L5Kew0BCSBEsOFHwix/HVFINwDppJNEJAbZAujMfqxLWJB3u2qQvZHwUKIaOnUK0UhwqjIQBmmCNcINqZPGEK5rfGr8VU4bGfhsUTzI8/sMuwEmxKmE83RseNMClMdEgcK0oHKCV4lDKE4Zs8tCUouxDU0JCUBpnnChIHaagJXOHKQhRbO4Czlv+EQTOxUQXNCiOlKhiMjRB0XWaEC2Io5ENU6wgDMU2jICC5HQOmFebMIIQEn8gxAmC2AfyMVISBT+RT7GCMPatcoxkRMNXYbzOm77+goXe8RYS+PNOAs0tQAffUyUJi7+mCtPVHvMfwcw/Snt2H9v27sJcIDX9ziRi+SYqL7EgAJEPVW25S9RjXCgZXqW+Ytv6wF/NniIR3d+CaMZ+0fsIqfwX7D+6ig16HuLYoiSWJlK1zKJETgr4rJNAc+3eg0tfZcdQUBZ/ZPMk1mr6sCT/CHoAsRlEL46kwoiXxrNUIJ1p0UL0HIsRfHMw56B9Rk8QBWYfopHAFd3yO1ZyfP++YcQMOxCUWQ/IZ7TvzdGKLdCD8W1uxH1u61zfswHkkhuh121bu/sUWb0FJGsOt+0BvXqAQrM1NHRV6Z5QbrfaQ3ElSX8+G6cw/9FskDIfJj+DFBoUzz8xMUqqKR/PPz0xEkxq1ORzaaWafJLY8VvWccMOeBGlYK4dTGh3NAeW9sGitDsngyr7WFHYzXfHpIAfgudJmFWSB79GExhUo+OU/WwbbQ5iDpeB9t52XXWw2FUcFJqZVixwdI5K4wEDaK5KgAFpZKqZYgFhbMpJoRFxcOpJ4wEDbApKoRnxs+l6G366FCuuEEZm3kfKd9kzgOmpZ0T+feIBpGd5hkrDeB/GPbHULiDYQ0hU0DZedeV8qDVXQVifmZQHG4pvHgINiEd7mLosMWTYGq0jH60U35OpXTUFRz8j8YABPhWmCZzFefqO4V11c8P0ahuI6x4n1HU7D7G4LcMUKwv/l6kvzKq3j+J6X2orPpwiZrfgw8mhB0MqP0WzVb/BpynR9cM5M2kkoWKvv5EUzStLErKShnZJSpwO65KUeBChJZnqJ29SmsC9WcXAMXTK+aAxZDamT9LRPARoOQO5gDRk6rlgNGTSly8x0cRHeDn5+WA3ZAb4QDdkFj62RzT1G1ROOBk+h0xzNnQOmdx5NRJNcgiXk50NzEMmnQ3Kk0m+W3XDU++hkcTTAX8yac8H+yGT7o8G0AwQHDkbfFAhMjNyQCEyS/MwAc1NCJczkg1XROaBDVVEJn8Kk4GmPkDLic+FQSLTzoVAopPuAmagCd+wQLLJ0Ep0orNhlcgkL2fQ0GRHeDnp+bBNZPL5kE10FqYQB3AOAjiQgVywBTr9XLwFOvnjySM49T4aSHwm0BSddibIFJ109+0xnHIPDCSc/v6ZTnf+E+hMsscPkfGE+3Ak6ZnAWJnEM0GxMsmflsvw9Ad4JAO5oFuZHHABt6IsJGGHIkky0BCt4UJUMZn3UFyW54NOy14PMtfLUNhZ0sxZzoPBJiGBs+isOUhnnDYMM4eeXnv5kp1+Z8p0Ash7bSFOFMyvh26/SxPjCcnvqW0YNkk3NXtb/QxgJDp7au+tXGUbiq00FweMS477nc2QA3DT+A3BPZ0TKn8AZ/tdriuHlA7f+Cgue8HHFIlI8hlFQgaeWR/GPakOxzTm+VexeKr+TlrWXzFScj7bf9mx2YHrqlmOZIQvRxFotvtrL83BRQpg9m82DPMkdZfmqvm1nXaoLXdxSIzkHs8pQBlT6xtAqvhliJxvzguCadILJJ8iH4Em6SA1yBDI1WfwXQ/w8JF4xAC8GYGCI/J4g88wOJPemq68lV4hPoppo/PUhWlWE4BrVRNCfvVHQFmSaae5286IZjpB+de/B2KS1VumY+gt1xf0dnjb1pdTw/RUG0YSCq94InXSO55imfjCBkKGurEhloEuqOvRC+p68IK6/ocuqOtvLwP/rfCC4B4dLzJkbQ/gS5RhsT3LRBsjFumcEopswzx36+/iY7d9IYd0tClaTqaLJApr+2BMWlXMMQGxiO/eSAuavn0jV9hTBChVslOKnPD1da5yIlnsa265Se/LbXXjruLgr+ol4VxHU4+I9YqPkcbKp3Cucwi7r+R9k/Za4QvQ/Q68UX0YKiecpqaw3NxvxDM9xvKz2IYdUHhLLxApq8Ch8RjHZbEf2vOy4MU0EQ/Ftoxx7Y/L5Qhg8zgikPYRAGVJrh5XgFyTI1SqyxXEJisu9VSHKnFSZDpDmj91keLknM6f4U7hoa3pc8HwKSSs7l7hkPgGhLXH41H8WWIaizpwTWpDoGriXNPHse8y7y5fcKpGM1CTSyZoMXepMFEOwVfcycOQfL/9LCaLBbhg2Hw9NKWi4FI0L94P9sRl0v3OZPN6urTx7eCHg/KL3ANI5X3tXzzIKMYwUbcqxYW8FcOV1vXH9sika/5VTM7yOWO4FhxI+RBZLziTwSQwBYrayRV3jDyJlRyG9lNtKhdkgY0WE8CYN/7QTudD3YneICo+IegDGclr8gRekPP8vWppiXpYpiwjFKwaH6QDLCgK6hcefZPNUjzqFJ9Rk70oBurmnS6TjSIw6hEdA5N9CALuBXYRWTzqRJ2pkv1yLNQ1OgUlGxIE1Cs8tSRbpXjYyTtqBPhEaNQlPhEkO1EM2C08vwOYpQTYKzhvA1gleNjJPyEDGMVw3Cc4zII4JQTcKzx2gpilDPH9f1YtPZFwbjxwVi09kXBubJCENufGmAmYHWwmaHANkCcillsUdcBmA+uklbmhiayldx8c03YjlPh0UOc4IkH6GAehhXeGe3pBtFPS90b+TSOscAiTdO+nkGPM478gmEdygUxDTWYLMAIiku3p1IpBIim0dtNs0fhkm4N7lEHLAL7XM7orTXaNCLt9UTsp/OYWuU5zVzzD4nqZb6YaPrTd1IjyiQ9gTNpn3GdrDszyt49ixOK4fPHqDhWRL1jdCaPrAft/NIErP/jAJn5Qc0JOH/PRPZOPkDql+et2YrM2k8Tsvi2RSHxhj8TzDbM7iX2gB+IapTv8Jx2C8UCJ1D//55//H1YlGjQ="
 
1
+ window.navigationData = "eJytfVmT3MiR5n+h7aO04k223tg8pktid3PI2tHDmAwWREZlQYUEcgFkkdVr89/XAmccHu6fg3oirfI74kIgLnj89/97NNjvw6O/PjLdUJW1ffSnR+VtVR862zz663+vvz5+UtRte1eYW2sOxdfK9I/+9OhshttHf310aMvLyTZD/5dZo0jR//t2ONWP/vTormoOj/76+tnr1y8fv/6fP236T4velm1zKNruYLuivDUtb0ERRJdnRVmby8EWQ2cOtmMNIqyo/bxoz0PVNsWtPRyr5siKx2BR/UVhqqIfOjPY40Pxre3ubur2G+tBU0SnlwHta32x565qBtYqwxG9XjleY7/1YyFXzbHoq2Njar7qsyzR77Vj1tX/vVSHangobk13b/tBqqwsS/T7qThXje3LrjoPRd2Wpi5OpruzA5/BPE1yfPK4OJSmMPe2M8exZOZK4fyyJNrtn57fV3usmnyfce7af9lyKNp7291Xlmyvo0RBgIE+42iHYUqw6QZ7KMq2uamOl864Z4sxE5hAP9I/9IM9FaYrb6vBlsOls0gueSLQx9T1qbhpO1uafihsc6waW9TtsSoZU4YF9Dsr71ydbe2Y7WVw/zKODAvpfw73Vd92/fSMTy2/OJjBMI4MC+iFRsqNHcpb1yZKM/07/sH9xPiKXKBPauvanExRtqdzbV374wwpONAPrT3l0knf2K/F08dPX7I9xOyJ0IGeaeqli6Nt7PScFb1thspZFSdzPmf64SkRGF9MxZPi3PbVSK6rG1s+uA7Qfq8G6SmSmKLz0+KrKe8G2w/FqT1calvcdOZk0T4L44upeOZqrruY7mGqvtL0tuiHy+GhONvupu1OpimZRxsUENPxfMvNXTVMWXFDFMY5RxG9XqxE14Ttd1texmrs7Lntcm//2VTkiu4vl3bbD2awxWnsILgSpgmiz6uiru7t+qSe2gNnQqBFh9dFV/V3xck05midGqOfYEX1n4IxpBsen6o/psf8m6nv6NH67CZyJfenjwv7vbw1zdEWVTPY49zBTE8a0x8LRNH3SVGW34dNwxzMeeDymmOITk+L/uH0ta3RDidDEH2eFce67XvTMW8UDySPMcu6+ktnzeFEtueyrorpVyllZduU9jzkR6u31fG2bs2hKE1zqF2v1nbmSLtOWkWeJb6TnxSntmldP1KcTWfq2tZb/yJ4Mkxg1PyH7drCfj/bcpgaq+1Lc+bzmWUBY+WTaS5mbEZD19ZcE1/tciS5tRzsqc1UsTl37p31nHJ2tGIBSHmacS8loZeS0MGWDvciK7QAJKF5OPYkK7QAQKF81haAJPQv0/BCC0ASOhmhsBeAJNSWA19GC0AUYuZ5kxA7nwtbq3vX57sk3spxCw8FPPt31o3djZt2km+1RTREAg951fSDqeupazDNoejtcDlzFjkOMAv+v5eqvJvm7sXxUtEjncWHgAPT3rLtxrG164/YkoqgwPx2G0W6YRcrnoCByew8etwmKUgjYmjADNbNRdvGzcM6e6zGgVjmJbb45TjIVNaezm1n6qLqW6/tuBXnP08rzufO3ruZIZ8EnRIwv/XXdBjjCAlMWWvzYLuis/25bfrqa1VXQ8W2mywHmKUe7Nk2B9uUD0XVuAW5caI9rlpxjiwRmJa6F739PrhVwLM5Su2HJgCzzrE6geyESGCKeb58rauyMGc3HL2xnc1MoxcDmgHMJoPReHFzacrsktHilSUBk0r6McV8ZTYw51wn/eZccWYhEphuBhNgQTxFAzPKaeopSAc4YLp4tl1f9YNrLMVlkLuCHAWYL65TTKSySTwwWZwes3pMn+1YhwQsyj/3GmBf3toTvW+5GBBw0eLFtu4AOKRo0eDlVq6AQYoWDV7NC4mAegQVpedVIEA5RIrCPxV99ce4IC1Lx1hJ/Nn6RMriCVYUf7IsT2H6BFy0eFqUdeXacOV2CJyekZ7eLEc0ezYTuW2ExSTGiuLPZ8LSpjnxGCuKv5gJY5PmlAOgKPtyRrv2zKn6OFH01VJyY0vmZEOkKPx6hp/dZrCpOeUIKkr/NOPXBsyJJ2BJ/vnjonfzk9JOQ11GPIaK0k9WPLy/u1gJVNH6qRuqNcvgeZLiHlyaINo8mzsTyCIBi/LPi3tTVwcD54IkiDYv3CryV7dTAlgkYFH+5bSzB6nHWFH81bhFfWi/YQVEwEWL18mcnnNI0aLBT8FOFZv+CCpJv6B2e93cfGsmjBvAFhPwZGz0bhPnwB1KWhwJuGjxdEmlN0DnPCi8aPKsODd1UZq6vNRiuSVgUf65vz/KSQdAUXbbdvUWwHIn3haLLEm0e1m4YwTT2HZrMpwXzRCNXhU3ph/+fNN230znWsoJqJUsSbR7HUxbOY8QKQrP82G8bkiCZPPycVF2pr8tOlu6Nyg3uEywovgTt29Y/9nVo9tQq4a24wspwxCNno47w929qYvhtmsHdw6K9SEJos2zZSqS2/pf5AOgKPt8QcOVnaOIVt7s2E3ETVf17JNBE0Sbl0vypkMcXL+eYEXxV8ghiUU9AYvy8zz53LU3VeZgwiIeQUXpnyY89IZNwZL8q8fb+amhM+Ud/wxQcNHiyXYsZ3zdm8bUD0NVcsWUJ4l2T7cx2SSBvTtYnmj6zD9mVZzs0An5IwmizfNxoFb1riDA0UOWI5q9KOY55dRY3Ym6vodaCc8UjV8Wt9YMJ3PGmgoBFy1eyedtFvlXupM2r14vMxrYgWaIRj/5szN35ORkB36tNkeRrF4/duMq9yhCNhRctHhSlF3b938uL9MR8HHntmOXx7Ic0eypmxdOh+qlPacEK4o/K2zXtV1x604e8U9KghXFnwf7BtIaCwUXLV64Q9uuWzoUQ3vmH74ULMq/LMpLP7Qn8oQeZ8USRdtXC9svEDczsc2BzSFLFG1fL+zoxcxaZkmi3U/F6VIP1Z/nM4LzOIzfi8qTJLufHhem+vO5/WY7N8GmTnoyvgBbTIC/EA9u9Gc5otnT8cOFomzrel7ZWz6j4OzyLNHw2fiJCPZ4pGBR/rk/Tj+Ac2yGJRq+cGOAqnF96X1fLMe3O/cscw2U5QGnudpMF9Zmeiv63FdZm77PnAl7M1bsz6anW0LrRl6OXmxAqbAm5Nt1FfnLtL4I6Scs1KyzOpsVjxl86trv9GpBLD0iMdEv4yq4Jt0BAzP5r7UP1hglLMns53ml7G17OpnmgHnRJNTqo1sg/9RV92YAK59h6kzHkzZ7PH0iavnrPLnT+UUs1OzzOIHUWQUc1Oj/DFVmBTw1GLGicGfNnTvQoe158kTY8j/GWZDSLiDBVsrWkKHBdqr2QJJgK6hFBGBZur2z3Zv89wGBsofFhIG35gaUJN+a8tYiRbABRclxB3zq0CVRD4rJvueOUMTC78EzFBP6Q/YARaz7ATlBMUE/545PxJqfgfMTE/JL/vBELPoFOj3xtq0vJ/UbO8OSzdySjd6MZAFm/WAaqNcPsKJw10Idx4qTBN9dTmesx/CQkujS/rWvpiwPN0QHxgQDNdGMY0kOaoRUdIBFhbVPQZYnGY4dlrYV0CTQCq3/GA7Ja2o+JUAW2qqhSZLVL9Yox9kEAzHRjKcSPGKAPCMrThSsjre2Hz6NeyHK8mGoKltViWWJKkuoDBOCZHE178Ej6gFWEv5Y3VvVvDslIBb6+XaGhZsp5tk0CbHStWuCgZhoWnGCRwyQVrXiRMH2iI2BNiAgebQdWAA+VhZu7y5nKPsbUhJdahgrhQiNin+oagvMIWM4LN/WB2iSmhJQC6TUAywq/I+uGtCZO8mRjb6/68w3x9M9/3miwlLTG+RoCjusmkK4KG9PbfcA1pCPxYSXpT+NQcTBjFyfqDHx8JLBb+1Q3VTlOA7FLAiGxkRXaAxTY/qLrc9ox57laQzxGsuwJLNP0xEg7TQtRwPtNGvIFAW00fV2NAm00vRyFAW0QXo3HyrK8nHLfFU8QJkHVdZAlqiwVNVEhgbYuUMmwHjDQ6Kiy7L/1bg0iOSBpGntoKZFcUCjt2OIJ12mQo7KSJEdjwBaLFNWXW5iltJMkSPVlHrmfGyPuux4BNxCkYkFDYr/ak1/6ZQNLCLprBR58RmwiRuCabPjc1RGqsysBNDCH5zockQxd5gqcpfQQLv5tavLXkTSWSkypRwTOMpnW9pm0GUn5KiMFJnxCKhF1d8pc+IxFCaaXCxwUP7L/I2kLh8xS2mmyE9AQW1s36u7hIiks9JkyGOgJuM3psrsBByVkSYzGwG1cB8bK7PiUzQ2moyseNhgjCmqzUlA0lmpcrMxYJPpXK82QyFLaabKkkcRbebv1CTpGYbKfan+wGohxosGXVXaX+0A7gPHcEl+erNhCz4BFhPWrZmRHMwIX7ZK8LLBjTuhj9SuD5Vl3fQfTbOHxYSBlYINiEliJbAiMVHNXgTBEE2q/k671EhyECPNImOCRwx0i1sEAzHRLGcleMRAc64lwSMGUENFB8MOqD0mQ3Iko2U4q6vkDAs101Q2yUGNkDpRDejnwTLWc4RgUFr38qJJoBX++koJosV4OlbbCWZYmJmmIyQYmImmGyEYmIn2yc+wRDM3xwAbgAeFZJXNmKBANoomHMFl+XHKgor7YFBaW0QUCbTSFFNMkC2miZD6Wc/xcEP0ICzBQE2U70WahZqp3osUBzVS9WIUBzWCXsCamfQCVneROZ5o+NCUykaQMhATVeXHeMQAqosFJwu68BOY5IqURK+rk2LVIUJL4v8YgzSpDtVSFMxGf7A2y9MYKg7X5miYne6JIDmYkeapIBiYiaY7JBiYCfKseEhMVNsNZli0mR+3YInXnrs36XDwP2fPpmKRKSKClFtzOISfGUEOIQXw8D5ogQw8PKC+LStA4hsc0PbnGpC6T0D0g1EA5hBQAA//0YIcfIKk725dtdMRmPxTuIr7aFH51pZ3uLKHFpXb06kaP+Ed3wdL9FjAhCaCfuMlz/bnSz46Rmy0MjCH9WAVarASMP23buunVpdXRAO96ra3n2yTjZ5KGXkc0KWzriLH3U3YxeOoXIb2/LHtkbZMsDRO1+bOTl9b6bw2HuY2HwvRZMqjqD3etj2coYim8tIVXUDa4bMjVxsR85va6ngyCe57fA7mct2ZyoW3cy0WdfE5ehdN0cU8nZt7MrROjqN32ZOnhSe6eT3XuG4HGMUUyePgPvU/uq3lpv/GLIutDhEB0X/vwiliyiMU0fxbLt5xIvk3INCxw322ZdsBL8kNi6hem6+ZywQS0REKabr/YpL2u9jKxiPxw3h2QRb1wJjuf15MM1QD0I+FeEn9aAfdTCsiIPrHY2ePZrCH687kbp9MPCIS4jMNG8EaiAiA/rJWfr2E4YdMEhbihA9ofTSgDM8rNiyiOg5A4XLf4Ij2GLsGTPGEhVRdkBpQ1EExzQHqUTYsoPoOel/NQETP3phLrSrWkKLxgAs5YAAO2tWbhAJ4qFZvQjyg/tFdSjOgU7CIAOh7X+u+q6bTi5+aGhtmsfTd3p9s506tZe63B1OwiSDpqJrLYPsvVVNav/imaR8wRpE1kFTkLsdIrIDLMY52+M1+V/XjHh5Q/71zX/i3bT4Umq+9ogHleYVC0eQDBuIwH0wdV6rsXHOYE8VUOL5tL80wfvG/wzQmK3zXQAM7bCOuwvX9zY0dCwp/59NUjae7t1CZw5mjdHn4/d52tQEm8xmixq8fqpMZdrXViKtwnSMTeT2s5tUgqvxoSpQvClBLn6ofKJTdJfHD2f/RPI9rbLoJCC+xNw17Ri2I0L8hPT9YQ3m5vWnb031QAnv99e+BlL7X202s+8GcdP01LaFIw1Vzb/vBHtRt0yfu8rtkbviSDS/ydV8e76O9t8wRA8pqoig8/FhJO9pwSt/nvaeP+aH33r/lhfdveNP5EupnOCbv8933/FICCv95R2nPSC+k6j11LXwhaXx2NGZ9C95anNZopim8/mEqdyvKnh4ipAKen803zeR6gyPa9jRd9eLK+mfTV6BHQkO8FKeDAjiifWncjaRXzU2LiW94QH09MaFYKYg4iMv0Dco7M2AF5OERdc1mY4iH1DWnsyICoq88nZVQNB6DGS7YcxBSEI/x0i9Me4QCmrrXlebddN0OZuyFx/0RbHUy4qAucxesNQpoSq9fbK13ciTAR3fSLyJI+rem/61Vrl2mHMhF3fNRLMBp3FKFt6sigqRfj/cITgupn6BTbDFD6/A7F88h6/I7EM9h5twMtnvfAM03xOvUVbnwOJjLsg39qWuPnUUOrtE80M3euG+jBtMB7SuhqD00RRfRQK9lMevNvalq7ChKjrnXUZVJko05v3UnilGjEazQ1WRiJWD679pm/ZwRtfA5ehdNZmIe7ua+ndS4OLxOXZuPhYO7TO9bjcfE0Dpoc7KxMCfwBJ4HBnW/IwdvNyymGqxxovIBaYePpgoSIuZ3dahVI4sFr1PXZMTnYC7e+hVq4lHUHprMRDTMyzt4rn5HUtz9rpqs5vgq96n57s11xP4R5x05JxTAFAAhsGNLPBb2RGAv5IvEkTv5NqSmpBY8pr5Mxt7fQyujBGmHjyY7CVHnp+l3fY7eZU+mdH0wOsv20Rpl7Wg0ZO1xUpVZwtQ46tr3RlF76LOkbdkjSTPK3hhaB31mdGNt3RdPKUfvos/RxtO46X0UDms8F/d1EewSsPY4qfKUMEHHh6aEPR6aEldVpX7GY+pbPAFUf2NgDrr5qGYuusb4ONcW2fuhWBonTS1oZ7sTXrtiGLIQJ+1h/pSDuKiO80cERH+K749JT1hEVbONG+IRdd1GYsyAHJRbiSkHcdFtAMUMyaG9t11XHazuQzmKhTppnwiah7qpngyChPpo2nLKQV10bZpiwU7Ktk3zUDddG6dYklNnzQHtxTasrHpq7y2uu6FF5Utz1fzalnfwVmbMkBx6a7ryFk27j5aV8U/wevjLxh7/srFHv2zs7TDdtgppTlBAU3X+pledv+mV52961fmb/vYyYMu2C1JUHNrz0icAqh5aUr6fxsVAGSxISfGbqYYPbffZmgOQVh8tK3cn+OSdBxZ1Xah19BH2wLSuH8SscveF3ZhxAE5FMUsCJgkTzFWvyDClrGZo/t1M+819FSgh42qc62g7U8KZDkiizXwMQmMSUUSLNRYVXnkRRWuhrS6GLlkvq3+u46v6oSp79w1qfkl0c80wRcPt9IWi0giWaJScgFAWKy8A28OtJmIoDfZmbkeT2ah4/cUc2IRfZiYcoEXmFb2j3WeokmUUDA5uFiRvl5myiYgaYiK8qHR4dhOS3kabUVZAtB8H5mjr8dCicFcNVWnq8RSJNks5rmw6f8kMmcxYRPSXcawGqk5gSdad31H0QT5ckv7FmuFkzvregSaKdv4xGEWWSJ7KDO1eU5LKZkdBMnTJ+mpacQNcZiQo+NbU9VdT3uWnJ4nySgEtPpnOnBT6Ex4UF5aOEnFs0WgBS/PXVB6cw15l5iOf22+oGc3GjKvhAe0RQ4IsH4Y4Y1dCfJOUJltFcwS07FKaaPVzdUBzMkNlSTEagS+Kxh24igbBYJmkLNwILhifAMi33GZmoNsCG5lXb71o1XiPlLIAI4dGS2VDy8JeVGxFDhKWbLQ0AvaqQt/DJ4jy87FSxZggpogW7y6ns7R+7sl7cEhavG810kZvWr16z4fD9GTfQ4Ewr5a9M0hyxsKiqrFDQoJt8LYeMmADfAyh24q8ev/dlpdxyIS3xZgjmnxgo3Z6yh+QQJ0TSlWzIQMzwOvUg2PSeG0qdnuv5kkQ+D7d0KLwxza/r+UpfmzFPS2HgUd1CxYR5bbJQklgl+xqueLGdYy/n11Lh9oBQYOtrk13tNDTFzJkg3FTRfM6CBmAwXDbHhTdR0AQ5Zubds9SDMkTzXwwXiMpS2XE3yiU8YEuF7paw0SiY72AIMp/Ml1v33RHxVgvouAWn21/qaHqiCiIhfskA5R2UFQSLXUPjkpPN00o5k8UDzVbVrr0dhFTNrRdX/X8BeS+ywaHpZc5nqZLzHFR02lys8MxJKJ2V07n3tQ7DGMqavmxPe5w81io0a/W9JduT1lGTNxQ+wIliaid38nvMKXoqPX8zO5wjZio4Wfrgo3s8AuJsF3V3+0x82io1bLqucMupsKW00GtPY4hEzYcz27t8QuIsJ07JLbHzefhZuP9ybvsAiZuOK3K73IMqbLlHKNtDqX30RwO2PSJJMJ2X6o/7Jvrz4qxIkVU2X2ovtvDFqBxnzUpokrG321dP+wz96iy5XgBrG5xN+aAJtMjjI4FQ4poMfXu8LTIgwPS7lZZ5bw+IYE2+AzSx8vi3OfZvijwafYImg8Azq0OlQ5ZkJFqzS4gYPJuH8FN/GD5hYDLa5pNxIFM8F5iQ0PCn+2/7Lj/i0+kCRpkhS9v4l+ZTFBNrxMQIHng+8dIH//+MYJ/2GHxQWvyyTzUrcmHT8s6zUTZ7qLZNtjQiLAY6DRURuOcLtjP6JaTjxfFo5CAyxkIsMXm2Vrj6RDhPtuVqzXdZwcZ6ac22jnNnHd3JhHNR8AADd4NUINewaDssmqjkvdIoI2qZLBC+YOLaxJo/gFEM5lhb01dXmozzGP1N9efcYuUu88UXcLMkvfZRpOV3SmIdPYlZpy87E7CyMaN8ZFlRAEtdrQlbRP6wSr8kZrbVWH6epoGe6pCXCkqC93jt3FUJrtriqSrrJU15ZFkG+1Cm26FbUTj0xwPDkiPa2/r+wduBARPbTaNm2omrjfjuJL1tnwscc4TCiee0H4/22af4cRUG64Dxj2eKxm1hZedfDwgjh/Thg9or7GJVC+/mATbfGo+agw+NR9haXxNImTABviShC5IxAq/rsq7KU3TupjGKubuMFV2Pln6HmtFB0Rzd5heYV81ZZg7DDW9Hs3dYars+bL0Hdbz/T37jGeyaHvdmap2o5OhPatOl5BE2O7a3NlddgFRtJuDi2k654gCWkyFrjCYCaA83ndqgt4sYPUbgOIBZmvcCnzomZAkGxc0Uv/NHcGSjLxQ0YpvFAiWwgj9ZjGmKCz0ZZcni7a2783RwkYeXJYeuqp06UGamYeWhMfTmdPXMnitpyTMxr2a1TY+CbJx70ati8+BTFwYTHAuGOBh8bF4lSeU82Tc1hX3btuYDNu68t/rGnMl0/lkGdr5+HBQOghCr8yWJKFIAhyqIeGoTfZnUh+nISDDjznBAo2iwPr7ssqIqJKhrVOftcPoRzK7u2bV0RNIHmimHyDQRNFuuzJBk7OUpTDakbcsWbSdowQv0aQ0mcxQUcsl5LLaMCRKduPhG9zEhyPS6PtoxSKi61kb5YOc5SKm+mZHsCSjdSUCLbeQgMqPYEWtkzzUTPmBOEVDrfR1lGGKhvzNHJ4+dCnHhPpfT2DB4gko+RSXfIpJrkugyoePYYPG4xroPteEClqOL3twRhRTMAt3llhR8Q6OVr76KU9ZmJE7T6b28Um4za7qj4mY3bQavcswpWKWa2++y5Vki8bz+iD8wvHxqPiOfplmioYPTQnnZMEiojtykLIkI7cxgKZ+xYqiyRYAop6Q9DbKNswLoPbbzoPCciPpbXbmkhaQ7OeTxxY8u+/DQemqbfZEEWDYknF4tYziNUITUTu1jUZe31uQPNSsPavz45NoGz+Q+PBw5mKIt81vXNwaxy42nJQrtnFPWkB7xmKajXKqaGZTiLItFLj07cDsQJJArzXIncYrJmFea1EorGIO5rTEAVMYRRTMZ9vVUTglJI3XGK5X6+WRFF5unKm18jiYk7fGrPBKWSq3adVT7xfwQMc5tLKy3giayk9ZdykLc1smBevEW+GZ4+qclRklaDo/Za9C0DA/f8Cq8CNoOj83dNzh59FEv0t5Zwf5nb7hJMUx9uaHqrYf5otMeOEEDuv/3T7I44cYLauLX4rPuujX4Uu4munDIkR1wYrKYwR34ZKlSddDYqpSsWJ3QM0wZtHLV5MXuxa9/FJnoCcucy56zzC9Z6jec0zvOar3AtN7geq9xPReonqvML1XqN5rTO81qvcTpvcTqid1DrOe3DfMel8xva+ynltmgN4YAVTU7bb48YKsh5RU31X92QzlLa+4oFA1qbNZcHJv865rzx+qjrk0fRJcYLCemMQFKKdxCih8JVT2gpLVLidJ6XISVeZwu/KowkdKqmPYV+w1GkAhXTmpK0zUg4Y96GhnwUlNZsHJLWZVFF6iq6L4Fv0POwWUYgI4jIobTlSs269uf00e2fhI8cTzcj7jY3usyk/ddBeD7e4r5pu+0YVjiq7ysfrJAz9F705H6/OQYYluyyfx4pjYR6Kq+ESBYmhcoOkCQRA9plBOwkUvk7oPFXXJD8AFA5IDOikMVLrCtxK+LvyBWfhBo6QdwQH9aUdyeeqFDzEWF4oEe21fCoE+G0H0mPYB9D1Glic5/t0+CA3JIRAV6b3nMPI772N7lLuvGSR+yTDHGpeHDD5S/j5iDMQqp9IDypou2CoiueBkxfGLj88t86XhLLkCQc3rtq3dxAHSXcCStr85KZdDjNao85t/iTy05/ebNBj/TR6Lb582SNuGo2ICBw8hy4WriOe97CfYe6lIfaTiWPH0edH1tNPJyVMU0aepp/m6oL3AxAOpYyhHuYA3nKzoIivK/deGkxX7wd2K25hzf9sKbSwCIwdygdzPKETtV3OWxX41Z0QLKMUZpTrtLEuuUFF3CtYGFOEGRA/hyqI+UlS1pitvv9jBfSgtjB9CrKw8Rj4DkrsBZU1s1vsFnvVuxz4FxRWHHqZEFk1CLKbsv9KgVccsDTw06Qry+nKWhh8xWlZ3sw/5Wd5w8nFIMyCPxwKT9cY5DKK4AkFNafFwhaFHQKf5rfx6TfGowxyP0Zpe6iopBuwyxjHUmGwE2AMYKoRYXNktJ2HDPpqDOiGNckOiqsDT6CE1x5Mv0rslwCJHhuEWH2DFE6jImtI1tpo0w6Tp9AyTZ9Qz8O3Q5qPk+4oOCGoi60XXmmuBr3ev+3JMpesU732HqU+UPcXraWcL9Gba6+lkCVDPG1DU9C/XBJRjuKgvXp856aI3Z16DN06GqmDbjC+OxJpIhiW68bdOTtrQhZPXyKWNnh5YGrt2NnIshZvi6aRJsld7BJr6jBLVlqVF9nu1SdKHqnSB5MZwWR+7OGpWV10WFcGR1CcE0SO5bhCwITmik3QD36QNXr53jdwhNyvi18f5WKAcIjSsHl8wp7CiqKhveM0cbpryUMf4njnck2Kirt59c7hhREK9ouvmcD+CiHsqu4UsD3Wk7pvDfXNs1D26dw43JoioZ3j3HG6Z8mBH7wI6hV/EQt3i++dwR4oJu4b3NShMUyLsGdxDp7BMeLCjHylbYRjTcL/gMjqNY0LEPcPr6DSmKVN09W7/ApwiNKDutoWAocQGVGhCCfbBsjZ3N9isCFwLNoLE9RMHAlZPgCuhNj1w7jQ/9W8O5jwwdxdOuiEY1Va03z19kHD1ySwM3Xoyw8T6mmBAjeFnma41Z5mux34MrDMPiulq6kvdn/rB3iGDEA7oC/HhF10sNPwKlNvEDERaBRZLPdQFW8bOU1t5nspRsSKSo4F+UNlpwihP2OnEBi/rIzFVeVdiw9GK/ww+t7ffzWnazqS+uH/8pDhOW9xFP5huoKOezxpFipby9PhpcTN+Z/B1XnJm5WOwqP6suDQH27k+5TCmahwkkrsvq0mGI3o9L+rq3hZDZw6Zd8hqEUJF5RdF517qJ9OYoz1lQras4gla1H9ZmKpoz0N1qv7IBuFY9RO0qP+qqOsTVDABMtd6vVOVH38l69L9XUpVO9yO7zuq1S/t6y+dNQf6cRvpa0MsJqDk+XXcoZBVRxioaefVflF1AYK6roWKmmMzxvT8FiPq+mBQ/1w1duhF5QnGavot7GzKO3O0faah3HRtw7WShV6MQDAnx86cbxHREQiKnqqmahHREYiKts0RE3VAtKHUtTkZRHVCou3jiEiej/+u5rZJyi1uk+2rg72ryjtEeMHC0uN7DFMeofhTMo3yMg9JWZu+t2RHPROLGSJl4Wb+6obVWkGS2hqmiJXbUHI5uOGXJ3Zq3cJb/5fxzyH7KRfgKFzZmMtmVtkQoeCTp37Wlltq1yh9cZiyLVeeLsGIUv3ipWxCR/NCDfPRvAjzTLhX2osJ8hpKm8OBPgeytqxZNgKGmi+fh5K5LXxClNvAj2XJXXBCM7sHHgtSC0OEXm5ZKJajVy0IwfyaRSKZmfJSosyEN5al54KEaH4mGEi+uRls9745IO0zgrKts66OzXWbHqlNUhoCuZSu8bvkbiKCso9ohEU7BobG2f2czCDvTVe5qwIW5Z/JaeOzp4RINqhektwMg02pvXGfH7gZMtA4CDQn/tUeq/QC+Lhx+CimZYyw68ofLpBKDsLIEIfCkrqhz4OFlbNghJsk0iJkiWxVLUzxyYiQClFtJpSPxUaTm1qMhYTD07ejUqyXHrt9+vinV09ekLUbRaXNp5IISZtJouJxzlB4Gzdf59q2+51t2EKcx7BQgfiOVPEK8R0JDz6uY86DG75uCG74KsWHTJPKx4XMpTQbFzI1YONB5vSZeJCpgxAHkvcg4wnmPLJRBFkPMrRexiIbTy/nwMV9TD2keI+CSybeY9aHifOYdeLiPBJGUnxHwQesGymuY85FjuuYemHxHCVHMGNiHEfJB+wFxPiNOR82fmPqI8ZtlHzIuI15n2y8xtRnjGeYf9eNPzOvutL9Pt/fmR9U+ihmXDm1LXyRg8Rzb3aSAI7XRK5gnESB9KsvF/2Rqi86+mOqRs8UU8VyvLZSrEIPxVXh2OXN3Z9YfwmYLcMEjdYcS2QtyYCYQVFnA2ESVTdipRGrh+KSVo4ZSVbdmAqkCUxdzox11Chqr0hRlJhB0pqZeSQhGT2fknAEl+W9RiRqe1hZuLOuPqJLoTLCHhYVHtqzG1iB0jMaFB/fM+NoCpPf8KKBNyaUtD2oRvZt24vJjuCoPFYmAVgnrUj7RuC6bTrOZ9jTZeN7Eu+UEex9nC92Hj5WLAt/PCUJ+1iVMFLGMR42cE8CKu6wKmFNyhc82zjGU3zMSuyC4AaKXtc1Hg1kEhhDubR11VCVpmYunknfsDkOOxToWma50/3KZJ4Odxs8Xdkwt8Q4omub983QPbB5nDFSnn4Zh3SC0gTipN61DXH/TiLmw1i5y+mcL233K1Pah8vp/OZom+FN03/zF/LihhYBmWbmkGNz4cVGiCDztyD6A6XytyTcw8vnf5oW3pyGPXe2NO7oXqT82ZZtxwx8NoyQxGtX2LzOCJFk2C2LBcGI2FM1DLbLbsEvv4cSz+m9eLOusH65fHWhjvLta9VNOEyrM/Omn0I9ZDDay7k0f10E92HYnOe2T6WwSkicw7o2j+tHFK4XaBu7bubBBgRL8HCfb+v0PYagPW9Nq9QDDqNv3dsBl/bhnKrrAd9PJETVg3Oq36tBIbqhGc3b6nhr+2EaHuPlQNEYl2reZ8ANIgajfTLf33Xmm/teHpdPSYzDeZv+4A4pSXbQ1gJF41y2uIt4M0pJnEN0Y7vChmYCXtOTrncKeIyPO3eOV4mHZjR7/zZwXJyiAS66J49gcR63l8E9RXj5RwxOe5z76NsSyRN9tPqwrrKOE5Lo4N6k2tR7HFF/Wo7QZiFgcR5BkDSFC8XjfB6acl6NVJgkJMFBJy1r3q/XwuLKCYfR/xZcAYt7kDzRB2+l38De+dt6F6s27R4n0fePP6dXwfgrFvQVMOlqRRo7K04eHTbrWSgiBLVKNYF4VoHF+K4fPnWBbDxp9UDMvHVC/efFjEUkqS04RjBzVY1fHcwVNWmdHC0zMT9abk5+tAN2mjoCCpLHY2ePblHjujMHbh+SAAvS066UULERkJdcXrDumORNGACN0E3Qgri8NeajeDFxW3fDCELjlpZYhhtMkIvvBKS0qCsBU6Fwb5bUSTdnCRn+gO2G4YXesSvbM0CQsDfmUkNFFEJBWbHAAiQv+v7mxk5rZK7O3cISq5zCBXnwI4sEystCH1mEOF7woxnXi4Q93AjIS/66zdPfVVMQhTHCP7ezw9L22H2ynQvlYo58m5bIgnXVXAbbf6ma0vrlM20ZM+vZMlcwbg9CvtqDkPbf7Heoj/VwvOB43PLntr1j5VYUL7aM3+V2GSAF0bavHHs6sTxXAC9OMTCTt+2lGefMGp+YhFktLVjjFHEwo7AThHxCCmjTDF0F5mPG4sIPv9/brjbM5nuGAFr0Q3Uyg6p1RRzM6JdpNdfrwJBOVmT/gDnY5YIaqoTsyPqe/O7O5A/kbFwnxkbWPHWHreb1jQj8WBJ2Fn1eZkdyNI81Rdxhife1KW2HnZvr9YM5YR0kTcVsr5p72w/uPDLYtHyC1uLSaD0u8aGgnMl45RbWJCYoJut1jJpWl9LUdprHfe8b5IdeHT/2zvDZ8LMVk9RWuueKImKW89lJzSgnpKhssDa5gEFpRfNTtbmtraDaMxyT/4epXMAxzcMaUgQb1+y+lIY73xTAeLnP5hsy/dtggpw9maoZP1MY45pXgmwCF+SBWBABTJCb7ne7am5aXm/D8YLraXxgxhphBWHqujZKNHdbWyKInGMNcdoTfSMbCbYRAYWEg8E2EigoG92GxMkSlyElsg+nr63QDkYIL4O9NcBXxHU7mHpc5+aXpjwcItj2Ayy6Yne0qVFh7pFRwwD+g56/2Bp3dGC+8LAoLxGQkfyPuv3qSjj/xZePkPbZbk3/WwuuwqVYJpkjGO4uKTQvPm6siZsiEZCR/MUaZn/a/crszLqfT+aMB32gCdx582AGxiTUh3Ep9nHAsXgSD6dXCrCRgmFpRZkzNM7uit5NTvSv8pvJhCARiexz+02Sp1m8WbgXHY4wCJcUzsr/XB0kyRnCy4SxZoSiSNGCeBguhRJMA6ZEItQH0qlQ9jPpSCzNpd+DX+XylfTfS5QQ4BGOoWwC3QcsSe+aSnowUS69AovWo2+/igRz+66pJLftGomSu66pYnbTNZKbO3mhLW8oVuxje+RUPrbxqz6hSx9krRhJ6Mg/SxOCFVkuUXPV/ft5CANspooEnJfPXLlGKDP3rUWizU2r+YSPxLMGyaVpnHoC5tMen8uKhw30saxgxLBA8iEifITUb1Uz9stgz78y07EQx4zfKm/R+LoV139IOCN/tW5oS2+AAMjWSvDpNvDWo/CIwTJowy0iBm9C3bNHKOcu2cvIxffYIdoxBzEK764DXEICYhFfVQeYxBTExrugDnDw0Ih4dBsdYBAxMBO03yYJiAV11RxgRNEQu+iCOcApYiAm4ZVygEdIgCy8W+QQAw+OyMdXxgEWMQWyCS9oQlxCBmQSXAuHeAQEyMK/uAhx8PGYQXDvG2QRMDCT8J43yCWk8Dbz5suX6g/75vrzJ9OZEzumIgmwxYfquz1se5Q6O5IMW//d1vWDztCj8Dbj7UbTykZm1OdDxOnqBMbm0jEWSOj0LEmDnBDKyno3BXKSHkyQc/f4gdOeBMxLV/3dHKN1rmdWO0GL4mOk0DfdkU+zDxQl5bl2bqePEkPqPgCKkv+1fq0laW5IhegHhewHjXASJklSp4MmRRbUZiohnNtLpeU+h19eZfU+p99fRYLR9sEUPk1oDjmOxkhnIYrjYxTN4GQyfzewVbeCAKl1so9IemBAWipQrBzHDee3pi4vtRmS13HwBiOx4quMZL25/synnebosxKNGNSmEV+fgHEEobYdWYAZUF+qalLUjqZSdtbF3ipQlbyuwONXMVHg5Hs4V+ATGCrwFQonU13gJA22AwvcA/PS6PQNn7fN0y+i/wzrMYLJdendYMundMMJCZ1mcJ+aj7zeCoPkPtv+UrM7VSESEpVHp9wBpIzodVXexamN6igGArUUU6ahPZL0mKPMxBpsXee10rR20XkgyIs4FCQaXfEhBzMMpYn7vFSbm4mjNCJiDiNemdjDot183FVnNpNYqzCYKbCfQRIgiynqqMIiILAW00GvKddsrxoAAUm5w8qfMaMF4e6VwnMGdfU1vxtZV1+Zjci66gfbbNfR5Df5YiSzvxdDf2+4DwYotCw+B1MUZWccLAil1cOKwks8iE9zOC5JPMbLBlsQRlF7g2pkkTKJ4LJ8cqmX6JAwdphAWSFZotm4UidpjyBMCknqChQl33mRLiVVH6sSRpIc4yGDj8EALC/8MRl0MYJoahcsJDz13YjshFSIound0KK4EOTYA8lS37kQ+BtGFMoczqUVmSO6kjRSnAlBtFgOBkrKCw4WRJLrY0Vh73M5SdeDamSRJEdwUd47twO/OSjOLiMkQzkeaji1NW3eItZOM0X+CKZsuoVYFV02qCjrdl8kPYeBhJAiWHCi4Bc/jqmkGoB10kiiEwJsgXRnPlYlrEk63LVJX8j4KFAMHTuFaKU4VBgJAzTBGuEG1cjiCVc0vzV+K6YMjf02KJ5kePyHXYCTYlXCeLo3PGiAS2OiQeBaUThAK8WhlCcM2eShKUXZh6aEhKA0zjhRkDpMQUvmDlMQotjcBZy3/CMInIuJLmhQHClRxWRogqLrNCFaEEcjG6ZYQRiKbRgBBcnpHDCvNmEEIST+QIgTBLEP5GOkJAp+Ip9iBWHsW+UYyYiGr8J4nTd9/QULveMtJPDnnQSaW4AOvqdKEhZ/TRWmqz3mP4KZf5T27D627d2FuUBq+p1JxPJNVF5iQQAiH6racpeox7hQMrxKfcW29YG/mj1FIrq/BdGM/aL3EVL5L9h/dBUb9DzEsUVJLE2kaplFiZwU8FkngebavQeXvsqOoaAs/sjmSazV9GFJ/hH0AGIziF4cSYURL41nqUA606KF6DkWI/jmYM5B+4yeIArMPkQjgSu65Xes5Pj+fcOIGXYgKLMekM9o35ujFVugB+Pb3Ij73Na5vmcDyCU3Qq/btnb3KbJ6C0jWHG7bA3r1AIVma2joqtI9odxutYfiSpL+fDZOYf6j2SBlPkx+Bik0KJ5/YmKUVFM+nn96YiSY1KjJ59JKNfkkseO3rOOGHfAiSsFcO5jQ7mgOLO2DRWl3TgZV9rGisJvvjrkEPwTPkzArl2u1VUzCrJLi8htPAoMaz7g6cLaNNgcxh8tAe2+7rjpY7NYPCs3MYBY4Oh2m8YABNC0mwIA0MqtNsYAwNrul0Ig4OMul8YABNtul0Iz42XS9Db+SihVXCCMzb1nl3w4zgHkpzIj8q8sDSM/yDJVmDD6Me2KpDUewh5CooG28wMv5UMu7grA+MykPNhRfcgQaEI+2S3VZYsiwNVpHPlopvidTu2oKDrRG4gEDfNZNEziL8/TJxLvq5obp1TYQ1z1OqOt2Hs1xu5MpVhb+L1NfmAV2H8X1vtSufzgbze72h/NQD4ZUfopmq36DT7Ov64dzZn5KQsVefyMpmleWJGQljSKTlDgdQSYp8SAYTLKqkLxJaQL3ZhVj1NAp5+PTkNmYvn5H8xCg5QzkYt+Qqefi3pBJXz76RBMf4eXk5+PqkBngY+qQWfjYHtHUb1A54WSkHjLN2Sg9ZHLnhU80ySFcTnY2BhCZdDb+Tyb5boEPT72HRhJPxxbKpD0fV4hMuj8aQDNAcORs8PGLyMzIsYvILM3DBDQ3IVzOSDYyEpkHNioSmfwpIgea+gAtJz4XcYlMOxdtiU66i82BJnzDAskmozjRic5GcCKTvBx3Q5Md4eWk5yNEkcnno0PRWZiiKcA5COBABnJxHej0c6Ed6OSPh5zg1PtoIPGZmFZ02pl4VnTS3WfOcMo9MJBw+lNrOt35r60zyR6/ecYT7sORpGdicGUSz8TfyiR/Wi7D0x/gkQzk4ntlcsDF9oqykEQ4iiTJmEa0houGxWTeQ3FZns9ULdtKyFwvQ2FnSTNnOXoGm4QEzqKz5iAdp9owzBx6eu3lS3b6nSnTCSBv64U4UTC/Hrr9Lk2MJyS/fbdh2CTd1LZkMzcCGInOntp7K1fZhmIrzYUc45Ljfmcz5ADcNH5DcE/nhMqf9dl+l+vKIaVzPj6Ky17w3UYiknyxkZCBZ9aHcU+qwzGNef5VLJ6qv5OW9VeMlJzP9l92bHbgumqWIxnhy1EEmu3+2ktzcEEJmP2bDcM8Sd2luWp+bafNcMvdURIjucdzioXG1PoGkCp+GSLnm/OCYJr0AsmnyEegSTpIDTIEcvUZfEIEPHwkHjEAL2Gg4Ig83uAzDM6kt6Yrb6VXiI9i2ug8dWGa1QTgWtWEkF/9EVCWZNpp7mI1oplOUP7174GYZPWW6Rh6y/UFvR3etvXl1DA91YaRhMLbpEid9DqpWCa+G4KQoS6HiGWgu/B69C68HrwLr/+hu/D628vAf5a8ILhHxwtCWdsD+BJlWGzPMtHG4Eg6p4Qi2zDP3fq7+NhtH+MhHW2KlpPpgpbC2j4Yk1YVc0xALOJrPtKCpi/6yBX2FGxKleyUIid8fZ2rnEgW+5pbLu37clvduFs/+FuBSTjX0dQjYr1NZKSx8imc6xzC7it536S9VvgCdL8Db1QfhsoJB7cpLDf3G/FMj7H8LLZhBxTe0gtEyipwPj3GcVnsh/a8LHgxTcRDsS1jXPvjcjkC2DyOCKR9BEBZkqvHFSDX5AiV6nIFscmKSz3VoUqcFJnOkOZPXaQ4OafzF79TJGpr+lzcfQoJq7tXOCS+AWHt8XgUf5aYxqIOXJPaEKiaONf0cey7zLs2GJyq0QzU5JKJj8zdX0yUQ/DBePIwJJ+KP4vJYgEuGDZfD02pKLgUzYv3gz1xmXS/M9m8nu6HfDv4kaf8IvcAUnlf+3ccMooxTNStSnEhb8VwpXX9sT0y6Zp/FZOzfDkZrgUHUj5E1gvOZDAJTIGidnKbHiNPYiWHof1Um8rFc2AD0wQw5o0/tNP5UHeiNwjATwj6QEbymjyBF+Q8f4VbWqIelinLCAWrxgfpAAuKgvqFR99ksxSPOsVn1GQvioG6eafLZKMIjHpEx8BkH4KAe4FdRBaPOlFnqmS/HAt1jU5ByYYEAfUKTy3JVikedvKOGgE+ERp1iU8EyU4UA3YLz+8AZikB9grO2wBWCR528k/IAEYxHPcJDrMgTgkB9wqPnSBmKUN8/59VS08knBsPnFVLTyScGxskUdS5MWYCZgebCRpcA+SJiOUWsB2w2cA6aWVuaCJr6V09x7TdCCU+HdQ5jkiQPsZBaOGd4Z5eEO2U9L2Rf6kJKxzCJN37KboZ8/gvCOaRXCDTUJPZAoyAiGR7OrViPEoKrd00WzQ+2ebgHmXQMoDv9YyuZZNdI8JuX9ROivS5BcnTXEvPsLhe5puphg9tNzWifOIDGJP2GffZmgOz/O2jGLE4BGC8ukMF/wtWd8JAfsD+H03gyg8+sIkf1JyQ08d8dM/kI6ROaf66ndiszSQxu29LJBJf2CPxfMPsTmIf6IG4RukO/0mHYDxQIvXP//nn/wdXw8a3"
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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17588">types.d.ts:17588</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17601">types.d.ts:17601</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17595">types.d.ts:17595</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17591">types.d.ts:17591</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17593">types.d.ts:17593</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17607">types.d.ts:17607</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17613">types.d.ts:17613</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17589">types.d.ts:17589</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17633">types.d.ts:17633</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17620">types.d.ts:17620</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17707">types.d.ts:17707</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17720">types.d.ts:17720</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17714">types.d.ts:17714</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17710">types.d.ts:17710</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17712">types.d.ts:17712</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17726">types.d.ts:17726</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17732">types.d.ts:17732</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17708">types.d.ts:17708</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17752">types.d.ts:17752</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17739">types.d.ts:17739</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17650">types.d.ts:17650</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17657">types.d.ts:17657</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17651">types.d.ts:17651</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17674">types.d.ts:17674</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17664">types.d.ts:17664</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17769">types.d.ts:17769</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17776">types.d.ts:17776</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17770">types.d.ts:17770</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17793">types.d.ts:17793</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17783">types.d.ts:17783</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26525">types.d.ts:26525</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26637">types.d.ts:26637</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26533">types.d.ts:26533</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26577">types.d.ts:26577</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26607">types.d.ts:26607</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26592">types.d.ts:26592</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26559">types.d.ts:26559</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26626">types.d.ts:26626</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26617">types.d.ts:26617</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26631">types.d.ts:26631</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26622">types.d.ts:26622</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26543">types.d.ts:26543</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26673">types.d.ts:26673</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26785">types.d.ts:26785</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26681">types.d.ts:26681</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26725">types.d.ts:26725</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26755">types.d.ts:26755</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26740">types.d.ts:26740</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26707">types.d.ts:26707</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26774">types.d.ts:26774</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26765">types.d.ts:26765</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26779">types.d.ts:26779</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26770">types.d.ts:26770</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26691">types.d.ts:26691</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26651">types.d.ts:26651</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26763">types.d.ts:26763</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26659">types.d.ts:26659</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26703">types.d.ts:26703</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26733">types.d.ts:26733</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26718">types.d.ts:26718</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26685">types.d.ts:26685</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26752">types.d.ts:26752</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26743">types.d.ts:26743</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26757">types.d.ts:26757</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26748">types.d.ts:26748</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L26669">types.d.ts:26669</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26799">types.d.ts:26799</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26911">types.d.ts:26911</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26807">types.d.ts:26807</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26851">types.d.ts:26851</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26881">types.d.ts:26881</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26866">types.d.ts:26866</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26833">types.d.ts:26833</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26900">types.d.ts:26900</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26891">types.d.ts:26891</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26905">types.d.ts:26905</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26896">types.d.ts:26896</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L26817">types.d.ts:26817</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L22287">types.d.ts:22287</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L22370">types.d.ts:22370</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L22317">types.d.ts:22317</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L22345">types.d.ts:22345</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L22406">types.d.ts:22406</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L22489">types.d.ts:22489</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L22436">types.d.ts:22436</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L22464">types.d.ts:22464</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14397">types.d.ts:14397</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14408">types.d.ts:14408</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14401">types.d.ts:14401</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14416">types.d.ts:14416</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14399">types.d.ts:14399</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14398">types.d.ts:14398</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14415">types.d.ts:14415</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14419">types.d.ts:14419</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14429">types.d.ts:14429</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14418">types.d.ts:14418</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14417">types.d.ts:14417</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14420">types.d.ts:14420</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14516">types.d.ts:14516</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14527">types.d.ts:14527</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14520">types.d.ts:14520</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14535">types.d.ts:14535</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14518">types.d.ts:14518</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14517">types.d.ts:14517</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14534">types.d.ts:14534</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14538">types.d.ts:14538</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14548">types.d.ts:14548</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14537">types.d.ts:14537</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14536">types.d.ts:14536</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14539">types.d.ts:14539</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15391">types.d.ts:15391</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15404">types.d.ts:15404</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15394">types.d.ts:15394</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15393">types.d.ts:15393</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15392">types.d.ts:15392</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15418">types.d.ts:15418</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15411">types.d.ts:15411</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15427">types.d.ts:15427</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15510">types.d.ts:15510</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15523">types.d.ts:15523</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15513">types.d.ts:15513</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15512">types.d.ts:15512</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15511">types.d.ts:15511</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15537">types.d.ts:15537</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15530">types.d.ts:15530</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15546">types.d.ts:15546</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15600">types.d.ts:15600</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15613">types.d.ts:15613</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15603">types.d.ts:15603</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15602">types.d.ts:15602</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15601">types.d.ts:15601</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15632">types.d.ts:15632</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15620">types.d.ts:15620</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15641">types.d.ts:15641</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15719">types.d.ts:15719</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15732">types.d.ts:15732</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15722">types.d.ts:15722</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15721">types.d.ts:15721</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15720">types.d.ts:15720</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15751">types.d.ts:15751</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15739">types.d.ts:15739</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15760">types.d.ts:15760</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16469">types.d.ts:16469</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16478">types.d.ts:16478</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16470">types.d.ts:16470</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16514">types.d.ts:16514</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16492">types.d.ts:16492</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16508">types.d.ts:16508</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16485">types.d.ts:16485</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16500">types.d.ts:16500</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16588">types.d.ts:16588</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16597">types.d.ts:16597</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16589">types.d.ts:16589</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16633">types.d.ts:16633</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16611">types.d.ts:16611</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16627">types.d.ts:16627</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16604">types.d.ts:16604</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16619">types.d.ts:16619</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16099">types.d.ts:16099</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16106">types.d.ts:16106</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16119">types.d.ts:16119</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16113">types.d.ts:16113</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16127">types.d.ts:16127</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16218">types.d.ts:16218</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16225">types.d.ts:16225</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16238">types.d.ts:16238</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16232">types.d.ts:16232</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16246">types.d.ts:16246</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16269">types.d.ts:16269</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16278">types.d.ts:16278</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16270">types.d.ts:16270</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16313">types.d.ts:16313</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16292">types.d.ts:16292</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16307">types.d.ts:16307</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16285">types.d.ts:16285</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16300">types.d.ts:16300</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16388">types.d.ts:16388</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16397">types.d.ts:16397</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16389">types.d.ts:16389</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16432">types.d.ts:16432</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16411">types.d.ts:16411</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16426">types.d.ts:16426</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16404">types.d.ts:16404</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16419">types.d.ts:16419</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16693">types.d.ts:16693</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,30 +22,30 @@
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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16704">types.d.ts:16704</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16695">types.d.ts:16695</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16694">types.d.ts:16694</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16757">types.d.ts:16757</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16725">types.d.ts:16725</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16749">types.d.ts:16749</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16718">types.d.ts:16718</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.
37
  No-op when the entry does not exist (readValue throws on a missing
38
  entity, so existence must be checked first to keep removal idempotent).</p>
39
  </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>
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><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
41
- <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16742">types.d.ts:16742</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>
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">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
43
  </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>
44
- <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16711">types.d.ts:16711</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>
45
  </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>
46
  </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>
47
  </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>
48
- <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16733">types.d.ts:16733</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>
49
 
50
  <!-- Yandex.Metrika counter -->
51
  <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16812">types.d.ts:16812</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16823">types.d.ts:16823</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16814">types.d.ts:16814</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16813">types.d.ts:16813</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16876">types.d.ts:16876</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16844">types.d.ts:16844</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16868">types.d.ts:16868</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16837">types.d.ts:16837</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.
37
  No-op when the entry does not exist (readValue throws on a missing
38
  entity, so existence must be checked first to keep removal idempotent).</p>
39
  </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>
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><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise that resolves when removal is complete</p>
41
+ <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16861">types.d.ts:16861</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>
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">initial</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Whether this is the first initialization</p>
43
  </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>
44
+ <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16830">types.d.ts:16830</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>
45
  </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>
46
  </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>
47
  </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>
48
+ <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16852">types.d.ts:16852</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>
49
 
50
  <!-- Yandex.Metrika counter -->
51
  <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15938">types.d.ts:15938</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15947">types.d.ts:15947</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15939">types.d.ts:15939</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15960">types.d.ts:15960</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15954">types.d.ts:15954</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15967">types.d.ts:15967</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16057">types.d.ts:16057</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16066">types.d.ts:16066</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16058">types.d.ts:16058</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16079">types.d.ts:16079</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16073">types.d.ts:16073</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L16086">types.d.ts:16086</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15206">types.d.ts:15206</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15219">types.d.ts:15219</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15209">types.d.ts:15209</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15208">types.d.ts:15208</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15207">types.d.ts:15207</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15233">types.d.ts:15233</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15226">types.d.ts:15226</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15242">types.d.ts:15242</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15325">types.d.ts:15325</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15338">types.d.ts:15338</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15328">types.d.ts:15328</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15327">types.d.ts:15327</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15326">types.d.ts:15326</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15352">types.d.ts:15352</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15345">types.d.ts:15345</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15361">types.d.ts:15361</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16950">types.d.ts:16950</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16967">types.d.ts:16967</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16955">types.d.ts:16955</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16953">types.d.ts:16953</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16954">types.d.ts:16954</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16952">types.d.ts:16952</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16951">types.d.ts:16951</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16980">types.d.ts:16980</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16974">types.d.ts:16974</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L16987">types.d.ts:16987</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17069">types.d.ts:17069</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17086">types.d.ts:17086</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17074">types.d.ts:17074</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17072">types.d.ts:17072</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17073">types.d.ts:17073</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17071">types.d.ts:17071</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17070">types.d.ts:17070</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17099">types.d.ts:17099</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17093">types.d.ts:17093</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17106">types.d.ts:17106</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14649">types.d.ts:14649</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14662">types.d.ts:14662</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14651">types.d.ts:14651</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14650">types.d.ts:14650</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14675">types.d.ts:14675</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14669">types.d.ts:14669</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14683">types.d.ts:14683</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14768">types.d.ts:14768</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14781">types.d.ts:14781</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14770">types.d.ts:14770</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14769">types.d.ts:14769</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14794">types.d.ts:14794</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14788">types.d.ts:14788</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14802">types.d.ts:14802</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14820">types.d.ts:14820</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14833">types.d.ts:14833</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14823">types.d.ts:14823</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14822">types.d.ts:14822</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14821">types.d.ts:14821</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14846">types.d.ts:14846</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14840">types.d.ts:14840</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14853">types.d.ts:14853</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14939">types.d.ts:14939</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14952">types.d.ts:14952</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14942">types.d.ts:14942</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14941">types.d.ts:14941</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14940">types.d.ts:14940</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14965">types.d.ts:14965</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14959">types.d.ts:14959</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14972">types.d.ts:14972</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17330">types.d.ts:17330</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#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.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>
14
  <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>
@@ -24,17 +24,17 @@
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 (storage subdirectory)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><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 (part of the entity key)</p>
26
  </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>Whether the session belongs to a backtest run (part of the entity key)</p>
27
- </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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17354">types.d.ts:17354</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17335">types.d.ts:17335</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17332">types.d.ts:17332</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17333">types.d.ts:17333</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17331">types.d.ts:17331</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17334">types.d.ts:17334</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.
28
  Resource cleanup (memo cache invalidation) is handled by PersistSessionUtils.dispose().</p>
29
- </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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17379">types.d.ts:17379</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 the per-symbol entity key.</p>
30
  </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>
31
- <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17367">types.d.ts:17367</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.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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17361">types.d.ts:17361</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 the per-symbol entity key.</p>
35
  </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>
36
  </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>
37
- <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17374">types.d.ts:17374</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="#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>
38
 
39
  <!-- Yandex.Metrika counter -->
40
  <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17449">types.d.ts:17449</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#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.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>
14
  <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>
 
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 (storage subdirectory)</p>
25
  </div><div class="tsd-comment tsd-typography"></div></li><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 (part of the entity key)</p>
26
  </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>Whether the session belongs to a backtest run (part of the entity key)</p>
27
+ </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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17473">types.d.ts:17473</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17454">types.d.ts:17454</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17451">types.d.ts:17451</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17452">types.d.ts:17452</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17450">types.d.ts:17450</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17453">types.d.ts:17453</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.
28
  Resource cleanup (memo cache invalidation) is handled by PersistSessionUtils.dispose().</p>
29
+ </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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17498">types.d.ts:17498</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 the per-symbol entity key.</p>
30
  </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>
31
+ <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17486">types.d.ts:17486</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.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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17480">types.d.ts:17480</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 the per-symbol entity key.</p>
35
  </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>
36
  </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>
37
+ <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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17493">types.d.ts:17493</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="#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>
38
 
39
  <!-- Yandex.Metrika counter -->
40
  <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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14476">types.d.ts:14476</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14489">types.d.ts:14489</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14479">types.d.ts:14479</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14478">types.d.ts:14478</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14477">types.d.ts:14477</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14503">types.d.ts:14503</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14497">types.d.ts:14497</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L14510">types.d.ts:14510</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14595">types.d.ts:14595</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14608">types.d.ts:14608</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14598">types.d.ts:14598</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14597">types.d.ts:14597</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14596">types.d.ts:14596</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14622">types.d.ts:14622</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14616">types.d.ts:14616</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L14629">types.d.ts:14629</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17140">types.d.ts:17140</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17151">types.d.ts:17151</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17142">types.d.ts:17142</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17141">types.d.ts:17141</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17176">types.d.ts:17176</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17164">types.d.ts:17164</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17158">types.d.ts:17158</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17171">types.d.ts:17171</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17259">types.d.ts:17259</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17270">types.d.ts:17270</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17261">types.d.ts:17261</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17260">types.d.ts:17260</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17295">types.d.ts:17295</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17283">types.d.ts:17283</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17277">types.d.ts:17277</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17290">types.d.ts:17290</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15783">types.d.ts:15783</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15792">types.d.ts:15792</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15784">types.d.ts:15784</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15805">types.d.ts:15805</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15799">types.d.ts:15799</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15812">types.d.ts:15812</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15902">types.d.ts:15902</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15911">types.d.ts:15911</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15903">types.d.ts:15903</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15924">types.d.ts:15924</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15918">types.d.ts:15918</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15931">types.d.ts:15931</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15026">types.d.ts:15026</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15041">types.d.ts:15041</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15029">types.d.ts:15029</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15028">types.d.ts:15028</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15027">types.d.ts:15027</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15054">types.d.ts:15054</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15048">types.d.ts:15048</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L15061">types.d.ts:15061</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15145">types.d.ts:15145</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15160">types.d.ts:15160</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15148">types.d.ts:15148</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15147">types.d.ts:15147</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15146">types.d.ts:15146</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15173">types.d.ts:15173</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15167">types.d.ts:15167</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L15180">types.d.ts:15180</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L23264">types.d.ts:23264</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L23289">types.d.ts:23289</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L23272">types.d.ts:23272</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L23383">types.d.ts:23383</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L23408">types.d.ts:23408</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L23391">types.d.ts:23391</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17842">types.d.ts:17842</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17855">types.d.ts:17855</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17846">types.d.ts:17846</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17848">types.d.ts:17848</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17861">types.d.ts:17861</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17867">types.d.ts:17867</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17844">types.d.ts:17844</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17843">types.d.ts:17843</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17875">types.d.ts:17875</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L17888">types.d.ts:17888</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17961">types.d.ts:17961</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17974">types.d.ts:17974</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17965">types.d.ts:17965</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17967">types.d.ts:17967</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17980">types.d.ts:17980</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17986">types.d.ts:17986</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17963">types.d.ts:17963</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17962">types.d.ts:17962</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L17994">types.d.ts:17994</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L18007">types.d.ts:18007</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L10995">types.d.ts:10995</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11057">types.d.ts:11057</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11003">types.d.ts:11003</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11012">types.d.ts:11012</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11027">types.d.ts:11027</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11046">types.d.ts:11046</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11037">types.d.ts:11037</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11042">types.d.ts:11042</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11051">types.d.ts:11051</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11007">types.d.ts:11007</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11069">types.d.ts:11069</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11015">types.d.ts:11015</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11024">types.d.ts:11024</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11039">types.d.ts:11039</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11058">types.d.ts:11058</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11049">types.d.ts:11049</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11054">types.d.ts:11054</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11063">types.d.ts:11063</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11076">types.d.ts:11076</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11138">types.d.ts:11138</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11084">types.d.ts:11084</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11093">types.d.ts:11093</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11108">types.d.ts:11108</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11127">types.d.ts:11127</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11118">types.d.ts:11118</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11123">types.d.ts:11123</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/b46ad698ac0e7123aa3667408fbdc063c547335d/types.d.ts#L11132">types.d.ts:11132</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11088">types.d.ts:11088</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11150">types.d.ts:11150</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11096">types.d.ts:11096</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11105">types.d.ts:11105</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11120">types.d.ts:11120</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11139">types.d.ts:11139</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11130">types.d.ts:11130</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11135">types.d.ts:11135</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/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L11144">types.d.ts:11144</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/cli_readme.html CHANGED
@@ -993,10 +993,15 @@ CC_REDIS_PORT=6379
993
  <td>Partial profit level reached (before commit)</td>
994
  </tr>
995
  <tr>
996
- <td><code>signal_sync</code></td>
997
  <td><code>false</code></td>
998
  <td>Live order fill / exit confirmations from exchange sync</td>
999
  </tr>
 
 
 
 
 
1000
  </tbody>
1001
  </table>
1002
  <pre><code class="js"><span class="hl-0">// config/notification.config.ts</span><br/><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-6">default</span><span class="hl-2"> { </span><span class="hl-5">signal:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">risk:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">info:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">breakeven:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">common_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">critical_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">validation_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">strategy_commit:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">partial_loss:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2">, </span><span class="hl-5">partial_profit:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2">, </span><span class="hl-5">signal_sync:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> };</span>
 
993
  <td>Partial profit level reached (before commit)</td>
994
  </tr>
995
  <tr>
996
+ <td><code>order_sync</code></td>
997
  <td><code>false</code></td>
998
  <td>Live order fill / exit confirmations from exchange sync</td>
999
  </tr>
1000
+ <tr>
1001
+ <td><code>order_check</code></td>
1002
+ <td><code>false</code></td>
1003
+ <td>Live order ping / pending confirmations from exchange sync</td>
1004
+ </tr>
1005
  </tbody>
1006
  </table>
1007
  <pre><code class="js"><span class="hl-0">// config/notification.config.ts</span><br/><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-6">default</span><span class="hl-2"> { </span><span class="hl-5">signal:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">risk:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">info:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">breakeven:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">common_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">critical_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">validation_error:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">strategy_commit:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">partial_loss:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2">, </span><span class="hl-5">partial_profit:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2">, </span><span class="hl-5">signal_sync:</span><span class="hl-2"> </span><span class="hl-4">false</span><span class="hl-2"> };</span>
documents/concept_01_highload_candle_storage.html ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/01_highload_candle_storage | 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_01_highload_candle_storage.html">concept/01_highload_candle_storage</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="πŸ’Ύ-minio-mongodb-postgresql-for-storing-25-years-of-stock-price-history" class="tsd-anchor"></a><h1 class="tsd-anchor-link">πŸ’Ύ MinIO, MongoDB, PostgreSQL for storing 25 years of stock price history<a href="#πŸ’Ύ-minio-mongodb-postgresql-for-storing-25-years-of-stock-price-history" aria-label="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 MinIO binding source code is <a href="https://github.com/backtest-kit/backtest-kit-minio-s3-docker">available at this link</a></p>
3
+ </blockquote>
4
+ <p><img src="../media/cover_highload_candle_storage.png" alt="cover_highload_candle_storage"></p>
5
+ <p>A stock has no exact price, because for every buyer there must be a seller. Exchanges store stock prices as one-minute Japanese candles: the highest price of the minute, the lowest price of the minute, the opening price at the first moment the trading period opens, and the closing price at the last moment of the trading period. In total: 25 years of history Γ— 20 tickers Γ— 525,600 minutes per year β‰ˆ <strong>262.8 million records</strong></p>
6
+ <pre><code class="json"><span class="hl-2">[</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;time&quot;</span><span class="hl-2">: </span><span class="hl-8">1720958400</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;open&quot;</span><span class="hl-2">: </span><span class="hl-8">450.25</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;high&quot;</span><span class="hl-2">: </span><span class="hl-8">455.50</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;low&quot;</span><span class="hl-2">: </span><span class="hl-8">448.10</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;close&quot;</span><span class="hl-2">: </span><span class="hl-8">453.80</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-16">&quot;volume&quot;</span><span class="hl-2">: </span><span class="hl-8">12500.5</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-12">...</span><br/><span class="hl-2">]</span>
7
+ </code><button type="button">Copy</button></pre>
8
+
9
+ <p>To test an automated trading strategy, you need to create virtual time that iterates through this entire array of data one candle at a time. If you average it out and use hourly candles, you get close-to-close, an imprecise backtest. I tried several database options and want to tell you about it.</p>
10
+ <a id="load-profile" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Load profile<a href="#load-profile" aria-label="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="typescript"><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">CandleAdapter</span><span class="hl-2"> </span><span class="hl-4">implements</span><span class="hl-2"> </span><span class="hl-10">IPersistCandleInstance</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">constructor</span><span class="hl-2">(</span><br/><span class="hl-2"> </span><span class="hl-4">readonly</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><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">interval</span><span class="hl-2">: </span><span class="hl-10">CandleInterval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">readonly</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><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">waitForInit</span><span class="hl-2">(</span><span class="hl-5">initial</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">) { </span><span class="hl-0">/* spin up infrastructure */</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">readCandlesData</span><span class="hl-2">(</span><span class="hl-5">limit</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">, </span><span class="hl-5">sinceTimestamp</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">) { </span><span class="hl-0">/* ... */</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">writeCandlesData</span><span class="hl-2">(</span><span class="hl-5">candles</span><span class="hl-2">: </span><span class="hl-10">CandleData</span><span class="hl-2">[]) { </span><span class="hl-0">/* ... */</span><span class="hl-2"> }</span><br/><span class="hl-2">}</span>
11
+ </code><button type="button">Copy</button></pre>
12
+
13
+ <ul>
14
+ <li><strong>Records are immutable.</strong> A candle for a specific minute never changes. That means we only need an idempotent upsert that applies only the missing records.</li>
15
+ <li><strong>Reads dominate.</strong> Running a strategy is 99% reads: point lookups of a single candle by the key <code>(exchange, symbol, interval, timestamp)</code>, many of them, in parallel.</li>
16
+ <li><strong>A strict visibility contract is required</strong> (more on this below) β€” otherwise concurrent writes fall apart. We don't want to download all 525 million records at once; we need lazy loading.</li>
17
+ </ul>
18
+ <a id="write-visibility-contract" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Write visibility contract<a href="#write-visibility-contract" aria-label="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 engine has a hard durability requirement for writes: once <em>writeCandlesData</em> returns control, the very next <em>readCandlesData</em> <strong>must</strong> see what was written. The file adapter satisfies this trivially (<em>fs.writeFile</em> β†’ <em>fs.readFile</em> will see each other). But a naive implementation on top of any database β€” &quot;read, and if it's not there, insert&quot; β€” <strong>violates</strong> the contract under concurrent writes.</p>
19
+ <p><img src="../media/highload_write_race_visibility.png" alt="highload_write_race_visibility"></p>
20
+ <p>Both writers see &quot;no record,&quot; both insert, the second one catches a duplicate key, and the engine goes into a retry. Exactly <strong>how</strong> each database closes this race without breaking the contract is what determines its place in this review.</p>
21
+ <a id="attempt-1-minio-object-storage-moving-away-from-files" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Attempt 1. MinIO: object storage, moving away from files<a href="#attempt-1-minio-object-storage-moving-away-from-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><blockquote>
22
+ <p>The attempt didn't pay off: MinIO creates a new separate file on disk with metadata for every candle object.</p>
23
+ </blockquote>
24
+ <p>The baseline implementation was saving files to disk. It's slow. I hypothesized that the data model wouldn't have to change at all: a JSON document stays a JSON document, it just moves from local disk to S3-compatible object storage. One bucket, the object key being a pure function of context:</p>
25
+ <pre><code><span class="hl-5">backtest</span><span class="hl-2">-</span><span class="hl-5">kit</span><span class="hl-2">/</span><span class="hl-5">candle</span><span class="hl-2">-</span><span class="hl-5">items</span><span class="hl-2">/</span><span class="hl-5">ccxt_binance</span><span class="hl-2">/</span><span class="hl-7">TRXUSDT</span><span class="hl-2">/1</span><span class="hl-5">m</span><span class="hl-2">/</span><span class="hl-8">1767251220000</span><span class="hl-2"> β†’ { </span><span class="hl-5">open</span><span class="hl-2">, </span><span class="hl-5">high</span><span class="hl-2">, </span><span class="hl-5">low</span><span class="hl-2">, </span><span class="hl-5">close</span><span class="hl-2">, </span><span class="hl-5">volume</span><span class="hl-2">, ... }</span>
26
+ </code><button>Copy</button></pre>
27
+
28
+ <p>A deterministic key solves the durability contract for free: an upsert is a single idempotent <code>PUT</code>, there are no races by construction, and S3 guarantees read-after-write for individual objects. Candles are immutable, so a write is <code>stat</code> + <code>PUT</code> without downloading the body:</p>
29
+ <pre><code class="typescript"><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">CandleDataService</span><span class="hl-2"> </span><span class="hl-4">extends</span><span class="hl-2"> </span><span class="hl-1">BaseMinioStorage</span><span class="hl-2">(</span><span class="hl-3">&quot;backtest-kit/candle-items&quot;</span><span class="hl-2">) {</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">loggerService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">LoggerService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-1">create</span><span class="hl-2"> = </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">dto</span><span class="hl-2">: </span><span class="hl-10">ICandleDto</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">ICandleRow</span><span class="hl-2">&gt; </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;candleDataService create&quot;</span><span class="hl-2">, { </span><span class="hl-5">dto</span><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">key</span><span class="hl-2"> = </span><span class="hl-1">GET_STORAGE_KEY_FN</span><span class="hl-2">(</span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">, </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">timestamp</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">now</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Date</span><span class="hl-2">();</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">row</span><span class="hl-2">: </span><span class="hl-10">ICandleRow</span><span class="hl-2"> = {</span><br/><span class="hl-2"> </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-5">key</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">exchangeName:</span><span class="hl-2"> </span><span class="hl-7">EXCHANGE_NAME</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">symbol:</span><span class="hl-2"> </span><span class="hl-5">dto</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-5">interval:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">timestamp:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">timestamp</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">open:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">open</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">high:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">high</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">low:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">low</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">close:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">close</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">volume:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">volume</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">createDate:</span><span class="hl-2"> </span><span class="hl-5">now</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">updatedDate:</span><span class="hl-2"> </span><span class="hl-5">now</span><span class="hl-2">,</span><br/><span class="hl-2"> };</span>
30
+ </code><button type="button">Copy</button></pre>
31
+
32
+ <p>S3 storage can't do <em>range queries by key</em> (there's no BETWEEN on timestamp). For that, an external index in Redis was used:</p>
33
+ <pre><code class="typescript"><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">LogConnectionService</span><span class="hl-2"> </span><span class="hl-4">extends</span><span class="hl-2"> </span><span class="hl-1">BaseRedisMap</span><span class="hl-2">(</span><span class="hl-7">REDIS_KEY</span><span class="hl-2">, -</span><span class="hl-8">1</span><span class="hl-2">) {</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">loggerService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">LoggerService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-1">register</span><span class="hl-2"> = </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">objectName</span><span class="hl-2">: </span><span class="hl-10">string</span><span class="hl-2">): </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><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;logConnectionService register&quot;</span><span class="hl-2">, { </span><span class="hl-5">objectName</span><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">redis</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">getRedis</span><span class="hl-2">();</span><br/><span class="hl-2"> </span><span class="hl-0">// One Redis SET per minute: SADD deduplicates repeated names, the floor</span><br/><span class="hl-2"> </span><span class="hl-0">// marker (first-ever minute) bounds the backwards walk in listNewest</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">minute</span><span class="hl-2"> = </span><span class="hl-1">alignToInterval</span><span class="hl-2">(</span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Date</span><span class="hl-2">(), </span><span class="hl-3">&quot;1m&quot;</span><span class="hl-2">).</span><span class="hl-1">getTime</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">redis</span><br/><span class="hl-2"> .</span><span class="hl-1">pipeline</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">sadd</span><span class="hl-2">(</span><span class="hl-1">GET_MINUTE_KEY_FN</span><span class="hl-2">(</span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">connectionKey</span><span class="hl-2">, </span><span class="hl-5">minute</span><span class="hl-2">), </span><span class="hl-5">objectName</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">setnx</span><span class="hl-2">(</span><span class="hl-1">GET_FLOOR_KEY_FN</span><span class="hl-2">(</span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">connectionKey</span><span class="hl-2">), </span><span class="hl-1">String</span><span class="hl-2">(</span><span class="hl-5">minute</span><span class="hl-2">))</span><br/><span class="hl-2"> .</span><span class="hl-1">exec</span><span class="hl-2">();</span><br/><span class="hl-2"> };</span><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-1">listNewest</span><span class="hl-2"> = </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">limit</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">, </span><span class="hl-5">prefix</span><span class="hl-2"> = </span><span class="hl-3">&quot;&quot;</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">string</span><span class="hl-2">[]&gt; </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;logConnectionService listNewest&quot;</span><span class="hl-2">, { </span><span class="hl-5">limit</span><span class="hl-2">, </span><span class="hl-5">prefix</span><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">redis</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">getRedis</span><span class="hl-2">();</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">floorRaw</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">redis</span><span class="hl-2">.</span><span class="hl-1">get</span><span class="hl-2">(</span><span class="hl-1">GET_FLOOR_KEY_FN</span><span class="hl-2">(</span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">connectionKey</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">floorRaw</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> [];</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> ...</span>
34
+ </code><button type="button">Copy</button></pre>
35
+
36
+ <a id="attempt-2-mongodb-document-model-without-changing-the-schema" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Attempt 2. MongoDB: document model without changing the schema<a href="#attempt-2-mongodb-document-model-without-changing-the-schema" aria-label="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><blockquote>
37
+ <p>It works, but reading a single candle takes 40ms. In total: 31 days Γ— 1440 minutes per day Γ— 40ms per virtual minute β‰ˆ 30 minutes. The business process breaks because people go off for a smoke break and come back an hour later.</p>
38
+ </blockquote>
39
+ <p>I know that MongoDB is vendor lock-in on their Atlas cloud database, since there are few specialists for scaling it in the CIS. But the vendor Mongo Inc has an ecosystem: whereas for Postgres you need to install the pgAdmin 4 Docker image, which is basically a website <s>(and some people are on Mac),</s> here you can just download the MongoDB Compass application.</p>
40
+ <pre><code class="typescript"><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">CandleDbService</span><span class="hl-2"> </span><span class="hl-4">extends</span><span class="hl-2"> </span><span class="hl-1">BaseMongoCRUD</span><span class="hl-2">(</span><span class="hl-5">CandleModel</span><span class="hl-2">) {</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">loggerService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">LoggerService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">candleCacheService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">CandleCacheService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">candleCacheService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-1">upsert</span><span class="hl-2"> = </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">dto</span><span class="hl-2">: </span><span class="hl-10">ICandleDto</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">ICandleRow</span><span class="hl-2">&gt; </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;candleDbService upsert&quot;</span><span class="hl-2">, { </span><span class="hl-5">dto</span><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">filter</span><span class="hl-2"> = {</span><br/><span class="hl-2"> </span><span class="hl-5">exchangeName:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">exchangeName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">symbol:</span><span class="hl-2"> </span><span class="hl-5">dto</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-5">interval:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">timestamp:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">timestamp</span><span class="hl-2">,</span><br/><span class="hl-2"> };</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">insertOnly</span><span class="hl-2"> = {</span><br/><span class="hl-2"> </span><span class="hl-5">open:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">open</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">high:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">high</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">low:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">low</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">close:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">close</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">volume:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">volume</span><span class="hl-2">,</span><br/><span class="hl-2"> };</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">document</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">CandleModel</span><span class="hl-2">.</span><span class="hl-1">findOneAndUpdate</span><span class="hl-2">(</span><br/><span class="hl-2"> </span><span class="hl-5">filter</span><span class="hl-2">,</span><br/><span class="hl-2"> { </span><span class="hl-5">$setOnInsert:</span><span class="hl-2"> </span><span class="hl-5">insertOnly</span><span class="hl-2"> },</span><br/><span class="hl-2"> { </span><span class="hl-5">upsert:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">new:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2">, </span><span class="hl-5">setDefaultsOnInsert:</span><span class="hl-2"> </span><span class="hl-4">true</span><span class="hl-2"> },</span><br/><span class="hl-2"> );</span><br/><span class="hl-2"> ...</span>
41
+ </code><button type="button">Copy</button></pre>
42
+
43
+ <p>To reduce the complexity from logarithmic to O(1), you can add a Redis Lookup; it costs 6GB of RAM and reduces CPU load because there's no memory traffic across the bus from pagination.</p>
44
+ <pre><code class="typescript"><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">CandleCacheService</span><span class="hl-2"> </span><span class="hl-4">extends</span><span class="hl-2"> </span><span class="hl-1">BaseRedisMap</span><span class="hl-2">(</span><span class="hl-7">REDIS_KEY</span><span class="hl-2">, -</span><span class="hl-8">1</span><span class="hl-2">) {</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">loggerService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">LoggerService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">private</span><span class="hl-2"> </span><span class="hl-1">_cacheKey</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">interval</span><span class="hl-2">: </span><span class="hl-10">CandleInterval</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">timestamp</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">): </span><span class="hl-10">string</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-3">`</span><span class="hl-4">${</span><span class="hl-5">exchangeName</span><span class="hl-4">}</span><span class="hl-3">:</span><span class="hl-4">${</span><span class="hl-5">symbol</span><span class="hl-4">}</span><span class="hl-3">:</span><span class="hl-4">${</span><span class="hl-5">interval</span><span class="hl-4">}</span><span class="hl-3">:</span><span class="hl-4">${</span><span class="hl-5">timestamp</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">;</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">getCandleId</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">interval</span><span class="hl-2">: </span><span class="hl-10">CandleInterval</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">timestamp</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">string</span><span class="hl-2"> | </span><span class="hl-10">null</span><span class="hl-2">&gt; {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;candleCacheService getCandleId&quot;</span><span class="hl-2">, {</span><br/><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-5">interval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">exchangeName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">timestamp</span><span class="hl-2">,</span><br/><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">key</span><span class="hl-2"> = </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-1">_cacheKey</span><span class="hl-2">(</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">interval</span><span class="hl-2">, </span><span class="hl-5">exchangeName</span><span class="hl-2">, </span><span class="hl-5">timestamp</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">id</span><span class="hl-2"> = &lt;</span><span class="hl-10">string</span><span class="hl-2">&gt;</span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-4">super</span><span class="hl-2">.</span><span class="hl-1">get</span><span class="hl-2">(</span><span class="hl-5">key</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-5">id</span><span class="hl-2"> ?? </span><span class="hl-4">null</span><span class="hl-2">;</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">setCandleId</span><span class="hl-2">(</span><span class="hl-5">row</span><span class="hl-2">: </span><span class="hl-10">ICandleRow</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">string</span><span class="hl-2">&gt; {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`candleCacheService setCandleId`</span><span class="hl-2">, {</span><br/><span class="hl-2"> </span><span class="hl-5">symbol:</span><span class="hl-2"> </span><span class="hl-5">row</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-5">interval:</span><span class="hl-2"> </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">timestamp:</span><span class="hl-2"> </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">timestamp</span><br/><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">key</span><span class="hl-2"> = </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-1">_cacheKey</span><span class="hl-2">(</span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">, </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">exchangeName</span><span class="hl-2">, </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">timestamp</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-4">super</span><span class="hl-2">.</span><span class="hl-1">set</span><span class="hl-2">(</span><span class="hl-5">key</span><span class="hl-2">, </span><span class="hl-5">row</span><span class="hl-2">.</span><span class="hl-5">id</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-5">row</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>
45
+ </code><button type="button">Copy</button></pre>
46
+
47
+ <a id="attempt-3-postgresql--pgpool-ii-the-finale" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Attempt 3. PostgreSQL + Pgpool-II: the finale<a href="#attempt-3-postgresql--pgpool-ii-the-finale" aria-label="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><blockquote>
48
+ <p>In the end, I managed to build a PostgreSQL + Pgpool-II setup with four read replicas and one write node. Read speed grew from 40ms to 10ms; a month of virtual-time backtest costs 7 minutes of real time. The business process doesn't break β€” you can wait without leaving your desk.</p>
49
+ </blockquote>
50
+ <p><strong>What this article was written for β€” the cluster topology.</strong> The load is 99% reads, so pgpool-II sits in front of the database: one write node and three read replicas. pgpool distributes the stream of point <code>SELECT</code>s across the replicas, while transparently routing all DML to the primary.</p>
51
+ <p><img src="../media/highload_pgpool_topology.png" alt="highload_pgpool_topology"></p>
52
+ <p>In terms of capacity, a single table with such indexes holds billions of rows: 130 million candles is ~260 bytes per candle with all indexes, about <strong>34 GB</strong> β€” not even a reason for partitioning. The maximum capacity of Postgres for a single table is <strong>32 TB</strong>.</p>
53
+ <pre><code class="typescript"><span class="hl-6">export</span><span class="hl-2"> </span><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">CandleDbService</span><span class="hl-2"> </span><span class="hl-4">extends</span><span class="hl-2"> </span><span class="hl-1">BasePostgresCRUD</span><span class="hl-2">(</span><span class="hl-5">CandleModel</span><span class="hl-2">) {</span><br/><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">loggerService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">LoggerService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-4">readonly</span><span class="hl-2"> </span><span class="hl-5">candleCacheService</span><span class="hl-2"> = </span><span class="hl-1">inject</span><span class="hl-2">&lt;</span><span class="hl-10">CandleCacheService</span><span class="hl-2">&gt;(</span><span class="hl-7">TYPES</span><span class="hl-2">.</span><span class="hl-5">candleCacheService</span><span class="hl-2">);</span><br/><br/><span class="hl-2"> </span><span class="hl-4">public</span><span class="hl-2"> </span><span class="hl-1">create</span><span class="hl-2"> = </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">dto</span><span class="hl-2">: </span><span class="hl-10">ICandleDto</span><span class="hl-2">): </span><span class="hl-10">Promise</span><span class="hl-2">&lt;</span><span class="hl-10">ICandleRow</span><span class="hl-2">&gt; </span><span class="hl-4">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-4">this</span><span class="hl-2">.</span><span class="hl-5">loggerService</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&quot;candleDbService create&quot;</span><span class="hl-2">, { </span><span class="hl-5">dto</span><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">repo</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-4">super</span><span class="hl-2">.</span><span class="hl-1">repo</span><span class="hl-2">&lt;</span><span class="hl-10">ICandleRow</span><span class="hl-2">&gt;();</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> { </span><span class="hl-7">raw</span><span class="hl-2"> } = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">repo</span><br/><span class="hl-2"> .</span><span class="hl-1">createQueryBuilder</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">insert</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">values</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">symbol:</span><span class="hl-2"> </span><span class="hl-5">dto</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-5">interval:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">interval</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">timestamp:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">timestamp</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">exchangeName:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">exchangeName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">open:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">open</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">high:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">high</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">low:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">low</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">close:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">close</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">volume:</span><span class="hl-2"> </span><span class="hl-5">dto</span><span class="hl-2">.</span><span class="hl-5">volume</span><span class="hl-2">,</span><br/><span class="hl-2"> })</span><br/><span class="hl-2"> .</span><span class="hl-1">orUpdate</span><span class="hl-2">([</span><span class="hl-3">&quot;symbol&quot;</span><span class="hl-2">], [</span><span class="hl-3">&quot;exchangeName&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;symbol&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;interval&quot;</span><span class="hl-2">, </span><span class="hl-3">&quot;timestamp&quot;</span><span class="hl-2">])</span><br/><span class="hl-2"> .</span><span class="hl-1">returning</span><span class="hl-2">(</span><span class="hl-3">&quot;*&quot;</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">execute</span><span class="hl-2">();</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">result</span><span class="hl-2"> = </span><span class="hl-5">raw</span><span class="hl-2">[</span><span class="hl-8">0</span><span class="hl-2">] </span><span class="hl-6">as</span><span class="hl-2"> </span><span class="hl-10">ICandleRow</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-4">this</span><span class="hl-2">.</span><span class="hl-5">candleCacheService</span><span class="hl-2">.</span><span class="hl-1">setCandleId</span><span class="hl-2">(</span><span class="hl-5">result</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-6">return</span><span class="hl-2"> </span><span class="hl-5">result</span><span class="hl-2">;</span><br/><span class="hl-2"> };</span>
54
+ </code><button type="button">Copy</button></pre>
55
+
56
+ <p>In all three variants, Redis sits in front of the storage. The popular explanation &quot;O(1) instead of O(log n)&quot; <strong>doesn't hold</strong> in practice: a b-tree traversal over a billion rows is 4–5 pages that have long been sitting in cache, i.e. microseconds. A network round-trip is an order of magnitude more expensive than the traversal itself. If it were about asymptotics, the cache could be thrown away.</p>
57
+ <a id="a-few-words-about-redis-lookup" class="tsd-anchor"></a><h2 class="tsd-anchor-link">A few words about Redis Lookup<a href="#a-few-words-about-redis-lookup" aria-label="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 real win from Redis is in <strong>reducing memory traffic per lookup, i.e. offloading the database CPU</strong>. The scheme is two-step: Redis returns the <code>id</code> by the context key, and the database fetches the row by PK β€” the cheapest possible traversal; on a miss we go into the index and populate the cache.</p>
58
+ <p>Why this offloads the CPU for each database:</p>
59
+ <ul>
60
+ <li><strong>PostgreSQL.</strong> A point <code>SELECT</code> is a parser, planner, executor, buffer pins, a traversal of 4–5 pages of 8 KB each with random accesses within each: dozens of L1/L2 misses and noticeable memory bandwidth per query. A Redis <code>GET</code> by a short key is a hash bucket and a short string, one or two cache lines. On the same hardware Redis delivers 100–200k <code>GET</code>/s per core versus 20–50k point <code>SELECT</code>/s. The cache doesn't speed up an individual query β€” it <strong>triples to sextuples throughput</strong> and leaves the primary's and replicas' CPU for real work.</li>
61
+ <li><strong>MongoDB.</strong> The pattern is twice as valuable: a miss on a composite index drags along decompression of a WiredTiger block β€” pure CPU, multiplied by memory bandwidth. A Redis cache of <code>ctx β†’ _id</code> turns the hot path into <code>GET</code> + <code>findById</code>, removing both the decompression and the index traversal.</li>
62
+ <li><strong>MinIO.</strong> Here a per-object cache isn't needed: the deterministic key is itself &quot;O(1) addressing.&quot; Redis works differently β€” a minute-level index substitutes for the S3 <code>LIST</code> (which on the server reads meta-catalogs from disk), and the dedup set of written keys eliminates the avalanche of <code>stat</code> requests.</li>
63
+ </ul>
64
+ </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="#πŸ’Ύ-minio-mongodb-postgresql-for-storing-25-years-of-stock-price-history"><span>πŸ’Ύ <wbr/>MinIO, <wbr/>MongoDB, <wbr/>PostgreSQL for storing 25 years of stock price history</span></a><ul><li><a href="#load-profile"><span>Load profile</span></a></li><li><a href="#write-visibility-contract"><span>Write visibility contract</span></a></li><li><a href="#attempt-1-minio-object-storage-moving-away-from-files"><span>Attempt 1. <wbr/>MinIO: object storage, moving away from files</span></a></li><li><a href="#attempt-2-mongodb-document-model-without-changing-the-schema"><span>Attempt 2. <wbr/>MongoDB: document model without changing the schema</span></a></li><li><a href="#attempt-3-postgresql--pgpool-ii-the-finale"><span>Attempt 3. <wbr/>PostgreSQL + <wbr/>Pgpool-<wbr/>II: the finale</span></a></li><li><a href="#a-few-words-about-redis-lookup"><span>A few words about <wbr/>Redis <wbr/>Lookup</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>
65
+
66
+ <!-- Yandex.Metrika counter -->
67
+ <script type="text/javascript">
68
+ (function(m,e,t,r,i,k,a){
69
+ m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
70
+ m[i].l=1*new Date();
71
+ for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
72
+ k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
73
+ })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym');
74
+
75
+ ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true});
76
+ </script>
77
+ <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
78
+ <!-- /Yandex.Metrika counter -->
79
+
80
+ <!-- Google tag (gtag.js) -->
81
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script>
82
+ <script>
83
+ window.dataLayer = window.dataLayer || [];
84
+ function gtag(){dataLayer.push(arguments);}
85
+ gtag('js', new Date());
86
+
87
+ gtag('config', 'G-3MQZEBBDDR');
88
+ </script>
documents/docs.html CHANGED
@@ -510,6 +510,7 @@
510
  <li><a href="docs_interface_TrailingTakeCommitNotification.html">TrailingTakeCommitNotification</a></li>
511
  <li><a href="docs_interface_OrderSyncOpenNotification.html">OrderSyncOpenNotification</a></li>
512
  <li><a href="docs_interface_OrderSyncCloseNotification.html">OrderSyncCloseNotification</a></li>
 
513
  <li><a href="docs_interface_RiskRejectionNotification.html">RiskRejectionNotification</a></li>
514
  <li><a href="docs_interface_SignalScheduledNotification.html">SignalScheduledNotification</a></li>
515
  <li><a href="docs_interface_SignalCancelledNotification.html">SignalCancelledNotification</a></li>
@@ -720,9 +721,9 @@
720
  <li><a href="docs_type_CronCallback.html">CronCallback</a></li>
721
  <li><a href="docs_type_Columns_1.html">Columns$1</a></li>
722
  <li><a href="docs_type_Columns.html">Columns</a></li>
723
- <li><a href="docs_type_BrokerSignalOpenPayload.html">BrokerSignalOpenPayload</a></li>
724
- <li><a href="docs_type_BrokerSignalClosePayload.html">BrokerSignalClosePayload</a></li>
725
- <li><a href="docs_type_BrokerSignalPendingPayload.html">BrokerSignalPendingPayload</a></li>
726
  <li><a href="docs_type_BrokerActivePingPayload.html">BrokerActivePingPayload</a></li>
727
  <li><a href="docs_type_BrokerSchedulePingPayload.html">BrokerSchedulePingPayload</a></li>
728
  <li><a href="docs_type_BrokerIdlePingPayload.html">BrokerIdlePingPayload</a></li>
 
510
  <li><a href="docs_interface_TrailingTakeCommitNotification.html">TrailingTakeCommitNotification</a></li>
511
  <li><a href="docs_interface_OrderSyncOpenNotification.html">OrderSyncOpenNotification</a></li>
512
  <li><a href="docs_interface_OrderSyncCloseNotification.html">OrderSyncCloseNotification</a></li>
513
+ <li><a href="docs_interface_OrderSyncCheckNotification.html">OrderSyncCheckNotification</a></li>
514
  <li><a href="docs_interface_RiskRejectionNotification.html">RiskRejectionNotification</a></li>
515
  <li><a href="docs_interface_SignalScheduledNotification.html">SignalScheduledNotification</a></li>
516
  <li><a href="docs_interface_SignalCancelledNotification.html">SignalCancelledNotification</a></li>
 
721
  <li><a href="docs_type_CronCallback.html">CronCallback</a></li>
722
  <li><a href="docs_type_Columns_1.html">Columns$1</a></li>
723
  <li><a href="docs_type_Columns.html">Columns</a></li>
724
+ <li><a href="docs_type_BrokerOrderOpenPayload.html">BrokerOrderOpenPayload</a></li>
725
+ <li><a href="docs_type_BrokerOrderClosePayload.html">BrokerOrderClosePayload</a></li>
726
+ <li><a href="docs_type_BrokerOrderCheckPayload.html">BrokerOrderCheckPayload</a></li>
727
  <li><a href="docs_type_BrokerActivePingPayload.html">BrokerActivePingPayload</a></li>
728
  <li><a href="docs_type_BrokerSchedulePingPayload.html">BrokerSchedulePingPayload</a></li>
729
  <li><a href="docs_type_BrokerIdlePingPayload.html">BrokerIdlePingPayload</a></li>
documents/docs_class_BrokerAdapter.html CHANGED
@@ -22,26 +22,27 @@ memoizes the result via <code>singleshot</code>.</p>
22
  Returns <code>null</code> when no adapter has been registered via <code>useBrokerAdapter()</code>.</p>
23
  <p>Reset via <code>clear()</code> so the next call rebuilds from the current factory
24
  (e.g. when <code>process.cwd()</code> changes between strategy iterations).</p>
25
- <a id="commitsignalopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitSignalOpen<a href="#commitsignalopen" aria-label="Permalink" 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">commitSignalOpen</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalOpenPayload</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>
26
  </code><button type="button">Copy</button></pre>
27
 
28
  <p>Forwards a signal-open event to the registered broker adapter.</p>
29
  <p>Called automatically via syncSubject when <code>enable()</code> is active.
30
  Skipped silently in backtest mode or when no adapter is registered.</p>
31
- <a id="commitsignalclose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitSignalClose<a href="#commitsignalclose" aria-label="Permalink" 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">commitSignalClose</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalClosePayload</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>
32
  </code><button type="button">Copy</button></pre>
33
 
34
  <p>Forwards a signal-close event to the registered broker adapter.</p>
35
  <p>Called automatically via syncSubject when <code>enable()</code> is active.
36
  Skipped silently in backtest mode or when no adapter is registered.</p>
37
- <a id="commitsignalpending" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitSignalPending<a href="#commitsignalpending" aria-label="Permalink" 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">commitSignalPending</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalPendingPayload</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>
38
  </code><button type="button">Copy</button></pre>
39
 
40
  <p>Forwards an order ping to the registered broker adapter.</p>
41
  <p>Called automatically via syncPendingSubject when <code>enable()</code> is active, on every live tick
42
  while a pending signal (payload.type &quot;active&quot;) or a scheduled signal (payload.type
43
- &quot;schedule&quot;) is monitored. Skipped silently in backtest mode or when no adapter is
44
- registered. Exceptions are NOT swallowed: a throw from the adapter propagates up to
 
45
  syncPendingSubject.next() β†’ CREATE_SYNC_PENDING_FN, which closes the position with &quot;closed&quot;
46
  (type &quot;active&quot;) or cancels the scheduled signal with reason &quot;user&quot; (type &quot;schedule&quot;).</p>
47
  <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>
@@ -82,7 +83,7 @@ to drop the scheduled signal from ITS view (risk reject at activation, sync reje
82
  timeout), but the resting limit order on the exchange may have ALREADY filled by the time this
83
  arrives. The adapter MUST check the actual order status before cancelling: if the order is
84
  filled, cancelling is a no-op on the exchange and the adapter owns the resulting position
85
- (close it or reconcile via onOrderCheck / onSignalActivePing). The framework cannot model
86
  this case β€” from its side the signal is terminally cancelled.</p>
87
  <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>
88
  </code><button type="button">Copy</button></pre>
@@ -168,7 +169,7 @@ After <code>disable()</code>, <code>enable()</code> can be called again to react
168
  <p>Clears the cached broker instance and resets the enable singleshot.
169
  Call this when process.cwd() changes between strategy iterations
170
  so a new broker instance is created with the updated base path.</p>
171
- </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>
172
 
173
  <!-- Yandex.Metrika counter -->
174
  <script type="text/javascript">
 
22
  Returns <code>null</code> when no adapter has been registered via <code>useBrokerAdapter()</code>.</p>
23
  <p>Reset via <code>clear()</code> so the next call rebuilds from the current factory
24
  (e.g. when <code>process.cwd()</code> changes between strategy iterations).</p>
25
+ <a id="commitorderopen" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitOrderOpen<a href="#commitorderopen" aria-label="Permalink" 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">commitOrderOpen</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderOpenPayload</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>
26
  </code><button type="button">Copy</button></pre>
27
 
28
  <p>Forwards a signal-open event to the registered broker adapter.</p>
29
  <p>Called automatically via syncSubject when <code>enable()</code> is active.
30
  Skipped silently in backtest mode or when no adapter is registered.</p>
31
+ <a id="commitorderclose" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitOrderClose<a href="#commitorderclose" aria-label="Permalink" 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">commitOrderClose</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderClosePayload</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>
32
  </code><button type="button">Copy</button></pre>
33
 
34
  <p>Forwards a signal-close event to the registered broker adapter.</p>
35
  <p>Called automatically via syncSubject when <code>enable()</code> is active.
36
  Skipped silently in backtest mode or when no adapter is registered.</p>
37
+ <a id="commitordercheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">commitOrderCheck<a href="#commitordercheck" aria-label="Permalink" 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">commitOrderCheck</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderCheckPayload</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>
38
  </code><button type="button">Copy</button></pre>
39
 
40
  <p>Forwards an order ping to the registered broker adapter.</p>
41
  <p>Called automatically via syncPendingSubject when <code>enable()</code> is active, on every live tick
42
  while a pending signal (payload.type &quot;active&quot;) or a scheduled signal (payload.type
43
+ &quot;schedule&quot;) is monitored β€” routed to <code>onOrderActiveCheck</code> / <code>onOrderScheduleCheck</code>
44
+ respectively. Skipped silently in backtest mode or when no adapter is registered.
45
+ Exceptions are NOT swallowed: a throw from the adapter propagates up to
46
  syncPendingSubject.next() β†’ CREATE_SYNC_PENDING_FN, which closes the position with &quot;closed&quot;
47
  (type &quot;active&quot;) or cancels the scheduled signal with reason &quot;user&quot; (type &quot;schedule&quot;).</p>
48
  <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>
 
83
  timeout), but the resting limit order on the exchange may have ALREADY filled by the time this
84
  arrives. The adapter MUST check the actual order status before cancelling: if the order is
85
  filled, cancelling is a no-op on the exchange and the adapter owns the resulting position
86
+ (close it or reconcile via onOrderActiveCheck / onSignalActivePing). The framework cannot model
87
  this case β€” from its side the signal is terminally cancelled.</p>
88
  <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>
89
  </code><button type="button">Copy</button></pre>
 
169
  <p>Clears the cached broker instance and resets the enable singleshot.
170
  Call this when process.cwd() changes between strategy iterations
171
  so a new broker instance is created with the updated base path.</p>
172
+ </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="#commitorderopen"><span>commit<wbr/>Order<wbr/>Open</span></a></li><li><a href="#commitorderclose"><span>commit<wbr/>Order<wbr/>Close</span></a></li><li><a href="#commitordercheck"><span>commit<wbr/>Order<wbr/>Check</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>
173
 
174
  <!-- Yandex.Metrika counter -->
175
  <script type="text/javascript">
documents/docs_class_BrokerBase.html CHANGED
@@ -25,8 +25,8 @@ Extend this class to implement a real exchange adapter for:</p>
25
  </ol>
26
  <p>Event flow (called only in live mode, skipped in backtest):</p>
27
  <ul>
28
- <li><code>onSignalOpenCommit</code> β€” new position opened</li>
29
- <li><code>onSignalCloseCommit</code> β€” position closed (SL/TP hit or manual close)</li>
30
  <li><code>onPartialProfitCommit</code> β€” partial close at profit executed</li>
31
  <li><code>onPartialLossCommit</code> β€” partial close at loss executed</li>
32
  <li><code>onTrailingStopCommit</code> β€” trailing stop-loss updated</li>
@@ -44,7 +44,7 @@ Extend this class to implement a real exchange adapter for:</p>
44
  <p>Called once by BrokerProxy via <code>waitForInit()</code> (singleshot) before the first event.
45
  Override to establish exchange connections, authenticate API clients, load configuration.</p>
46
  <p>Default implementation: Logs initialization event.</p>
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>
@@ -54,11 +54,12 @@ Use to place the actual entry order on the exchange.</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
- IBroker.onSignalOpenCommit 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>
 
62
  <p>Override to query the exchange for the order by <code>payload.signalId</code> and THROW ONLY when it is
63
  definitively NOT FOUND by that id (filled, cancelled, or liquidated externally) β€” the framework
64
  then closes the position with closeReason &quot;closed&quot;. The default implementation logs and returns
@@ -67,13 +68,28 @@ normally, which keeps the position under normal TP/SL monitoring.</p>
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 IBroker.onOrderCheck 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
@@ -96,7 +112,7 @@ for full guidance and example.</p>
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
@@ -124,7 +140,7 @@ exchange order by <code>payload.signalId</code>. See <a href="../interfaces/type
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>
@@ -134,7 +150,7 @@ Use to place the exit order and record final PnL.</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
- IBroker.onSignalCloseCommit 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,7 +197,7 @@ Use to partially close the position on the exchange at the loss level.</p>
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">
 
25
  </ol>
26
  <p>Event flow (called only in live mode, skipped in backtest):</p>
27
  <ul>
28
+ <li><code>onOrderOpenCommit</code> β€” new position opened</li>
29
+ <li><code>onOrderCloseCommit</code> β€” position closed (SL/TP hit or manual close)</li>
30
  <li><code>onPartialProfitCommit</code> β€” partial close at profit executed</li>
31
  <li><code>onPartialLossCommit</code> β€” partial close at loss executed</li>
32
  <li><code>onTrailingStopCommit</code> β€” trailing stop-loss updated</li>
 
44
  <p>Called once by BrokerProxy via <code>waitForInit()</code> (singleshot) before the first event.
45
  Override to establish exchange connections, authenticate API clients, load configuration.</p>
46
  <p>Default implementation: Logs initialization event.</p>
47
+ <a id="onorderopencommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderOpenCommit<a href="#onorderopencommit" aria-label="Permalink" 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">onOrderOpenCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerOrderOpenPayload</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>
 
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#onorderopencommit" class="tsd-kind-method"> IBroker.onOrderOpenCommit</a> for the full semantics.</p>
58
+ <a id="onorderactivecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderActiveCheck<a href="#onorderactivecheck" aria-label="Permalink" 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">onOrderActiveCheck</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerOrderCheckPayload</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 (open position) is monitored, BEFORE
62
+ TP/SL/time evaluation.</p>
63
  <p>Override to query the exchange for the order by <code>payload.signalId</code> and THROW ONLY when it is
64
  definitively NOT FOUND by that id (filled, cancelled, or liquidated externally) β€” the framework
65
  then closes the position with closeReason &quot;closed&quot;. The default implementation logs and returns
 
68
  normally instead of throwing. A thrown network error would wrongly close an open position; only
69
  a confirmed &quot;order not found by id&quot; response is a valid reason to throw.</p>
70
  <p>Manual wiring β€” EXCEPTION-BASED VARIANT: the throw-driven alternative to the imperative
71
+ commit-function wiring in <code>onSignalActivePing</code>. See <a href="../interfaces/types.IBroker.html#onorderactivecheck" class="tsd-kind-method"> IBroker.onOrderActiveCheck</a> for the
72
+ full comparison and example.</p>
73
+ <a id="onorderschedulecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderScheduleCheck<a href="#onorderschedulecheck" aria-label="Permalink" 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">onOrderScheduleCheck</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerOrderCheckPayload</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>Called on every live tick while a scheduled signal (resting entry order) is monitored, BEFORE
77
+ timeout/price-activation evaluation.</p>
78
+ <p>Override to query the exchange for the resting order by <code>payload.signalId</code> and THROW ONLY when
79
+ it is definitively NOT FOUND by that id β€” the framework then cancels the scheduled signal with
80
+ reason &quot;user&quot;. The default implementation logs and returns normally. A FILLED resting order
81
+ must be confirmed via <code>commitActivateScheduled</code>, not by throwing here.</p>
82
+ <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) β€” return
83
+ normally instead of throwing; only a confirmed &quot;order not found by id&quot; response is a valid
84
+ reason to throw.</p>
85
+ <p>Manual wiring β€” EXCEPTION-BASED VARIANT: the throw-driven alternative to the imperative
86
+ commit-function wiring in <code>onSignalSchedulePing</code>. See <a href="../interfaces/types.IBroker.html#onorderschedulecheck" class="tsd-kind-method"> IBroker.onOrderScheduleCheck</a> for
87
+ the full comparison and example.</p>
88
  <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>
89
  </code><button type="button">Copy</button></pre>
90
 
91
  <p>Called on every live tick while a pending (open) signal is monitored.</p>
92
+ <p>Purely informational mirror of the active-ping lifecycle β€” unlike <code>onOrderActiveCheck</code>, a throw here
93
  does NOT close the position. Override to mirror live monitoring state into your own systems.
94
  The default implementation logs.</p>
95
  <p>Manual wiring β€” EVENT-BASED: this is the primary per-tick hook to drive an open position from real exchange
 
112
  </code><button type="button">Copy</button></pre>
113
 
114
  <p>Called when a new scheduled signal is created and starts waiting for priceOpen activation.</p>
115
+ <p>The scheduled -&gt; active transition is reported via <code>onOrderOpenCommit</code>, not here. Override to
116
  place a resting/limit order on the exchange. The default logs.</p>
117
  <p>Manual wiring β€” EVENT-BASED: fires ONCE at creation β€” place the real resting order (tag it with
118
  <code>payload.signalId</code>) and optionally <code>commitActivateScheduled</code> / <code>commitCancelScheduled</code>. See
 
140
  <p>Manual wiring β€” EVENT-BASED (outbound): the strategy already removed the pending signal β€” flatten the real
141
  position and cancel leftover TP/SL orders by <code>payload.signalId</code>. See
142
  <a href="../interfaces/types.IBroker.html#onsignalpendingclose" class="tsd-kind-method"> IBroker.onSignalPendingClose</a>.</p>
143
+ <a id="onorderclosecommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderCloseCommit<a href="#onorderclosecommit" aria-label="Permalink" 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">onOrderCloseCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-5">BrokerOrderClosePayload</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>
144
  </code><button type="button">Copy</button></pre>
145
 
146
  <p>Called when a position is being closed (SL/TP hit or manual close).</p>
 
150
  <p>Manual wiring β€” EXCEPTION-BASED GATE: emitted BEFORE the framework mutates state, so a THROW here
151
  (e.g. exit order failed) SKIPS the close β€” the position stays open and the close retries next
152
  tick; return normally to let it close. Live-only (backtest short-circuits). See
153
+ <a href="../interfaces/types.IBroker.html#onorderclosecommit" class="tsd-kind-method"> IBroker.onOrderCloseCommit</a> for the full semantics.</p>
154
  <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>
155
  </code><button type="button">Copy</button></pre>
156
 
 
197
  <code>currentPrice</code> is the market price at which the new averaging entry is placed.
198
  <code>cost</code> is the dollar amount of the new DCA entry.</p>
199
  <p>Default implementation: Logs average buy event.</p>
200
+ </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="#onorderopencommit"><span>on<wbr/>Order<wbr/>Open<wbr/>Commit</span></a></li><li><a href="#onorderactivecheck"><span>on<wbr/>Order<wbr/>Active<wbr/>Check</span></a></li><li><a href="#onorderschedulecheck"><span>on<wbr/>Order<wbr/>Schedule<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="#onorderclosecommit"><span>on<wbr/>Order<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>
201
 
202
  <!-- Yandex.Metrika counter -->
203
  <script type="text/javascript">
documents/docs_class_ClientAction.html CHANGED
@@ -25,6 +25,12 @@
25
 
26
  <p>Handler instance created from params.handler constructor.
27
  Starts as null, gets initialized on first use.</p>
 
 
 
 
 
 
28
  <a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">waitForInit<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><pre><code class="ts"><span class="hl-9">waitForInit</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>
29
  </code><button type="button">Copy</button></pre>
30
 
@@ -99,7 +105,7 @@ NOT wrapped in trycatch β€” exceptions propagate to CREATE_SYNC_FN.</p>
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="#ordersync"><span>order<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">
 
25
 
26
  <p>Handler instance created from params.handler constructor.
27
  Starts as null, gets initialized on first use.</p>
28
+ <a id="_isdisposed" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_isDisposed<a href="#_isdisposed" aria-label="Permalink" 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">_isDisposed</span><span class="hl-2">: </span><span class="hl-5">boolean</span>
29
+ </code><button type="button">Copy</button></pre>
30
+
31
+ <p>Terminal flag set by dispose(). Once true, all event methods become no-ops:
32
+ the handler will not be recreated (waitForInit is singleshot), so late
33
+ events must not reach the schema callbacks either.</p>
34
  <a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">waitForInit<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><pre><code class="ts"><span class="hl-9">waitForInit</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>
35
  </code><button type="button">Copy</button></pre>
36
 
 
105
 
106
  <p>Gate for the pending-order ping (order still open on exchange?).
107
  NOT wrapped in trycatch β€” exceptions propagate to CREATE_SYNC_PENDING_FN.</p>
108
+ </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="#_isdisposed"><span>_is<wbr/>Disposed</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="#ordersync"><span>order<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>
109
 
110
  <!-- Yandex.Metrika counter -->
111
  <script type="text/javascript">
documents/docs_class_ClientRisk.html CHANGED
@@ -18,8 +18,18 @@ allowing cross-strategy risk analysis.</p>
18
  </code><button type="button">Copy</button></pre>
19
 
20
  <p>Map of active positions tracked across all strategies.
21
- Key: <code>${strategyName}:${exchangeName}:${symbol}</code>
22
  Starts as POSITION_NEED_FETCH symbol, gets initialized on first use.</p>
 
 
 
 
 
 
 
 
 
 
23
  <a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">waitForInit<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><pre><code class="ts"><span class="hl-9">waitForInit</span><span class="hl-2">: </span><span class="hl-5">any</span>
24
  </code><button type="button">Copy</button></pre>
25
 
@@ -72,7 +82,7 @@ Called by StrategyConnectionService after signal is opened.</p>
72
 
73
  <p>Removes a closed signal.
74
  Called by StrategyConnectionService when signal is closed.</p>
75
- </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="#clientrisk"><span>Client<wbr/>Risk</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="#_activepositions"><span>_active<wbr/>Positions</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#_updatepositions"><span>_update<wbr/>Positions</span></a></li><li><a href="#checksignal"><span>check<wbr/>Signal</span></a></li><li><a href="#checksignalandreserve"><span>check<wbr/>Signal<wbr/>And<wbr/>Reserve</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#addsignal"><span>add<wbr/>Signal</span></a></li><li><a href="#removesignal"><span>remove<wbr/>Signal</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>
76
 
77
  <!-- Yandex.Metrika counter -->
78
  <script type="text/javascript">
 
18
  </code><button type="button">Copy</button></pre>
19
 
20
  <p>Map of active positions tracked across all strategies.
21
+ Key: <code>${strategyName}_${exchangeName}_${symbol}</code> (see CREATE_NAME_FN)
22
  Starts as POSITION_NEED_FETCH symbol, gets initialized on first use.</p>
23
+ <a id="_reservedkeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">_reservedKeys<a href="#_reservedkeys" aria-label="Permalink" 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">_reservedKeys</span><span class="hl-2">: </span><span class="hl-5">Set</span><span class="hl-2">&lt;</span><span class="hl-5">string</span><span class="hl-2">&gt;</span>
24
+ </code><button type="button">Copy</button></pre>
25
+
26
+ <p>Keys of transient reservation placeholders (checkSignalAndReserve) still
27
+ awaiting their finalizing addSignal / releasing removeSignal. Excluded from
28
+ persisted snapshots in _updatePositions: a reservation is process-transient,
29
+ but a CONCURRENT strategy's addSignal persists the whole shared map β€” flushed
30
+ to disk that placeholder would survive a crash as a phantom position and
31
+ block the shared concurrency limit for the whole signal lifetime (forever
32
+ for minuteEstimatedTime: Infinity, which the expiry pruning never removes).</p>
33
  <a id="waitforinit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">waitForInit<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><pre><code class="ts"><span class="hl-9">waitForInit</span><span class="hl-2">: </span><span class="hl-5">any</span>
34
  </code><button type="button">Copy</button></pre>
35
 
 
82
 
83
  <p>Removes a closed signal.
84
  Called by StrategyConnectionService when signal is closed.</p>
85
+ </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="#clientrisk"><span>Client<wbr/>Risk</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="#_activepositions"><span>_active<wbr/>Positions</span></a></li><li><a href="#_reservedkeys"><span>_reserved<wbr/>Keys</span></a></li><li><a href="#waitforinit"><span>wait<wbr/>For<wbr/>Init</span></a></li><li><a href="#_updatepositions"><span>_update<wbr/>Positions</span></a></li><li><a href="#checksignal"><span>check<wbr/>Signal</span></a></li><li><a href="#checksignalandreserve"><span>check<wbr/>Signal<wbr/>And<wbr/>Reserve</span></a></li></ul></li><li><a href="#methods"><span>Methods</span></a></li><li><ul><li><a href="#addsignal"><span>add<wbr/>Signal</span></a></li><li><a href="#removesignal"><span>remove<wbr/>Signal</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>
86
 
87
  <!-- Yandex.Metrika counter -->
88
  <script type="text/javascript">
documents/docs_class_CronUtils.html CHANGED
@@ -117,9 +117,17 @@ They just sit unused until they are GC'd here or wiped by <code>clear()</code>.<
117
  <p>Build the singleshot promise for a single in-flight slot.</p>
118
  <p>Assembles the <a href="../interfaces/types.IRuntimeInfo.html" class="tsd-kind-interface"> IRuntimeInfo</a> snapshot via
119
  <code>RuntimeMetaService.getRuntimeInfo(symbol, context, backtest)</code> and invokes
120
- <code>entry.handler(info)</code>. Logs any error via <code>console.error</code> and <strong>returns</strong> a
121
- <code>failed</code> boolean (<code>true</code> when the handler β€” or the runtime-info assembly β€”
122
- threw) so the caller (<code>_tick</code>) can roll back the periodic watermark of the
 
 
 
 
 
 
 
 
123
  slot it opened and retry that boundary. The error is <strong>not</strong> rethrown, so a
124
  failing handler never produces an unhandled rejection. Clears the
125
  <code>_inFlight</code> slot in <code>.finally()</code> so the next boundary produces a fresh
 
117
  <p>Build the singleshot promise for a single in-flight slot.</p>
118
  <p>Assembles the <a href="../interfaces/types.IRuntimeInfo.html" class="tsd-kind-interface"> IRuntimeInfo</a> snapshot via
119
  <code>RuntimeMetaService.getRuntimeInfo(symbol, context, backtest)</code> and invokes
120
+ <code>entry.handler(info)</code>, racing both against the
121
+ CRON_HANDLER_TIMEOUT watchdog β€” a slot that does not settle in time
122
+ rejects into the same <code>catch</code> as any other error, so a hung handler (or a
123
+ hung price fetch inside <code>getRuntimeInfo</code>) can never hold the <code>_inFlight</code>
124
+ slot forever and stall the serialised tick pipeline. A slot still running
125
+ at CRON_HANDLER_WARN_TIMEOUT logs an observational warning first,
126
+ so a slow handler is visible in the logs well before the watchdog forcibly
127
+ fails it. Logs any error via
128
+ <code>console.error</code> and <strong>returns</strong> a <code>failed</code> boolean (<code>true</code> when the
129
+ handler β€” or the runtime-info assembly β€” threw or timed out) so the caller
130
+ (<code>_tick</code>) can roll back the periodic watermark of the
131
  slot it opened and retry that boundary. The error is <strong>not</strong> rethrown, so a
132
  failing handler never produces an unhandled rejection. Clears the
133
  <code>_inFlight</code> slot in <code>.finally()</code> so the next boundary produces a fresh
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_symbol4546" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4546<a href="#__wait_for_init_symbol4546" aria-label="Permalink" 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">4546</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_symbol4547" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4547<a href="#__write_safe_symbol4547" aria-label="Permalink" 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">4547</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_symbol4546"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4546</span></a></li><li><a href="#__write_safe_symbol4547"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4547</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_symbol4589" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4589<a href="#__wait_for_init_symbol4589" aria-label="Permalink" 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">4589</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_symbol4590" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4590<a href="#__write_safe_symbol4590" aria-label="Permalink" 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">4590</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_symbol4589"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4589</span></a></li><li><a href="#__write_safe_symbol4590"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4590</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_NotificationAdapter.html CHANGED
@@ -9,7 +9,7 @@
9
  <a id="constructor" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Constructor<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></h2><pre><code class="ts"><span class="hl-1">constructor</span><span class="hl-2">();</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- <a id="properties" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Properties<a href="#properties" aria-label="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="enable" class="tsd-anchor"></a><h3 class="tsd-anchor-link">enable<a href="#enable" aria-label="Permalink" 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">enable</span><span class="hl-2">: (({ </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">info</span><span class="hl-2">, </span><span class="hl-5">partial_profit</span><span class="hl-2">, </span><span class="hl-5">partial_loss</span><span class="hl-2">, </span><span class="hl-5">breakeven</span><span class="hl-2">, </span><span class="hl-5">strategy_commit</span><span class="hl-2">, </span><span class="hl-5">signal_sync</span><span class="hl-2">, </span><span class="hl-5">risk</span><span class="hl-2">, </span><span class="hl-5">common_error</span><span class="hl-2">, </span><span class="hl-5">critical_error</span><span class="hl-2">, </span><span class="hl-5">validation_error</span><span class="hl-2">, }?: </span><span class="hl-10">INotificationTarget</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> () </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-4">void</span><span class="hl-2">) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;({ </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">info</span><span class="hl-2">, </span><span class="hl-5">partial_profit</span><span class="hl-2">, </span><span class="hl-5">partial_loss</span><span class="hl-2">, </span><span class="hl-5">breakeven</span><span class="hl-2">, </span><span class="hl-5">strategy_commit</span><span class="hl-2">, </span><span class="hl-5">signal_sync</span><span class="hl-2">, </span><span class="hl-5">risk</span><span class="hl-2">, </span><span class="hl-5">common_error</span><span class="hl-2">, cri...</span>
13
  </code><button type="button">Copy</button></pre>
14
 
15
  <p>Enables notification storage by subscribing to signal emitters.
 
9
  <a id="constructor" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Constructor<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></h2><pre><code class="ts"><span class="hl-1">constructor</span><span class="hl-2">();</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ <a id="properties" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Properties<a href="#properties" aria-label="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="enable" class="tsd-anchor"></a><h3 class="tsd-anchor-link">enable<a href="#enable" aria-label="Permalink" 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">enable</span><span class="hl-2">: (({ </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">info</span><span class="hl-2">, </span><span class="hl-5">partial_profit</span><span class="hl-2">, </span><span class="hl-5">partial_loss</span><span class="hl-2">, </span><span class="hl-5">breakeven</span><span class="hl-2">, </span><span class="hl-5">strategy_commit</span><span class="hl-2">, </span><span class="hl-5">order_sync</span><span class="hl-2">, </span><span class="hl-5">order_check</span><span class="hl-2">, </span><span class="hl-5">risk</span><span class="hl-2">, </span><span class="hl-5">common_error</span><span class="hl-2">, </span><span class="hl-5">critical_error</span><span class="hl-2">, </span><span class="hl-5">validation_error</span><span class="hl-2">, }?: </span><span class="hl-10">INotificationTarget</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> () </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-4">void</span><span class="hl-2">) &amp; </span><span class="hl-5">ISingleshotClearable</span><span class="hl-2">&lt;({ </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">info</span><span class="hl-2">, </span><span class="hl-5">partial_profit</span><span class="hl-2">, </span><span class="hl-5">partial_loss</span><span class="hl-2">, </span><span class="hl-5">breakeven</span><span class="hl-2">, </span><span class="hl-5">strategy_commit</span><span class="hl-2">, </span><span class="hl-5">order_sync</span><span class="hl-2">, </span><span class="hl-5">order_check</span><span class="hl-2">,...</span>
13
  </code><button type="button">Copy</button></pre>
14
 
15
  <p>Enables notification storage by subscribing to signal emitters.
documents/docs_class_NotificationBacktestAdapter.html CHANGED
@@ -54,6 +54,11 @@ Proxies call to the underlying notification adapter.</p>
54
 
55
  <p>Handles signal sync events (signal-open, signal-close).
56
  Proxies call to the underlying notification adapter.</p>
 
 
 
 
 
57
  <a id="handlerisk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleRisk<a href="#handlerisk" aria-label="Permalink" 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">handleRisk</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">RiskContract</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>
58
  </code><button type="button">Copy</button></pre>
59
 
@@ -110,7 +115,7 @@ Notifications will be persisted to disk.</p>
110
  <p>Clears the memoized utils instance.
111
  Call this when process.cwd() changes between strategy iterations
112
  so a new instance is created with the updated base path.</p>
113
- </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="#notificationbacktestadapter"><span>Notification<wbr/>Backtest<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="#_notificationbacktestfactory"><span>_notification<wbr/>Backtest<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#handlesignal"><span>handle<wbr/>Signal</span></a></li><li><a href="#handlesignalnotify"><span>handle<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#handlepartialprofit"><span>handle<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#handlepartialloss"><span>handle<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#handlebreakeven"><span>handle<wbr/>Breakeven</span></a></li><li><a href="#handlestrategycommit"><span>handle<wbr/>Strategy<wbr/>Commit</span></a></li><li><a href="#handlesync"><span>handle<wbr/>Sync</span></a></li><li><a href="#handlerisk"><span>handle<wbr/>Risk</span></a></li><li><a href="#handleerror"><span>handle<wbr/>Error</span></a></li><li><a href="#handlecriticalerror"><span>handle<wbr/>Critical<wbr/>Error</span></a></li><li><a href="#handlevalidationerror"><span>handle<wbr/>Validation<wbr/>Error</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#usenotificationadapter"><span>use<wbr/>Notification<wbr/>Adapter</span></a></li><li><a href="#usedummy"><span>use<wbr/>Dummy</span></a></li><li><a href="#usememory"><span>use<wbr/>Memory</span></a></li><li><a href="#usepersist"><span>use<wbr/>Persist</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>
114
 
115
  <!-- Yandex.Metrika counter -->
116
  <script type="text/javascript">
 
54
 
55
  <p>Handles signal sync events (signal-open, signal-close).
56
  Proxies call to the underlying notification adapter.</p>
57
+ <a id="handlecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleCheck<a href="#handlecheck" aria-label="Permalink" 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">handleCheck</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">OrderCheckContract</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">any</span>
58
+ </code><button type="button">Copy</button></pre>
59
+
60
+ <p>Handles order-ping check event.
61
+ Proxies call to the underlying notification adapter.</p>
62
  <a id="handlerisk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleRisk<a href="#handlerisk" aria-label="Permalink" 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">handleRisk</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">RiskContract</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>
63
  </code><button type="button">Copy</button></pre>
64
 
 
115
  <p>Clears the memoized utils instance.
116
  Call this when process.cwd() changes between strategy iterations
117
  so a new instance is created with the updated base path.</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="#notificationbacktestadapter"><span>Notification<wbr/>Backtest<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="#_notificationbacktestfactory"><span>_notification<wbr/>Backtest<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#handlesignal"><span>handle<wbr/>Signal</span></a></li><li><a href="#handlesignalnotify"><span>handle<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#handlepartialprofit"><span>handle<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#handlepartialloss"><span>handle<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#handlebreakeven"><span>handle<wbr/>Breakeven</span></a></li><li><a href="#handlestrategycommit"><span>handle<wbr/>Strategy<wbr/>Commit</span></a></li><li><a href="#handlesync"><span>handle<wbr/>Sync</span></a></li><li><a href="#handlecheck"><span>handle<wbr/>Check</span></a></li><li><a href="#handlerisk"><span>handle<wbr/>Risk</span></a></li><li><a href="#handleerror"><span>handle<wbr/>Error</span></a></li><li><a href="#handlecriticalerror"><span>handle<wbr/>Critical<wbr/>Error</span></a></li><li><a href="#handlevalidationerror"><span>handle<wbr/>Validation<wbr/>Error</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#usenotificationadapter"><span>use<wbr/>Notification<wbr/>Adapter</span></a></li><li><a href="#usedummy"><span>use<wbr/>Dummy</span></a></li><li><a href="#usememory"><span>use<wbr/>Memory</span></a></li><li><a href="#usepersist"><span>use<wbr/>Persist</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>
119
 
120
  <!-- Yandex.Metrika counter -->
121
  <script type="text/javascript">
documents/docs_class_NotificationLiveAdapter.html CHANGED
@@ -54,6 +54,11 @@ Proxies call to the underlying notification adapter.</p>
54
 
55
  <p>Handles signal sync events (signal-open, signal-close).
56
  Proxies call to the underlying notification adapter.</p>
 
 
 
 
 
57
  <a id="handlerisk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleRisk<a href="#handlerisk" aria-label="Permalink" 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">handleRisk</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">RiskContract</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>
58
  </code><button type="button">Copy</button></pre>
59
 
@@ -110,7 +115,7 @@ Notifications will be persisted to disk.</p>
110
  <p>Clears the memoized utils instance.
111
  Call this when process.cwd() changes between strategy iterations
112
  so a new instance is created with the updated base path.</p>
113
- </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="#notificationliveadapter"><span>Notification<wbr/>Live<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="#_notificationlivefactory"><span>_notification<wbr/>Live<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#handlesignal"><span>handle<wbr/>Signal</span></a></li><li><a href="#handlesignalnotify"><span>handle<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#handlepartialprofit"><span>handle<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#handlepartialloss"><span>handle<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#handlebreakeven"><span>handle<wbr/>Breakeven</span></a></li><li><a href="#handlestrategycommit"><span>handle<wbr/>Strategy<wbr/>Commit</span></a></li><li><a href="#handlesync"><span>handle<wbr/>Sync</span></a></li><li><a href="#handlerisk"><span>handle<wbr/>Risk</span></a></li><li><a href="#handleerror"><span>handle<wbr/>Error</span></a></li><li><a href="#handlecriticalerror"><span>handle<wbr/>Critical<wbr/>Error</span></a></li><li><a href="#handlevalidationerror"><span>handle<wbr/>Validation<wbr/>Error</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#usenotificationadapter"><span>use<wbr/>Notification<wbr/>Adapter</span></a></li><li><a href="#usedummy"><span>use<wbr/>Dummy</span></a></li><li><a href="#usememory"><span>use<wbr/>Memory</span></a></li><li><a href="#usepersist"><span>use<wbr/>Persist</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>
114
 
115
  <!-- Yandex.Metrika counter -->
116
  <script type="text/javascript">
 
54
 
55
  <p>Handles signal sync events (signal-open, signal-close).
56
  Proxies call to the underlying notification adapter.</p>
57
+ <a id="handlecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleCheck<a href="#handlecheck" aria-label="Permalink" 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">handleCheck</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">OrderCheckContract</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">any</span>
58
+ </code><button type="button">Copy</button></pre>
59
+
60
+ <p>Handles order-ping check event.
61
+ Proxies call to the underlying notification adapter.</p>
62
  <a id="handlerisk" class="tsd-anchor"></a><h3 class="tsd-anchor-link">handleRisk<a href="#handlerisk" aria-label="Permalink" 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">handleRisk</span><span class="hl-2">: (</span><span class="hl-5">data</span><span class="hl-2">: </span><span class="hl-10">RiskContract</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>
63
  </code><button type="button">Copy</button></pre>
64
 
 
115
  <p>Clears the memoized utils instance.
116
  Call this when process.cwd() changes between strategy iterations
117
  so a new instance is created with the updated base path.</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="#notificationliveadapter"><span>Notification<wbr/>Live<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="#_notificationlivefactory"><span>_notification<wbr/>Live<wbr/>Factory</span></a></li><li><a href="#getinstance"><span>get<wbr/>Instance</span></a></li><li><a href="#handlesignal"><span>handle<wbr/>Signal</span></a></li><li><a href="#handlesignalnotify"><span>handle<wbr/>Signal<wbr/>Notify</span></a></li><li><a href="#handlepartialprofit"><span>handle<wbr/>Partial<wbr/>Profit</span></a></li><li><a href="#handlepartialloss"><span>handle<wbr/>Partial<wbr/>Loss</span></a></li><li><a href="#handlebreakeven"><span>handle<wbr/>Breakeven</span></a></li><li><a href="#handlestrategycommit"><span>handle<wbr/>Strategy<wbr/>Commit</span></a></li><li><a href="#handlesync"><span>handle<wbr/>Sync</span></a></li><li><a href="#handlecheck"><span>handle<wbr/>Check</span></a></li><li><a href="#handlerisk"><span>handle<wbr/>Risk</span></a></li><li><a href="#handleerror"><span>handle<wbr/>Error</span></a></li><li><a href="#handlecriticalerror"><span>handle<wbr/>Critical<wbr/>Error</span></a></li><li><a href="#handlevalidationerror"><span>handle<wbr/>Validation<wbr/>Error</span></a></li><li><a href="#getdata"><span>get<wbr/>Data</span></a></li><li><a href="#dispose"><span>dispose</span></a></li><li><a href="#usenotificationadapter"><span>use<wbr/>Notification<wbr/>Adapter</span></a></li><li><a href="#usedummy"><span>use<wbr/>Dummy</span></a></li><li><a href="#usememory"><span>use<wbr/>Memory</span></a></li><li><a href="#usepersist"><span>use<wbr/>Persist</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>
119
 
120
  <!-- Yandex.Metrika counter -->
121
  <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_symbol3694" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@BASE_WAIT_FOR_INIT_SYMBOL@3694<a href="#__base_wait_for_init_symbol3694" aria-label="Permalink" 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">3694</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_symbol3694"><span>__@BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@3694</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_symbol3737" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@BASE_WAIT_FOR_INIT_SYMBOL@3737<a href="#__base_wait_for_init_symbol3737" aria-label="Permalink" 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">3737</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_symbol3737"><span>__@BASE_<wbr/>WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@3737</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_symbol4546" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4546<a href="#__wait_for_init_symbol4546" aria-label="Permalink" 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">4546</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_symbol4547" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4547<a href="#__write_safe_symbol4547" aria-label="Permalink" 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">4547</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_symbol4546"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4546</span></a></li><li><a href="#__write_safe_symbol4547"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4547</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_symbol4589" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WAIT_FOR_INIT_SYMBOL@4589<a href="#__wait_for_init_symbol4589" aria-label="Permalink" 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">4589</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_symbol4590" class="tsd-anchor"></a><h3 class="tsd-anchor-link">__@WRITE_SAFE_SYMBOL@4590<a href="#__write_safe_symbol4590" aria-label="Permalink" 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">4590</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_symbol4589"><span>__@WAIT_<wbr/>FOR_<wbr/>INIT_<wbr/>SYMBOL@4589</span></a></li><li><a href="#__write_safe_symbol4590"><span>__@WRITE_<wbr/>SAFE_<wbr/>SYMBOL@4590</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_function_getConfig.html CHANGED
@@ -1,4 +1,4 @@
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/getConfig | 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_getConfig.html">docs/function/getConfig</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="getconfig" class="tsd-anchor"></a><h1 class="tsd-anchor-link">getConfig<a href="#getconfig" aria-label="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">getConfig</span><span class="hl-2">(): {</span><br/><span class="hl-2"> </span><span class="hl-5">CC_SCHEDULE_AWAIT_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AVG_PRICE_CANDLES_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_SLIPPAGE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_FEE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_TAKEPROFIT_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_LIFETIME_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_GENERATION_SECONDS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_DELAY_MS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_CANDLES_PER_REQUEST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_PRICE_ANOMALY_THRESHOLD_FACTOR</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_MIN_CANDLES_FOR_MEDIAN</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_REPORT_SHOW_SIGNAL_NOTE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_BREAKEVEN_THRESHOLD</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_TIME_OFFSET_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_MAX_DEPTH_LEVELS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AGGREGATED_TRADES_MAX_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BACKTEST_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BREAKEVEN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HEATMAP_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HIGHEST_PROFIT_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_MAX_DRAWDOWN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LIVE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PARTIAL_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_RISK_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SCHEDULE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STRATEGY_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SYNC_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_WALKER_MARKDOWN_TOP_N</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PERFORMANCE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_NOTIFICATIONS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNALS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LOG_LINES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_CANDLE_FETCH_MUTEX</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_BACKTEST_PARALLEL_SPIN</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_DCA_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_PPPL_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_LONG_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_SHORT_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_TRAILING_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_POSITION_ENTRY_COST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2">};</span>
2
  </code><button type="button">Copy</button></pre>
3
 
4
  <p>Retrieves a copy of the current global configuration.</p>
 
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/getConfig | 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_getConfig.html">docs/function/getConfig</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="getconfig" class="tsd-anchor"></a><h1 class="tsd-anchor-link">getConfig<a href="#getconfig" aria-label="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">getConfig</span><span class="hl-2">(): {</span><br/><span class="hl-2"> </span><span class="hl-5">CC_SCHEDULE_AWAIT_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AVG_PRICE_CANDLES_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_SLIPPAGE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_FEE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_TAKEPROFIT_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_LIFETIME_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_GENERATION_SECONDS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_DELAY_MS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_CANDLES_PER_REQUEST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_PRICE_ANOMALY_THRESHOLD_FACTOR</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_MIN_CANDLES_FOR_MEDIAN</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_REPORT_SHOW_SIGNAL_NOTE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_BREAKEVEN_THRESHOLD</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_TIME_OFFSET_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_MAX_DEPTH_LEVELS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AGGREGATED_TRADES_MAX_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BACKTEST_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BREAKEVEN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HEATMAP_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HIGHEST_PROFIT_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_MAX_DRAWDOWN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LIVE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PARTIAL_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_RISK_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SCHEDULE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STRATEGY_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SYNC_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_WALKER_MARKDOWN_TOP_N</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PERFORMANCE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_NOTIFICATIONS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_NOTIFICATION_ORDER_CHECK_TTL</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNALS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LOG_LINES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_CANDLE_FETCH_MUTEX</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_BACKTEST_PARALLEL_SPIN</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_DCA_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_PPPL_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_LONG_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_SHORT_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_TRAILING_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_POSITION_ENTRY_COST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2">};</span>
2
  </code><button type="button">Copy</button></pre>
3
 
4
  <p>Retrieves a copy of the current global configuration.</p>
documents/docs_function_getDefaultConfig.html CHANGED
@@ -1,4 +1,4 @@
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/getDefaultConfig | 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_getDefaultConfig.html">docs/function/getDefaultConfig</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="getdefaultconfig" class="tsd-anchor"></a><h1 class="tsd-anchor-link">getDefaultConfig<a href="#getdefaultconfig" aria-label="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">getDefaultConfig</span><span class="hl-2">(): </span><span class="hl-10">Readonly</span><span class="hl-2">&lt;{</span><br/><span class="hl-2"> </span><span class="hl-5">CC_SCHEDULE_AWAIT_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AVG_PRICE_CANDLES_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_SLIPPAGE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_FEE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_TAKEPROFIT_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_LIFETIME_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_GENERATION_SECONDS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_DELAY_MS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_CANDLES_PER_REQUEST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_PRICE_ANOMALY_THRESHOLD_FACTOR</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_MIN_CANDLES_FOR_MEDIAN</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_REPORT_SHOW_SIGNAL_NOTE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_BREAKEVEN_THRESHOLD</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_TIME_OFFSET_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_MAX_DEPTH_LEVELS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AGGREGATED_TRADES_MAX_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BACKTEST_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BREAKEVEN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HEATMAP_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HIGHEST_PROFIT_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_MAX_DRAWDOWN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LIVE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PARTIAL_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_RISK_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SCHEDULE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STRATEGY_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SYNC_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_WALKER_MARKDOWN_TOP_N</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PERFORMANCE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_NOTIFICATIONS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNALS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LOG_LINES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_CANDLE_FETCH_MUTEX</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_BACKTEST_PARALLEL_SPIN</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_DCA_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_PPPL_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_LONG_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_SHORT_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_TRAILING_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_POSITION_ENTRY_COST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2">}&gt;;</span>
2
  </code><button type="button">Copy</button></pre>
3
 
4
  <p>Retrieves the default configuration object for the framework.</p>
 
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/getDefaultConfig | 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_getDefaultConfig.html">docs/function/getDefaultConfig</a></li></ul></div><div class="tsd-panel tsd-typography"><a id="getdefaultconfig" class="tsd-anchor"></a><h1 class="tsd-anchor-link">getDefaultConfig<a href="#getdefaultconfig" aria-label="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">getDefaultConfig</span><span class="hl-2">(): </span><span class="hl-10">Readonly</span><span class="hl-2">&lt;{</span><br/><span class="hl-2"> </span><span class="hl-5">CC_SCHEDULE_AWAIT_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AVG_PRICE_CANDLES_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_SLIPPAGE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_PERCENT_FEE</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_TAKEPROFIT_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MIN_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STOPLOSS_DISTANCE_PERCENT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_LIFETIME_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNAL_GENERATION_SECONDS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_COUNT</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_RETRY_DELAY_MS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_CANDLES_PER_REQUEST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_PRICE_ANOMALY_THRESHOLD_FACTOR</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_GET_CANDLES_MIN_CANDLES_FOR_MEDIAN</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_REPORT_SHOW_SIGNAL_NOTE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_BREAKEVEN_THRESHOLD</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_TIME_OFFSET_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ORDER_BOOK_MAX_DEPTH_LEVELS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_AGGREGATED_TRADES_MAX_MINUTES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BACKTEST_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_BREAKEVEN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HEATMAP_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_HIGHEST_PROFIT_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_MAX_DRAWDOWN_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LIVE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PARTIAL_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_RISK_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SCHEDULE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_STRATEGY_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SYNC_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_WALKER_MARKDOWN_TOP_N</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_PERFORMANCE_MARKDOWN_ROWS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_NOTIFICATIONS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_NOTIFICATION_ORDER_CHECK_TTL</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_SIGNALS</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_MAX_LOG_LINES</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_CANDLE_FETCH_MUTEX</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_BACKTEST_PARALLEL_SPIN</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_DCA_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_PPPL_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_LONG_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_SHORT_SIGNAL</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_ENABLE_TRAILING_EVERYWHERE</span><span class="hl-2">: </span><span class="hl-10">boolean</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-5">CC_POSITION_ENTRY_COST</span><span class="hl-2">: </span><span class="hl-10">number</span><span class="hl-2">;</span><br/><span class="hl-2">}&gt;;</span>
2
  </code><button type="button">Copy</button></pre>
3
 
4
  <p>Retrieves the default configuration object for the framework.</p>
documents/docs_interface_IAction.html CHANGED
@@ -106,7 +106,7 @@ Frequency: Only when signal is rejected (not emitted for allowed signals)</p>
106
  Throw to reject β€” framework will retry on next tick.</p>
107
  <p>NOTE: Exceptions are NOT swallowed here β€” they propagate to CREATE_SYNC_FN.</p>
108
  <p>MANUAL WIRING β€” EXCEPTION-BASED GATE: action-side equivalent of the Broker
109
- <code>onSignalOpenCommit</code> / <code>onSignalCloseCommit</code>. Throw on &quot;signal-open&quot; β†’ open rolls back to idle
110
  (scheduled activation cancelled); throw on &quot;signal-close&quot; β†’ close skipped, position stays open;
111
  retried next tick. Same <code>syncSubject</code> emission as the Broker commit hooks (collapsed to false by
112
  CREATE_SYNC_FN). Live-only. Implement via the IActionCallbacks.onOrderSync callback.</p>
 
106
  Throw to reject β€” framework will retry on next tick.</p>
107
  <p>NOTE: Exceptions are NOT swallowed here β€” they propagate to CREATE_SYNC_FN.</p>
108
  <p>MANUAL WIRING β€” EXCEPTION-BASED GATE: action-side equivalent of the Broker
109
+ <code>onOrderOpenCommit</code> / <code>onOrderCloseCommit</code>. Throw on &quot;signal-open&quot; β†’ open rolls back to idle
110
  (scheduled activation cancelled); throw on &quot;signal-close&quot; β†’ close skipped, position stays open;
111
  retried next tick. Same <code>syncSubject</code> emission as the Broker commit hooks (collapsed to false by
112
  CREATE_SYNC_FN). Live-only. Implement via the IActionCallbacks.onOrderSync callback.</p>
documents/docs_interface_IActionCallbacks.html CHANGED
@@ -132,7 +132,7 @@ Return false (or throw) to reject the operation β€” framework will retry on next
132
  They propagate up to CREATE_SYNC_FN which catches them and returns false.
133
  Throw to reject the operation β€” framework will retry on next tick.</p>
134
  <p>MANUAL WIRING β€” EXCEPTION-BASED GATE: the action-side equivalent of the Broker
135
- <code>onSignalOpenCommit</code> / <code>onSignalCloseCommit</code> gate. Throwing (or returning false) on
136
  <code>event.action === &quot;signal-open&quot;</code> rolls the open back to idle (a scheduled activation is
137
  cancelled); on <code>&quot;signal-close&quot;</code> it skips the close and leaves the position open β€” retried next
138
  tick. Rides the same <code>syncSubject</code> emission as the Broker commit hooks, so a throw from either is
 
132
  They propagate up to CREATE_SYNC_FN which catches them and returns false.
133
  Throw to reject the operation β€” framework will retry on next tick.</p>
134
  <p>MANUAL WIRING β€” EXCEPTION-BASED GATE: the action-side equivalent of the Broker
135
+ <code>onOrderOpenCommit</code> / <code>onOrderCloseCommit</code> gate. Throwing (or returning false) on
136
  <code>event.action === &quot;signal-open&quot;</code> rolls the open back to idle (a scheduled activation is
137
  cancelled); on <code>&quot;signal-close&quot;</code> it skips the close and leaves the position open β€” retried next
138
  tick. Rides the same <code>syncSubject</code> emission as the Broker commit hooks, so a throw from either is
documents/docs_interface_IBroker.html CHANGED
@@ -8,7 +8,7 @@ never receives backtest traffic.</p>
8
  </code><button type="button">Copy</button></pre>
9
 
10
  <p>Called once before first use. Connect to exchange, load credentials, etc.</p>
11
- <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-9">onSignalCloseCommit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalClosePayload</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>
12
  </code><button type="button">Copy</button></pre>
13
 
14
  <p>Called when a signal is being closed (take-profit, stop-loss, or manual close). Emitted via
@@ -21,7 +21,7 @@ normally to let the close proceed. Backtest short-circuits this (no live exchang
21
  live-only.</p>
22
  <p>This differs from <code>onSignalPendingClose</code>, which is the informational lifecycle hook that fires
23
  AFTER the close is committed (and cannot veto it).</p>
24
- <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-9">onSignalOpenCommit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalOpenPayload</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>
25
  </code><button type="button">Copy</button></pre>
26
 
27
  <p>Called when an order is being opened. Emitted via syncSubject BEFORE the framework mutates
@@ -31,7 +31,7 @@ strategy state, so it is also the open <strong>gate</strong>. Discriminated by <
31
  <li>&quot;schedule&quot; β€” PLACEMENT of the resting entry order at scheduled-signal creation.</li>
32
  </ul>
33
  <p>MANUAL WIRING β€” EXCEPTION-BASED: place the real order here (tag the exchange order with
34
- <code>payload.signalId</code> so later <code>onOrderCheck</code> / <code>onSignalActivePing</code> can find it). Like <code>onOrderSync</code>
35
  (signal-open) it shares the gate semantics β€” a THROW means &quot;the exchange did not accept/fill the
36
  order&quot; and the framework ROLLS BACK: for type &quot;active&quot; the pending signal returns to idle (a
37
  scheduled activation is cancelled); for type &quot;schedule&quot; the scheduled signal is NOT registered
@@ -39,20 +39,14 @@ and the risk reservation is released. Both retry on the next tick. Return normal
39
  open proceed. Backtest short-circuits this, so the gate is live-only.</p>
40
  <p>This differs from <code>onSignalPendingOpen</code>, which is the informational lifecycle hook that fires
41
  AFTER the open is committed (and cannot veto it).</p>
42
- <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-9">onOrderCheck</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerSignalPendingPayload</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>
43
  </code><button type="button">Copy</button></pre>
44
 
45
- <p>Called on every live tick while a signal is monitored, BEFORE completion evaluation.
46
- Fires for both monitored states, discriminated by <code>payload.type</code>:</p>
47
- <ul>
48
- <li>&quot;active&quot; β€” pending signal (open position), before TP/SL/time evaluation;</li>
49
- <li>&quot;schedule&quot; β€” scheduled signal (resting entry order), before timeout/price-activation.</li>
50
- </ul>
51
  <p>Query the exchange by <code>payload.signalId</code> and THROW ONLY when the order is NOT FOUND by that id
52
- β€” the framework will then close the position with closeReason &quot;closed&quot; (type &quot;active&quot;) or
53
- cancel the scheduled signal with reason &quot;user&quot; (type &quot;schedule&quot;). Return normally to keep
54
- monitoring. For type &quot;schedule&quot;: a filled resting order must be confirmed via
55
- <code>commitActivateScheduled</code>, not by throwing here (a throw is a terminal cancel).</p>
56
  <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) β€” return
57
  normally instead of throwing, otherwise a connectivity blip would wrongly close an open
58
  position. Throw exclusively on a confirmed &quot;order not found by id&quot; result.</p>
@@ -68,12 +62,28 @@ correct reason and handle TP vs SL vs no-counterparty separately.</li>
68
  </ul>
69
  <p>Pick ONE per condition β€” do not both throw here AND <code>commitClosePending</code> in the active-ping for
70
  the same &quot;order gone&quot; event.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  <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-9">onSignalActivePing</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>
72
  </code><button type="button">Copy</button></pre>
73
 
74
  <p>Called on every live tick while a pending (open) signal is monitored.
75
  Purely informational mirror of the active-ping lifecycle β€” a throw here does NOT close the
76
- position (unlike <code>onOrderCheck</code>).</p>
77
  <p>Manual wiring β€” EVENT-BASED (driving an open position from real exchange state)</p>
78
  <p>Primary per-tick <strong>event-based</strong> hook for an open position (a throw does NOT close it β€” react to
79
  the event and decide imperatively). This is where you reconcile the framework's VWAP view with
@@ -100,7 +110,7 @@ Poll your real resting/limit order and translate it via the commit-functions fro
100
  <code>src/function/strategy.ts</code> (deferred to the next tick):</p>
101
  <ul>
102
  <li><code>commitActivateScheduled(symbol, { id })</code> β€” resting order filled/resolved β†’ activate now,
103
- without waiting for VWAP to reach priceOpen (surfaces as <code>onSignalOpenCommit</code> next tick).</li>
104
  <li><code>commitCancelScheduled(symbol, { id })</code> β€” resting order cancelled/rejected externally β†’ drop it.</li>
105
  </ul>
106
  <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-9">onSignalIdlePing</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>
@@ -114,7 +124,7 @@ heartbeats / housekeeping. A throw does not affect strategy state.</p>
114
  </code><button type="button">Copy</button></pre>
115
 
116
  <p>Called when a new scheduled signal is created and starts waiting for priceOpen activation.
117
- The scheduled -&gt; active transition is reported via <code>onSignalOpenCommit</code>, not here.</p>
118
  <p>Manual wiring β€” EVENT-BASED (placing the resting order)</p>
119
  <p>Fires ONCE at creation β€” place the real resting/limit order (tag it with <code>payload.signalId</code> so
120
  <code>onSignalSchedulePing</code> can poll it later). If it resolves immediately, promote it with
@@ -172,7 +182,7 @@ need to FORCE the close yourself (e.g. no counterparty), do it earlier in <code>
172
  </code><button type="button">Copy</button></pre>
173
 
174
  <p>Called when a DCA (average-buy) entry is committed.</p>
175
- </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="#ibroker"><span>IBroker</span></a><ul><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="#onsignalclosecommit"><span>on<wbr/>Signal<wbr/>Close<wbr/>Commit</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="#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>
176
 
177
  <!-- Yandex.Metrika counter -->
178
  <script type="text/javascript">
 
8
  </code><button type="button">Copy</button></pre>
9
 
10
  <p>Called once before first use. Connect to exchange, load credentials, etc.</p>
11
+ <a id="onorderclosecommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderCloseCommit<a href="#onorderclosecommit" aria-label="Permalink" 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">onOrderCloseCommit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderClosePayload</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>
12
  </code><button type="button">Copy</button></pre>
13
 
14
  <p>Called when a signal is being closed (take-profit, stop-loss, or manual close). Emitted via
 
21
  live-only.</p>
22
  <p>This differs from <code>onSignalPendingClose</code>, which is the informational lifecycle hook that fires
23
  AFTER the close is committed (and cannot veto it).</p>
24
+ <a id="onorderopencommit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderOpenCommit<a href="#onorderopencommit" aria-label="Permalink" 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">onOrderOpenCommit</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderOpenPayload</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>
25
  </code><button type="button">Copy</button></pre>
26
 
27
  <p>Called when an order is being opened. Emitted via syncSubject BEFORE the framework mutates
 
31
  <li>&quot;schedule&quot; β€” PLACEMENT of the resting entry order at scheduled-signal creation.</li>
32
  </ul>
33
  <p>MANUAL WIRING β€” EXCEPTION-BASED: place the real order here (tag the exchange order with
34
+ <code>payload.signalId</code> so later <code>onOrderActiveCheck</code> / <code>onOrderScheduleCheck</code> / <code>onSignalActivePing</code> can find it). Like <code>onOrderSync</code>
35
  (signal-open) it shares the gate semantics β€” a THROW means &quot;the exchange did not accept/fill the
36
  order&quot; and the framework ROLLS BACK: for type &quot;active&quot; the pending signal returns to idle (a
37
  scheduled activation is cancelled); for type &quot;schedule&quot; the scheduled signal is NOT registered
 
39
  open proceed. Backtest short-circuits this, so the gate is live-only.</p>
40
  <p>This differs from <code>onSignalPendingOpen</code>, which is the informational lifecycle hook that fires
41
  AFTER the open is committed (and cannot veto it).</p>
42
+ <a id="onorderactivecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderActiveCheck<a href="#onorderactivecheck" aria-label="Permalink" 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">onOrderActiveCheck</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderCheckPayload</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>
43
  </code><button type="button">Copy</button></pre>
44
 
45
+ <p>Called on every live tick while a pending signal (open position) is monitored,
46
+ BEFORE TP/SL/time evaluation (<code>payload.type</code> is always &quot;active&quot;).</p>
 
 
 
 
47
  <p>Query the exchange by <code>payload.signalId</code> and THROW ONLY when the order is NOT FOUND by that id
48
+ β€” the framework will then close the position with closeReason &quot;closed&quot;. Return normally to
49
+ keep monitoring.</p>
 
 
50
  <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) β€” return
51
  normally instead of throwing, otherwise a connectivity blip would wrongly close an open
52
  position. Throw exclusively on a confirmed &quot;order not found by id&quot; result.</p>
 
62
  </ul>
63
  <p>Pick ONE per condition β€” do not both throw here AND <code>commitClosePending</code> in the active-ping for
64
  the same &quot;order gone&quot; event.</p>
65
+ <a id="onorderschedulecheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link">onOrderScheduleCheck<a href="#onorderschedulecheck" aria-label="Permalink" 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">onOrderScheduleCheck</span><span class="hl-2">: (</span><span class="hl-5">payload</span><span class="hl-2">: </span><span class="hl-10">BrokerOrderCheckPayload</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>
66
+ </code><button type="button">Copy</button></pre>
67
+
68
+ <p>Called on every live tick while a scheduled signal (resting entry order) is monitored,
69
+ BEFORE timeout/price-activation evaluation (<code>payload.type</code> is always &quot;schedule&quot;).</p>
70
+ <p>Query the exchange by <code>payload.signalId</code> and THROW ONLY when the resting order is NOT FOUND
71
+ by that id β€” the framework will then cancel the scheduled signal with reason &quot;user&quot;. Return
72
+ normally to keep monitoring. A FILLED resting order must be confirmed via
73
+ <code>commitActivateScheduled</code>, not by throwing here (a throw is a terminal cancel, not an
74
+ activation).</p>
75
+ <p>CRITICAL: swallow transient/network errors (timeout, 5xx, rate limit, disconnect) β€” return
76
+ normally instead of throwing, otherwise a connectivity blip would wrongly cancel the resting
77
+ order. Throw exclusively on a confirmed &quot;order not found by id&quot; result.</p>
78
+ <p>Manual wiring β€” EXCEPTION-BASED VARIANT: the throw-driven alternative to the imperative
79
+ commit-function wiring in <code>onSignalSchedulePing</code> (<code>commitActivateScheduled</code> /
80
+ <code>commitCancelScheduled</code>). Pick ONE per condition.</p>
81
  <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-9">onSignalActivePing</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>
82
  </code><button type="button">Copy</button></pre>
83
 
84
  <p>Called on every live tick while a pending (open) signal is monitored.
85
  Purely informational mirror of the active-ping lifecycle β€” a throw here does NOT close the
86
+ position (unlike <code>onOrderActiveCheck</code>).</p>
87
  <p>Manual wiring β€” EVENT-BASED (driving an open position from real exchange state)</p>
88
  <p>Primary per-tick <strong>event-based</strong> hook for an open position (a throw does NOT close it β€” react to
89
  the event and decide imperatively). This is where you reconcile the framework's VWAP view with
 
110
  <code>src/function/strategy.ts</code> (deferred to the next tick):</p>
111
  <ul>
112
  <li><code>commitActivateScheduled(symbol, { id })</code> β€” resting order filled/resolved β†’ activate now,
113
+ without waiting for VWAP to reach priceOpen (surfaces as <code>onOrderOpenCommit</code> next tick).</li>
114
  <li><code>commitCancelScheduled(symbol, { id })</code> β€” resting order cancelled/rejected externally β†’ drop it.</li>
115
  </ul>
116
  <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-9">onSignalIdlePing</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>
 
124
  </code><button type="button">Copy</button></pre>
125
 
126
  <p>Called when a new scheduled signal is created and starts waiting for priceOpen activation.
127
+ The scheduled -&gt; active transition is reported via <code>onOrderOpenCommit</code>, not here.</p>
128
  <p>Manual wiring β€” EVENT-BASED (placing the resting order)</p>
129
  <p>Fires ONCE at creation β€” place the real resting/limit order (tag it with <code>payload.signalId</code> so
130
  <code>onSignalSchedulePing</code> can poll it later). If it resolves immediately, promote it with
 
182
  </code><button type="button">Copy</button></pre>
183
 
184
  <p>Called when a DCA (average-buy) entry is committed.</p>
185
+ </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="#ibroker"><span>IBroker</span></a><ul><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="#onorderclosecommit"><span>on<wbr/>Order<wbr/>Close<wbr/>Commit</span></a></li><li><a href="#onorderopencommit"><span>on<wbr/>Order<wbr/>Open<wbr/>Commit</span></a></li><li><a href="#onorderactivecheck"><span>on<wbr/>Order<wbr/>Active<wbr/>Check</span></a></li><li><a href="#onorderschedulecheck"><span>on<wbr/>Order<wbr/>Schedule<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="#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>
186
 
187
  <!-- Yandex.Metrika counter -->
188
  <script type="text/javascript">