tripolskypetr commited on
Commit
23781b3
·
1 Parent(s): eb31fc0
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/navigation.js +1 -1
  2. assets/search.js +0 -0
  3. classes/types.ActionBase.html +0 -0
  4. classes/types.BrokerBase.html +0 -0
  5. classes/types.MarkdownFileBase.html +9 -9
  6. classes/types.MarkdownFolderBase.html +4 -4
  7. classes/types.MemoryBacktestAdapter.html +12 -12
  8. classes/types.MemoryLiveAdapter.html +12 -12
  9. classes/types.Performance.html +4 -4
  10. classes/types.PersistBase.html +9 -9
  11. classes/types.PersistBreakevenInstance.html +5 -5
  12. classes/types.PersistCandleInstance.html +5 -5
  13. classes/types.PersistIntervalInstance.html +7 -7
  14. classes/types.PersistLogInstance.html +5 -5
  15. classes/types.PersistMeasureInstance.html +7 -7
  16. classes/types.PersistMemoryInstance.html +9 -9
  17. classes/types.PersistNotificationInstance.html +5 -5
  18. classes/types.PersistPartialInstance.html +5 -5
  19. classes/types.PersistRecentInstance.html +5 -5
  20. classes/types.PersistRiskInstance.html +5 -5
  21. classes/types.PersistScheduleInstance.html +5 -5
  22. classes/types.PersistSessionInstance.html +6 -6
  23. classes/types.PersistSignalInstance.html +5 -5
  24. classes/types.PersistStateInstance.html +6 -6
  25. classes/types.PersistStorageInstance.html +5 -5
  26. classes/types.PersistStrategyInstance.html +5 -5
  27. classes/types.Position.html +3 -3
  28. classes/types.ReportBase.html +8 -8
  29. classes/types.StateBacktestAdapter.html +9 -9
  30. classes/types.StateLiveAdapter.html +9 -9
  31. documents/{concept_01_highload_candle_storage.html → concept_04_highload_candle_storage.html} +1 -1
  32. functions/types.addActionSchema.html +1 -1
  33. functions/types.addExchangeSchema.html +1 -1
  34. functions/types.addFrameSchema.html +1 -1
  35. functions/types.addRiskSchema.html +1 -1
  36. functions/types.addSizingSchema.html +1 -1
  37. functions/types.addStrategySchema.html +1 -1
  38. functions/types.addWalkerSchema.html +1 -1
  39. functions/types.alignToInterval.html +1 -1
  40. functions/types.beginContext.html +1 -1
  41. functions/types.beginTime.html +1 -1
  42. functions/types.cacheCandles.html +1 -1
  43. functions/types.checkCandles.html +1 -1
  44. functions/types.commitActivateScheduled.html +1 -1
  45. functions/types.commitAverageBuy.html +1 -1
  46. functions/types.commitBreakeven.html +1 -1
  47. functions/types.commitCancelScheduled.html +1 -1
  48. functions/types.commitClosePending.html +1 -1
  49. functions/types.commitCreateSignal.html +1 -1
  50. functions/types.commitCreateStopLoss.html +1 -1
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+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"
 
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/Yri3s97Mth6nx2L40Zzq3i2eWBYxdT6a5mLFah66tuSa32uVIwIj1tjre1q05FKVpDrV7V7SdOfK5y7Lk1nKwpzZTxebcuXfWc8ra0YoFIOVqxr2UhF5KQgdbOtyLrNACkITm4diTrNACAIXyWVsAktC/TMMLLQBJ6GSEwl4AklBbDnwZLQBRiJnnTULsfC5sre5dn++SeCvHLTwU0NfcWTd2N27aSb7VFtEQCXQqVdMPpq6nrsg0h6K3w+XMWeQ4QJ/yfy9VeTfN3YvjpaJHOosPAQemvWXbjWNr1yGxJRVBgfntNop0wy5WPAEDk9l59LhNUpBGxNCAGaybi7aNm4d19liNA7HMS3Pxy3GQqaw9ndvO1EXVt17bcSvOf55WnM+dvXczQz4JOiVgfuuv6TDGERKYstbmwXZFZ/tz2/TV16quhoptN1kOMEs92LNtDrYpH4qqcQty40R7XLXiHFkiMC11Awv7fXCrgGdzlNoPTQBmnWN1AtkJkcAU83z5WldlYc5uOHpjO5uZRi8GNAOYTQaj8eLm0pTZJaPFK0sCJpX0Y4r5ymxgzrlO+s254sxCJDDdDCbAgniKBmaU09RTkA5wwHTxbLu+6gfXWIrLIHcFOQowX1ynmEhlk3hgsjg9ZvWYPtuxDglYlH/uNcC+vLUnet9yMSDgosWLbd0BcEjRosHLrVwBgxQtGryaFxIB9QgqSs+rQIByiBSFfyr66o9xQVqWjrGS+LP1iZTFE6wo/mRZnsL0Cbho8bQo68q14crtEDg9Iz29WY5o9mwmctsIi0mMFcWfz4SlTXPiMVYUfzETxibNKQdAUfbljHbtmVP1caLoq6XkxpbMyYZIUfj1DD+7zWBTc8oRVJT+acavDZgTT8CS/PPHRe/mJ6WdhrqMeAwVpZ+seHh/d7ESqKL1UzdUa5bB8yTFPbg0QbR5NncmkEUCFuWfF/emrg4GzgVJEG1euFXkr26nBLBIwKL8y2lnD1KPsaL4q3GL+tB+wwqIgIsWr5M5PeeQokWDn4KdKjb9EVSSfkHt9rq5+dZMGDeALSbgydjo3SbOgTuUtDgScNHi6ZJKb4DOeVB40eRZcW7qojR1eanFckvAovxzf3+Ukw6Aouy27eotgOVOvC0WWZJo97Jwxwimse3WZDgvmiEavSpuTD/8+abtvpnOtZQTUCtZkmj3Opi2ch4hUhSe58N43ZAEyebl46LsTH9bdLZ0b1BucJlgRfEnbt+w/rOrR7eBVw1txxdShiEaPR13hrt7UxfDbdcO7hwU60MSRJtny1Qkt/W/yAdAUfb5goYrO0cRrbzZsZuIm67q2SeDJog2L5fkTYc4uH49wYrir5BDEot6Ahbl53nyuWtvqszBhEU8gorSP0146A2bgiX5V4+381NDZ8o7/hmg4KLFk+1Yzvi6N42pH4aq5IopTxLtnm5jskkCe3ewPNH0mX/MqjjZoRPyRxJEm+fjQK3qXUGAo4csRzR7UcxzyqmxuhN1fQ+1Ep4pGr8sbq0ZTuaMNRUCLlq8ks/bLPKvdCdtXr1eZjSwA80QjX7yZ2fuiMvJDvxabY4iWb1+7MZV7lGEbCi4aPGkKLu27/9cXqYj4OPObccuj2U5otlTNy+cDtVLe04JVhR/Vtiua7vi1p2R4Z+UBCuKPw/2DaQ1FgouWrxwh7Zdt3QohvbMP3wpWJR/WZSXfmhP5Ak9zooliravFrZfIG5mYpsDm0OWKNq+XtjRi5m1zJJEu5+K06Ueqj/PZwTncRi/F5UnSXY/PS5M9edz+812boJNnfRkfAG2mAB/IR7c6M9yRLOn44cLRdnW9byyt3xGwdnlWaLhs/ETEezxSMGi/HN/nH4A59gMSzR84cYAVeP60vu+WI5vd+5Z5hooywNOc7WZLqzN9Fb0ua+yNn2fORP2ZqzYn01Pt4TWjbwcvdiAUmFNyLfrKvKXaX0R0k9YqFlndTYrHjP41LXf6dWCWHpEYqJfxlVwTboDBmbyX2sfrDFKWJLZz/NK2dv2dDLNAfOiSajVR7dA/qmr7s0AVj7D1JmOJ232ePpE1PLXeXKn84tYqNnncQKpswo4qNH/GarMCnhqMGJF4c6aO3egQ9vz5Imw5X+MsyClXUCCrZStIUOD7VTtgSTBVlCLCMCydHtnuzf57xECZQ+LCQNvzQ0oSb415a1FimADipLjDvjUoUuiHhSTfc8doYiF34NnKCb0h+wBilj3A3KCYoJ+zh2fiDU/A+cnJuSX/OGJWPQLdHribVtfTuo3doYlm7klG70ZyQLM+sE0UK8fYEXhroU6jhUnCb67nM5Yj+EhJdGl/WtfTVkebogOjAkGaqIZx5Ic1Aip6ACLCmufgixPMhw7LG0roEmgFVr/MRyS19R8SoAstFVDkySrX6xRjrMJBmKiGU8leMQAeUZWnChYHW9tP3wa90KU5cNQVbaqEssSVZZQGSYEyeJq3oNH1AOsJPyxureqeXdKQCz08+0MCzdTzLNpEmKla9cEAzHRtOIEjxggrWrFiYLtERsDbUBA8mg7sAB8rCzc3l3OUPY3pCS61DBWChEaFf9Q1RaYQ8ZwWL6tD9AkNSWgFkipB1hU+B9dNaAzd5IjG31/15lvjqd7/vNEhaWmN8jRFHZYNYVwUd6e2u4BrCEfiwkvS38ag4iDGbk+UWPi4SWD39qhuqnKcRyKWRAMjYmu0BimxvQXW5/Rjj3L0xjiNZZhSWafpiNA2mlajgbaadaQKQpoo+vtaBJopenlKApog/RuPlSU5eOW+ap4gDIPqqyBLFFhqaqJDA2wc4dMgPGGh0RFl2X/q3FpEMkDSdPaQU2L4oBGb8dgRLpMhRyVkSI7HgG0WKasutzELKWZIkeqKfXM+dgeddnxCLiFIhMLGhT/1Zr+0ikbWETSWSny4jNgEzcE02bH56iMVJlZCaCFPzjR5Yhi7jBV5C6hgXbza1eXvYiks1JkSjkmcJTPtrTNoMtOyFEZKTLjEVCLqr9T5sRjKEw0uVjgoPyX+RtJXT5iltJMkZ+AgtrYvld3CRFJZ6XJkMdATcZvTJXZCTgqI01mNgJq4T42VmbFp2hsNBlZ8bDBGP1Sm5OApLNS5WZjwCbTuV5thkKW0kyVJY8i2szfqUnSMwyV+1L9gdVCjBcNuqq0v9oB3AeO4ZL89GbDFnwCLCasWzMjOZgRvmyV4GWDG3dCH6ldHyrLuuk/mmYPiwkDKwUbEJPESmBFYqKavQiCIZpU/Z12qZHkIEaaRcYEjxjoFrcIBmKiWc5K8IiB5lxLgkcMoIaKDoYdUHtMhuRIRstwVlfJGRZqpqlskoMaIXWiGtDPg2Ws5wjBoLTu5UWTQCv89ZUSRIvxdKy2E8ywMDNNR0gwMBNNN0IwMBPtk59hiWZujgE2AA8KySqbMUGBbBRNOILL8uOUBRX3waC0togoEmilKaaYIFtMEyH1s57j4YboQViCgZoo34s0CzVTvRcpDmqk6sUoDmoEvYA1M+kFrO4iczzR8KEplY0gZSAmqsqP8YgBVBcLThZ04ScwyRUpiV5XJ8WqQ4SWxP8xBmlSHaqlKJiN/mBtlqcxVByuzdEwO90TQXIwI81TQTAwE013SDAwE+RZ8ZCYqLYbzLBoMz9uwRKvPXdv0uHgf86eTcUiU0QEKbfmcAg/M4IcQgrg4X3QAhl4eEB9W1aAxDc4oO3PNSB1n4DoB6MAzCGgAB7+owU5+ARJ3926aqcjMPmncBX30aLyrS3vcGUPLSq3p1M1fsI7vg+W6LGACU0E/cZLnu3Pl3x0jNhoZWAO68Eq1GAlYPpv3dZPrS6viAZ61W1vP9kmGz2VMvI4oEtnXUWOu5uwi8dRuQzt+WPbI22ZYGmcrs2dnb620nltPMxtPhaiyZRHUXu8bXs4QxFN5aUruoC0w2dHrjYi5je11fFkEtz3+BzM5bozlQtv51os6uJz9C6aoot5Ojf3ZGidHEfvsidPC09083qucd0OMIopksfBfep/dFvLTf+NWRZbHSICov/ehVPElEcoovm3XLzjRPJvQKBjh/tsy7YDXpIbFlG9Nl8zlwkkoiMU0nT/xSTtd7GVjUfih/HsgizqgTHd/7yYZqgGoB8L8ZL60Q66mVZEQPSPx84ezWAP153J3T6ZeEQkxGcaNoI1EBEA/WWt/HoJww+ZJCzECR/Q+mhAGZ5XbFhEdRyAwuW+wRHtMXYNmOIJC6m6IDWgqINimgPUo2xYQPUd9L6agYievTGXWlWsIUXjARdywAActKs3CQXwUK3ehHhA/aO7lGZAp2ARAdD3vtZ9V02nFz81NTbMYum7vT/Zzp1ay9zEDqZgE0HSUTWXwfZfqqa0fvFN0z5gjCJrIKnIXY6RWAGXYxzt8Jv9rurHPTyg/nvnvvBv23woNF97RQPK8wqFoskHDMRhPpg6rlTZueYwJ4qpcHzbXpph/OJ/h2lMVviugQZ22EZchev7mxs7FhT+zqepGk93b6EyhzNH6fLw+73tagNM5jNEjV8/VCcz7GqrEVfhOkcm8npYzatBVPnRlChfFKCWPlU/UCi7S+KHs/+jeR7X2HQTEF5ibxr2jFoQoX9Den6whvJye9O2p/ugBPb6698DKX2vt5tY94M56fprWkKRhqvm3vaDPajbpk/c5XfJ3PAlG17k67483kd7b5kjBpTVRFF4+LGSdrThlL7Pe08f80PvvX/LC+/f8KbzJdTPcEze57vv+aUEFP7zjtKekV5I1XvqWvhC0vjsaMz6Fry1OK3RTFN4/cNU7laUPT1ESAU8P5tvmsn1Bke07Wm66sWV9c+mr0CPhIZ4KU4HBXBE+9K4G0mvmpsWE9/wgPp6YkKxUhBxEJfpG5R3ZsAKyMMj6prNxhAPqWtOZ0UERF95OiuhaDwGM1yw5yCkIB7jpV+Y9ggFNHWvK8276bodzNgLj/sj2OpkxEFd5i5YaxTQlF6/2Frv5EiAj+6kX0SQ9G9N/1urXLtMOZCLuuejWIDTuKUKb1dFBEm/Hu8RnBZSP0Gn2GKG1uF3Lp5D1uV3IJ7DzLkZbPe+AZpviNepq3LhcTCXZRv6U9ceO4scXKN5oJu9cd9GDaYD2ldCUXtoii6igV7LYtabe1PV2FGUHHOvoyqTJBtzfutOFKNGI1ihq8nESsD037XN+jkjauFz9C6azMQ83M19O6lxcXidujYfCwd3md63Go+JoXXQ5mRjYU7gCTwPDOp+Rw7eblhMNVjjROUD0g4fTRUkRMzv6lCrRhYLXqeuyYjPwVy89SvUxKOoPTSZiWiYl3fwXP2OpLj7XTVZzfFV7lPz3ZvriP0jzjtyTiiAKQBCYMeWeCzsicBeyBeJI3fybUhNSS14TH2ZjL2/h1ZGCdIOH012EqLOT9Pv+hy9y55M6fpgdJbtozXK2tFoyNrjpCqzhKlx1LXvjaL20GdJ27JHkmaUvTG0DvrM6Mbaui+eUo7eRZ+jjadx0/soHNZ4Lu7rItglYO1xUuUpYYKOD00Jezw0Ja6qSv2Mx9S3eAKo/sbAHHTzUc1cdI3xca4tsvdDsTROmlrQznYnvHbFMGQhTtrD/CkHcVEd548IiP4U3x+TnrCIqmYbN8Qj6rqNxJgBOSi3ElMO4qLbAIoZkkN7b7uuOljdh3IUC3XSPhE0D3VTPRkECfXRtOWUg7ro2jTFgp2UbZvmoW66Nk6xJKfOmgPai21YWfXU3ltcd0OLypfmqvm1Le/grcyYITn01nTlLZp2Hy0r45/g9fCXjT3+ZWOPftnY22G6bRXSnKCApur8Ta86f9Mrz9/0qvM3/e1lwJZtF6SoOLTnpU8AVD20pHw/jYuBMliQkuI3Uw0f2u6zNQcgrT5aVu5O8Mk7DyzqulDr6CPsgWldP4hZ5e4LuzHjAJyKYpYETBImmKtekWFKWc3Q/LuZ9pv7KlBCxtU419F2poQzHZBEm/kYhMYkoogWaywqvPIiitZCW10MXbJeVv9cx1f1Q1X27hvU/JLo5pphiobb6QtFpREs0Sg5AaEsVl4AtodbTcRQGuzN3I4ms1Hx+os5sAm/zEw4QIvMK3pHu89QJcsoGBzcLEjeLjNlExE1xER4Uenw7CYkvY02o6yAaD8OzNHW46FF4a4aqtLU4ykSbZZyXNl0/pIZMpmxiOgv41gNVJ3Akqw7v6Pog3y4JP2LNcPJnPW9A00U7fxjMIoskTyVGdq9piSVzY6CZOiS9dW04ga4zEhQ8K2p66+mvMtPTxLllQJafDKdOSn0JzwoLiwdJeLYotECluavqTw4h73KzEc+t99QM5qNGVfDA9ojhgRZPgxxxq6E+CYpTbaK5gho2aU00ern6oDmZIbKkmI0Al8UjTtwFQ2CwTJJWbgRXDA+AZBvuc3MQLcFNjKv3nrRqvEeKWUBRg6NlsqGloW9qNiKHCQs2WhpBOxVhb6HTxDl52OlijFBTBEt3l1OZ2n93JP34JC0eN9qpI3etHr1ng+H6cm+hwJhXi17Z5DkjIVFVWOHhATb4G09ZMAG+BhCtxV59f67LS/jkAlvizFHNPnARu30lD8ggTonlKpmQwZmgNepB8ek8dpU7PZezZMg8H26oUXhj21+X8tT/NiKe1oOA4/qFiwiym2ThZLALtnVcsWN6xh/P7uWDrUDggZbXZvuaKGnL2TIBuOmiuZ1EDIAg+G2PSi6j4Agyjc37Z6lGJInmvlgvEZSlsqIv1Eo4wNdLnS1holEx3oBQZT/ZLrevumOirFeRMEtPtv+UkPVEVEQC/dJBijtoKgkWuoeHJWebppQzJ8oHmq2rHTp7SKmbGi7vur5C8h9lw0OSy9zPE2XmOOiptPkZodjSETtrpzOval3GMZU1PJje9zh5rFQo1+t6S/dnrKMmLih9gVKElE7v5PfYUrRUev5md3hGjFRw8/WBRvZ4RcSYbuqv9tj5tFQq2XVc4ddTIUtp4NaexxDJmw4nt3a4xcQYTt3SGyPm8/Dzcb7k3fZBUzccFqV3+UYUmXLOUbbHErvozkcsOkTSYTtvlR/2DfXnxVjRYqosvtQfbeHLUDjPmtSRJWMv9u6fthn7lFly/ECWN3ibswBTaZHGB0LhhTRYurd4WmRBwek3a2yynl9QgJt8Bmkj5fFuc+zfVHg0+wRNB8AnFsdKh2yICPVml1AwOTdPoKb+MHyCwGX1zSbiAOZ4L3EhoaEP9t/2XH/F59IEzTICl/exL8ymaCaXicgQPLA94+RPv79YwT/sMPig9bkk3moW5MPn5Z1momy3UWzbbChEWEx0GmojMY5XbCf0S0nHy+KRyEBlzMQYIvNs7XG0yHCfbYrV2u6zw4y0k9ttHOaOe/uTCKaj4ABGrwboAa9gkHZZdVGJe+RQBtVyWCF8gcX1yTQ/AOIZjLD3pq6vNRmmMfqb64/4xYpd58puoSZJe+zjSYru1MQ6exLzDh52Z2EkY0b4yPLiAJa7GhL2ib0g1X4IzW3q8L09TQN9lSFuFJUFrrHb+OoTHbXFElXWStryiPJNtqFNt0K24jGpzkeHJAe197W9w/cCAie2mwaN9VMXG/GcSXrbflY4pwnFE48of1+ts0+w4mpNlwHjHs8VzJqCy87+XhAHD+mDR/QXmMTqV5+MQm2+dR81Bh8aj7C0viaRMiADfAlCV2QiBV+XZV3U5qmdTGNVczdYarsfLL0PdaKDojm7jC9wr5qyjB3GGp6PZq7w1TZ82XpO6zn+3v2Gc9k0fa6M1XtRidDe1adLiGJsN21ubO77AKiaDcHF9N0zhEFtJgKXWEwE0B5vO/UBL1ZwOo3AMUDzNa4FfjQMyFJNi5opP6bO4IlGXmhohXfKBAshRH6zWJMUVjoyy5PFm1t35ujhY08uCw9dFXp0oM0Mw8tCY+nM6evZfBaT0mYjXs1q218EmTj3o1aF58DmbgwmOBcMMDD4mPxKk8o58m4rSvu3bYxGbZ15b/XNeZKpvPJMrTz8eGgdBCEXpktSUKRBDhUQ8JRm+zPpD5OQ0CGH3OCBRpFgfX3ZZURUSVDW6c+a4fRj2R2d82qoyeQPNBMP0CgiaLddmWCJmcpS2G0I29Zsmg7RwleoklpMpmhopZLyGW1YUiU7MbDN7iJD0ek0ffRikVE17M2ygc5y0VM9c2OYElG60oEWm4hAZUfwYpaJ3momfIDcYqGWunrKMMUDfmbOTx96FKOCfW/nsCCxRNQ8iku+RSTXJdAlQ8fwwaNxzXQfa4JFbQcX/bgjCimYBbuLLGi4h0crXz1U56yMCN3nkzt45Nwm13VHxMxu2k1epdhSsUs1958lyvJFo3n9UH4hePjUfEd/TLNFA0fmhLOyYJFRHfkIGVJRm5jAE39ihVFky0ARD0h6W2UbZgXQO23nQeF5UbS2+zMJS0g2c8njy14dt+Hg9JV2+yJIsCwJePwahnFa4QmonZqG428vrcgeahZe1bnxyfRNn4g8eHhzMUQb5vfuLg1jl1sOClXbOOetID2jMU0G+VU0cymEGVbKHDp24HZgSSBXmuQO41XTMK81qJQWMUczGmJA6YwiiiYz7aro3BKSBqvMVyv1ssjKbzcOFNr5XEwJ2+NWeGVslRu06qn3i/ggY5zaGVlvRE0lZ+y7lIW5rZMCtaJt8Izx9U5KzNK0HR+yl6FoGF+/oBV4UfQdH5u6LjDz6OJfpfyzg7yO33DSYpj7M0PVW0/zBeZ8MIJHNb/u32Qxw8xWlYXvxSfddGvw5dwNdOHRYjqghWVxwjuwiVLk66HxFSlYsXugJphzKKXryYvdi16+aXOQE9c5lz0nmF6z1C955jec1TvBab3AtV7iem9RPVeYXqvUL3XmN5rVO8nTO8nVE/qHGY9uW+Y9b5iel9lPbfMAL0xAqio223x4wVZDympvqv6sxnKW15xQaFqUmez4OTe5l3Xnj9UHXNp+iS4wGA9MYkLUE7jFFD4SqjsBSWrXU6S0uUkqszhduVRhY+UVMewr9hrNIBCunJSV5ioBw170NHOgpOazIKTW8yqKLxEV0XxLfofdgooxQRwGBU3nKhYt1/d/po8svGR4onn5XzGx/ZYlZ+66S4G291XzDd9owvHFF3lY/WTB36K3p2O1uchwxLdlk/ixTGxj0RV8YkCxdC4QNMFgiB6TKGchIteJnUfKuqSH4ALBiQHdFIYqHSFbyV8XfgDs/CDRkk7ggP6047k8tQLH2IsLhQJ9tq+FAJ9NoLoMe0D6HuMLE9y/Lt9EBqSQyAq0nvPYeR33sf2KHdfM0j8kmGONS4PGXyk/H3EGIhVTqUHlDVdsFVEcsHJiuMXH59b5kvDWXIFgprXbVu7iQOku4AlbX9zUi6HGK1R5zf/Enloz+83aTD+mzwW3z5tkLYNR8UEDh5ClgtXEc972U+w91KR+kjFseLp86LraaeTk6cook9TT/N1QXuBiQdSx1COcgFvOFnRRVaU+68NJyv2g7sVtzHn/rYV2lgERg7kArmfUYjar+Ysi/1qzogWUIozSnXaWZZcoaLuFKwNKMINiB7ClUV9pKhqTVfefrGD+1BaGD+EWFl5jHwGJHcDyprYrPcLPOvdjn0KiisOPUyJLJqEWEzZf6VBq45ZGnho0hXk9eUsDT9itKzuZh/ys7zh5OOQZkAejwUm641zGERxBYKa0uLhCkOPgE7zW/n1muJRhzkeozW91FVSDNhljGOoMdkIsAcwVAixuLJbTsKGfTQHdUIa5YZEVYGn0UNqjidfpHdLgEWODMMtPsCKJ1CRNaVrbDVphknT6Rkmz6hn4NuhzUfJ9xUdENRE1ouuNdcCX+9e9+WYStcp3vsOU58oe4rX084W6M2019PJEqCeN6Co6V+uCSjHcFFfvD5z0kVvzrwGb5wMVcG2GV8ciTWRDEt042+dnLShCyevkUsbPT2wNHbtbORYCjfF00mTZK/2CDT1GSWqLUuL7Pdqk6QPVekCyY3hsj52cdSsrrosKoIjqU8Iokdy3SBgQ3JEJ+kGvkkbvHzvGrlDblbEr4/zsUA5RGhYPb5gTmFFUVHf8Jo53DTloY7xPXO4J8VEXb375nDDiIR6RdfN4X4EEfdUdgtZHupI3TeH++bYqHt07xxuTBBRz/DuOdwy5cGO3gV0Cr+IhbrF98/hjhQTdg3va1CYpkTYM7iHTmGZ8GBHP1K2wjCm4X7BZXQax4SIe4bX0WlMU6bo6t3+BThFaEDdbQsBQ4kNqNCEEuyDZW3ubrBZEbgWbASJ6ycOBKyeAFdCbXrg3Gl+6t8czHlg7i6cdEMwqq1ov3v6IOHqk1kYuvVkhon1NcGAGsPPMl1rzjJdj/0YWGceFNPV1Je6P/WDvUMGIRzQF+LDL7pYaPgVKLeJGYi0CiyWeqgLtoydp7byPJWjYkUkRwP9oLLThFGesNOJDV7WR2Kq8q7EhqMV/xl8bm+/m9O0nUl9cf/4SXGctriLfjDdQEc9nzWKFC3l6fHT4mb8zuDrvOTMysdgUf1ZcWkOtnN9ymFM1ThIJHdfVpMMR/R6XtTVvS2Gzhwy75DVIoSKyi+Kzr3UT6YxR3vKhGxZxRO0qP+yMFXRnofqVP2RDcKx6idoUf9VUdcnqGACZK71eqcqP/5K1qX7u5Sqdrgd33dUq1/a1186aw704zbS14ZYTEDJ8+u4QyGrjjBQ086r/aLqAgR1XQsVNcdmjOn5LUbU9cGg/rlq7NCLyhOM1fRb2NmUd+Zo+0xDuenahmslC70YgWBOjp053yKiIxAUPVVN1SKiIxAVbZsjJuqAaEOpa3MyiOqERNvHEZE8H/9dzW2TlFvcJttXB3tXlXeI8IKFpcf3GKY8QvGnZBrlZR6SsjZ9b8mOeiYWM0TKws381Q2rtYIktTVMESu3oeRycMMvT+zUuoW3/i/jn0P2Uy7AUbiyMZfNrLIhQsEnT/2sLbfUrlH64jBlW648XYIRpfrFS9mEjuaFGuajeRHmmXCvtBcT5DWUNocDfQ5kbVmzbAQMNV8+DyVzW/iEKLeBH8uSu+CEZnYPPBakFoYIvdyyUCxHr1oQgvk1i0QyM+WlRJkJbyxLzwUJ0fxMMJB8czPY7n1zQNpnBGVbZ10dm+s2PVKbpDQEcild43fJ3UQEZR/RCIt2DAyNs/s5mUHem65yVwUsyj+T08ZnTwmRbFC9JLkZBptSe+M+P3AzZKBxEGhO/Ks9VukF8HHj8FFMyxhh15U/XCCVHISRIQ6FJXVDnwcLK2fBCDdJpEXIEtmqWpjikxEhFaLaTCgfi40mN7UYCwmHp29HpVgvPXb79PFPr568IGs3ikqbTyURkjaTRMXjnKHwNm6+zrVt9zvbsIU4j2GhAvEdqeIV4jsSHnxcx5wHN3zdENzwVYoPmSaVjwuZS2k2LmRqwMaDzOkz8SBTByEOJO9BxhPMeWSjCLIeZGi9jEU2nl7OgYv7mHpI8R4Fl0y8x6wPE+cx68TFeSSMpPiOgg9YN1Jcx5yLHNcx9cLiOUqOYMbEOI6SD9gLiPEbcz5s/MbUR4zbKPmQcRvzPtl4janPGM8w/64bf2ZedaX7fb6/Mz+o9FHMuHJqW/giB4nn3uwkARyviVzBOIkC6VdfLvojVV909MdUjZ4pporleG2lWIUeiqvCscubuz+x/hIwW4YJGq05lshakgExg6LOBsIkqm7ESiNWD8UlrRwzkqy6MRVIE5i6nBnrqFHUXpGiKDGDpDUz80hCMno+JeEILst7jUjU9rCycGddfUSXQmWEPSwqPLRnN7ACpWc0KD6+Z8bRFCa/4UUDb0woaXtQjezbtheTHcFReaxMArBOWpH2jcB123Scz7Cny8b3JN4pI9j7OF/sPHysWBb+eEoS9rEqYaSMYzxs4J4EVNxhVcKalC94tnGMp/iYldgFwQ0Uva5rPBrIJDCGcmnrqqEqTc1cPJO+YXMcdijQtcxyp/uVyTwd7jZ4urJhbolxRNc275uhe2DzOGOkPP0yDukEpQnESb1rG+L+nUTMh7Fyl9M5X9ruV6a0D5fT+c3RNsObpv/mL+TFDS0CMs3MIcfmwouNEEHmb0H0B0rlb0m4h5fP/zQtvDkNe+5sadzRvUj5sy3bjhn4bBghideusHmdESLJsFsWC4IRsadqGGyX3YJffg8lntN78WZdYf1y+epCHeXb16qbcJhWZ+ZNP4V6yGC0l3Np/roI7sOwOc9tn0phlZA4h3VtHtePKFwv0DZ23cyDDQiW4OE+39bpewxBe96aVqkHHEbfurcDLu3DOVXXA76fSIiqB+dUv1eDQnRDM5q31fHW9sM0PMbLgaIxLtW8z4AbRAxG+2S+v+vMN/e9PC6fkhiH8zb9wR1SkuygrQWKxrlscRfxZpSSOIfoxnaFDc0EvKYnXe8U8Bgfd+4crxIPzWj2/m3guDhFA1x0Tx7B4jxuL4N7ivDyjxic9jj30bclkif6aPVhXWUdJyTRwb1Jtan3OKL+tByhzULA4jyCIGkKF4rH+Tw05bwaqTBJSIKDTlrWvF+vhcWVEw6j/y24Ahb3IHmiD95Kv4G987f1LlZt2j1Oou8ff06vgvFXLOgrYNLVijR2Vpw8OmzWs1BECGqVagLxrAKL8V0/fOoC2XjS6oGYeeuE+s+LGYtIUltwjGDmqhq/OpgratI6OVpmYn603Jz8aAfsNHUEFCSPx84e3aLGdWcO3D4kARakp10poWIjIC+5vGDdMcmbMAAaoZugBXF5a8xH8WLitu6GEYTGLS2xDDeYIBffCUhpUVcCpkLh3iypk27OEjL8AdsNwwu9Y1e2Z4AgYW/MpYaKKISCsmKBBUhe9P3NjZ3WyFydu4UlVjmFC/LgRxYJlJeFPrIIcbzgRzOuFwl7uBGQl/x1m6e/q6YgCmOEf25nh6XtsftkOxfKxRz5Ni2RBeuquQy2/1I1pfXLZ9oyZtazZa5g3B6EfLUHIe2/2e9QH+vheMHxuOXPbXvHyq0oXmwZv8vtMkAKom1fOfZ0YnmuAF6cYmAmb9tLM86ZNT4xCbNaWrDGKeJgRmEnCPmEFNCmGboKzMeMxYUffr+3XW2YzfcMAbToh+pkBlXrijiY0S/Taq7XgSGdrMj+AXOwywU1VAnZkfU9+d2dyR/I2bhOjI2seeoOW83rGxH4sSTsLPq8zI7kaB5rirjDEu9rU9oOOzfX6wdzwjpImorZXjX3th/ceWSwafkErcWl0Xpc4kNBOZPxyi2sSUxQTNbrGDWtLqWp7TSP+943yA+9On7sneGz4WcrJqmtdM8VRcQs57OTmlFOSFHZYG1yAYPSiuananNbW0G1Zzgm/w9TuYBjmoc1pAg2rtl9KQ13vimA8XKfzTdk+rfBBDl7MlUzfqYwxjWvBNkELsgDsSACmCA33e921dy0vN6G4wXX0/jAjDXCCsLUdW2UaO62tkQQOcca4rQn+kY2EmwjAgoJB4NtJFBQNroNiZMlLkNKZB9OX1uhHYwQXgZ7a4CviOt2MPW4zs0vTXk4RLDtB1h0xe5oU6PC3COjhgH8Bz1/sTXu6MB84WFRXiIgI/kfdfvVlXD+iy8fIe2z3Zr+txZchUuxTDJHMNxdUmhefNxYEzdFIiAj+Ys1zP60+5XZmXU/n8wZD/pAE7jz5sEMjEmoD+NS7OOAY/EkHk6vFGAjBcPSijJnaJzdFb2bnOhf5TeTCUEiEtnn9pskT7N4s3AvOhxhEC4pnJX/uTpIkjOElwljzQhFkaIF8TBcCiWYBkyJRKgPpFOh7GfSkViaS78Hv8rlK+m/lyghwCMcQ9kEug9Ykt41lfRgolx6BRatR99+FQnm9l1TSW7bNRIld11TxeymayQ3d/JCW95QrNjH9sipfGzjV31Clz7IWjGS0JF/liYEK7Jcouaq+/fzEAbYTBUJOC+fuXKNUGbuW4tEm5tW8wkfiWcNkkvTOPUEzKc9PpcVDxvoY1nBiGGB5ENE+Aip36pm7JfBnn9lpmMhjhm/Vd6i8XUrrv+QcEb+at3Qlt4AAZCtleDTbeCtR+ERg2XQhltEDN6EumePUM5dspeRi++xQ7RjDmIU3l0HuIQExCK+qg4wiSmIjXdBHeDgoRHx6DY6wCBiYCZov00SEAvqqjnAiKIhdtEFc4BTxEBMwivlAI+QAFl4t8ghBh4ckY+vjAMsYgpkE17QhLiEDMgkuBYO8QgIkIV/cRHi4OMxg+DeN8giYGAm4T1vkEtI4W3mzZcv1R/2zfXnT6YzJ3ZMRRJgiw/Vd3vY9ih1diQZtv67resHnaFH4W3G242mlY3MqM+HiNPVCYzNpWMskNDpWZIGOSGUlfVuCuQkPZgg5+7xA6c9CZiXrvq7OUbrXM+sdoIWxcdIoW+6I59mHyhKynPt3E4fJYbUfQAUJf9r/VpL0tyQCtEPCtkPGuEkTJKkTgdNiiyozVRCOLeXSst9Dr+8yup9Tr+/igSj7YMpfJrQHHIcjZHOQhTHxyiawclk/m5gq24FAVLrZB+R9MCAtFSgWDmOG85vTV1eajMkr+PgDUZixVcZyXpz/ZlPO83RZyUaMahNI74+AeMIQm07sgAzoL5U1aSoHU2l7KyLvVWgKnldgcevYqLAyfdwrsAnMFTgKxROprrASRpsBxa4B+al0ekbPm+bp19E/xnWYwST69K7wZZP6YYTEjrN4D41H3m9FQbJfbb9pWZ3qkIkJCqPTrkDSBnR66q8i1Mb1VEMBGoppkxDeyTpMUeZiTXYus5rpWntovNAkBdxKEg0uuJDDmYYShP3eak2NxNHaUTEHEa8MrGHRbv5uKvObCaxVmEwU2A/gyRAFlPUUYVFQGAtpoNeU67ZXjUAApJyh5U/Y0YLwt0rhecM6uprfjeyrr4yG5F11Q+22a6jyW/yxUhmfy+G/t5wHwxQaFl8DqYoys44WBBKq4cVhZd4EJ/mcFySeIyXDbYgjKL2BtXIImUSwWX55FIv0SFh7DCBskKyRLNxpU7SHkGYFJLUFShKvvMiXUqqPlYljCQ5xkMGH4MBWF74YzLoYgTR1C5YSHjquxHZCakQRdO7oUVxIcixB5KlvnMh8DeMKJQ5nEsrMkd0JWmkOBOCaLEcDJSUFxwsiCTXx4rC3udykq4H1cgiSY7gorx3bgd+c1CcXUZIhnI81HBqa9q8RaydZor8EUzZdAuxKrpsUFHW7b5Ieg4DCSFFsOBEwS9+HFNJNQDrpJFEJwTYAunOfKxKWJN0uGuTvpDxUaAYOnYK0UpxqDASBmiCNcINqpHFE65ofmv8VkwZGvttUDzJ8PgPuwAnxaqE8XRveNAAl8ZEg8C1onCAVopDKU8YsslDU4qyD00JCUFpnHGiIHWYgpbMHaYgRLG5Czhv+UcQOBcTXdCgOFKiisnQBEXXaUK0II5GNkyxgjAU2zACCpLTOWBebcIIQkj8gRAnCGIfyMdISRT8RD7FCsLYt8oxkhENX4XxOm/6+gsWesdbSODPOwk0twAdfE+VJCz+mipMV3vMfwQz/yjt2X1s27sLc4HU9DuTiOWbqLzEggBEPlS15S5Rj3GhZHiV+opt6wN/NXuKRHR/C6IZ+0XvI6TyX7D/6Co26HmIY4uSWJpI1TKLEjkp4LNOAs21ew8ufZUdQ0FZ/JHNk1ir6cOS/CPoAcRmEL04kgojXhrPUoF0pkUL0XMsRvDNwZyD9hk9QRSYfYhGAld0y+9YyfH9+4YRM+xAUGY9IJ/RvjdHK7ZAD8a3uRH3ua1zfc8GkEtuhF63be3uU2T1FpCsOdy2B/TqAQrN1tDQVaV7Qrndag/FlST9+WycwvxHs0HKfJj8DFJoUDz/xMQoqaZ8PP/0xEgwqVGTz6WVavJJYsdvWccNO+BFlIK5djCh3dEcWNoHi9LunAyq7GNFYTffHXMJfgieJ2FWLtdqq5iEWSXF5TeeBAY1nnF14GwbbQ5iDpeB9t52XXWw2K0fFJqZwSxwdDpM4wEDaFpMgAFpZFabYgFhbHZLoRFxcJZL4wEDbLZLoRnxs+l6G34lFSuuEEZm3rLKvx1mAPNSmBH5V5cHkJ7lGSrNGHwY98RSG45gDyFRQdt4gZfzoZZ3BWF9ZlIebCi+5Ag0IB5tl+qyxJBha7SOfLRSfE+mdtUUHGiNxAMG+KybJnAW5+mTiXfVzQ3Tq20grnucUNftPJrjdidTrCz8X6a+MAvsPorrfald/3A2mt3tD+ehHgyp/BTNVv0Gn2Zf1w/nzPyUhIq9/kZSNK8sSchKGkUmKXE6gkxS4kEwmGRVIXmT0gTuzSrGqKFTzsenIbMxff2O5iFAyxnIxb4hU8/FvSGTvnz0iSY+wsvJz8fVITPAx9Qhs/CxPaKp36BywslIPWSas1F6yOTOC59okkO4nOxsDCAy6Wz8n0zy3QIfnnoPjSSeji2USXs+rhCZdH80gGaA4MjZ4OMXkZmRYxeRWZqHCWhuQrickWxkJDIPbFQkMvlTRA409QFaTnwu4hKZdi7aEp10F5sDTfiGBZJNRnGiE52N4EQmeTnuhiY7wstJz0eIIpPPR4eiszBFU4BzEMCBDOTiOtDp50I70MkfDznBqffRQOIzMa3otDPxrOiku8+c4ZR7YCDh9KfWdLrzX1tnkj1+84wn3IcjSc/E4Moknom/lUn+tFyGpz/AIxnIxffK5ICL7RVlIYlwFEmSMY1oDRcNi8m8h+KyPJ+pWraVkLlehsLOkmbOcvQMNgkJnEVnzUE6TrVhmDn09NrLl+z0O1OmE0De1gtxomB+PXT7XZoYT0h++27DsEm6qW3JZm4EMBKdPbX3Vq6yDcVWmgs5xiXH/c5myAG4afyG4J7OCZU/67P9LteVQ0rnfHwUl73gu41EJPliIyEDz6wP455Uh2Ma8/yrWDxVfyct668YKTmf7b/s2OzAddUsRzLCl6MINNv9tZfm4IISMPs3G4Z5krpLc9X82k6b4Za7oyRGco/nFAuNqfUNIFX8MkTON+cFwTTpBZJPkY9Ak3SQGmQI5Ooz+IQIePhIPGIAXsJAwRF5vMFnGJxJb01X3kqvEB/FtNF56sI0qwnAtaoJIb/6I6AsybTT3MVqRDOdoPzr3wMxyeot0zH0lusLeju8bevLqWF6qg0jCYW3SZE66XVSsUx8NwQhQ10OEctAd+H16F14PXgXXv9Dd+H1t5eB/yx5QXCPjheEsrYH8CXKsNieZaKNwZF0TglFtmGeu/V38bHbPsZDOtoULSfTBS2FtX0wJq0q5piAWMTXfKQFTV/0kSvsKdiUKtkpRU74+jpXOZEs9jW3XNr35ba6cbd+8LcCk3Cuo6lHxHqbyEhj5VM41zmE3Vfyvkl7rfAF6H4H3qg+DJUTDm5TWG7uN+KZHmP5WWzDDii8pReIlFXgfHqM47LYD+15WfBimoiHYlvGuPbH5XIEsHkcEUj7CICyJFePK0CuyREq1eUKYpMVl3qqQ5U4KTKdIc2fukhxck7nL36nSNTW9Lm4+xQSVnevcEh8A8La4/Eo/iwxjUUduCa1IVA1ca7p49h3mXdtMDhVoxmoySUTH5m7v5goh+CD8eRhSD4VfxaTxQJcMGy+HppSUXApmhfvB3viMul+Z7J5Pd0P+XbwI0/5Re4BpPK+9u84ZBRjmKhbleJC3orhSuv6Y3tk0jX/KiZn+XIyXAsOpHyIrBecyWASmAJF7eQ2PUaexEoOQ/upNpWL58AGpglgzBt/aKfzoe5EbxCAnxD0gYzkNXkCL8h5/gq3tEQ9LFOWEQpWjQ/SARYUBfULj77JZikedYrPqMleFAN1806XyUYRGPWIjoHJPgQB9wK7iCwedaLOVMl+ORbqGp2Ckg0JAuoVnlqSrVI87OQdNQJ8IjTqEp8Ikp0oBuwWnt8BzFIC7BWctwGsEjzs5J+QAYxiOO4THGZBnBIC7hUeO0HMUob4/j+rlp5IODceOKuWnkg4NzZIoqhzY8wEzA42EzS4BsgTEcstYDtgs4F10src0ETW0rt6jmm7EUp8OqhzHJEgfYyD0MI7wz29INop6Xsj/1ITVjiESbr3U3Qz5vFfEMwjuUCmoSazBRgBEcn2dGrFeJQUWrtptmh8ss3BPcqgZQDf6xldyya7RoTdvqidFOlzC5KnuZaeYXG9zDdTDR/abmpE+cQHMCbtM+6zNQdm+dtHMWJxCMB4dYcK/hes7oSB/ID9P5rAlR98YBM/qDkhp4/56J7JR0id0vx1O7FZm0lidt+WSCS+sEfi+YbZncQ+0ANxjdId/pMOwXigROqf//PP/w9Gu8a9"
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/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,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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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,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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/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,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/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">
 
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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/a981b8d038d88e8ba119497649d674b3106a6462/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/{concept_01_highload_candle_storage.html → concept_04_highload_candle_storage.html} RENAMED
@@ -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>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>
 
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/04_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_04_highload_candle_storage.html">concept/04_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>
functions/types.addActionSchema.html CHANGED
@@ -29,7 +29,7 @@ emitted during strategy execution. Multiple actions can be attached to a single
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-0">// Using class-based handler</span><br/><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">TelegramNotifier</span><span class="hl-2"> </span><span class="hl-4">implements</span><span class="hl-2"> </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">IPublicAction</span><span class="hl-2">&gt; {</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">private</span><span class="hl-2"> </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">StrategyName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">private</span><span class="hl-2"> </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">FrameName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">private</span><span class="hl-2"> </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">ActionName</span><br/><span class="hl-2"> ) {}</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">init</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">bot</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">TelegramBot</span><span class="hl-2">(</span><span class="hl-5">process</span><span class="hl-2">.</span><span class="hl-5">env</span><span class="hl-2">.</span><span class="hl-7">TELEGRAM_TOKEN</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">bot</span><span class="hl-2">.</span><span class="hl-1">connect</span><span class="hl-2">();</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">signal</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">IStrategyTickResult</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">event</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2"> === </span><span class="hl-3">&#39;opened&#39;</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">bot</span><span class="hl-2">.</span><span class="hl-1">send</span><span class="hl-2">(</span><span class="hl-3">`New signal: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">signal</span><span class="hl-11">.</span><span class="hl-5">side</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">dispose</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">bot</span><span class="hl-2">?.</span><span class="hl-1">disconnect</span><span class="hl-2">();</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-1">addAction</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">actionName:</span><span class="hl-2"> </span><span class="hl-3">&quot;telegram-notifier&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">handler:</span><span class="hl-2"> </span><span class="hl-5">TelegramNotifier</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onInit</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">actionName</span><span class="hl-2">, </span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">frameName</span><span class="hl-2">, </span><span class="hl-5">backtest</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">actionName</span><span class="hl-4">}</span><span class="hl-3">] Initialized for </span><span class="hl-4">${</span><span class="hl-5">strategyName</span><span class="hl-4">}</span><span class="hl-3">/</span><span class="hl-4">${</span><span class="hl-5">frameName</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onSignal</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">event</span><span class="hl-2">, </span><span class="hl-5">actionName</span><span class="hl-2">, </span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">frameName</span><span class="hl-2">, </span><span class="hl-5">backtest</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">actionName</span><span class="hl-4">}</span><span class="hl-3">] Signal event: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">action</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Using plain object handler</span><br/><span class="hl-1">addAction</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">actionName:</span><span class="hl-2"> </span><span class="hl-3">&quot;simple-logger&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">handler:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">signal</span><span class="hl-5">:</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><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">&#39;Signal:&#39;</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">breakeven</span><span class="hl-5">:</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><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">&#39;Breakeven triggered&#39;</span><span class="hl-2">),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {},</span><br/><span class="hl-2">});</span>
30
  </code><button type="button">Copy</button></pre>
31
 
32
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L8128">types.d.ts:8128</a></li></ul></aside></div></li></ul></section></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></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">
 
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-0">// Using class-based handler</span><br/><span class="hl-4">class</span><span class="hl-2"> </span><span class="hl-10">TelegramNotifier</span><span class="hl-2"> </span><span class="hl-4">implements</span><span class="hl-2"> </span><span class="hl-10">Partial</span><span class="hl-2">&lt;</span><span class="hl-10">IPublicAction</span><span class="hl-2">&gt; {</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">private</span><span class="hl-2"> </span><span class="hl-5">strategyName</span><span class="hl-2">: </span><span class="hl-10">StrategyName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">private</span><span class="hl-2"> </span><span class="hl-5">frameName</span><span class="hl-2">: </span><span class="hl-10">FrameName</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-4">private</span><span class="hl-2"> </span><span class="hl-5">actionName</span><span class="hl-2">: </span><span class="hl-10">ActionName</span><br/><span class="hl-2"> ) {}</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">init</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">bot</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">TelegramBot</span><span class="hl-2">(</span><span class="hl-5">process</span><span class="hl-2">.</span><span class="hl-5">env</span><span class="hl-2">.</span><span class="hl-7">TELEGRAM_TOKEN</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">bot</span><span class="hl-2">.</span><span class="hl-1">connect</span><span class="hl-2">();</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">signal</span><span class="hl-2">(</span><span class="hl-5">event</span><span class="hl-2">: </span><span class="hl-10">IStrategyTickResult</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">event</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2"> === </span><span class="hl-3">&#39;opened&#39;</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">bot</span><span class="hl-2">.</span><span class="hl-1">send</span><span class="hl-2">(</span><span class="hl-3">`New signal: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">signal</span><span class="hl-11">.</span><span class="hl-5">side</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">dispose</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">bot</span><span class="hl-2">?.</span><span class="hl-1">disconnect</span><span class="hl-2">();</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-1">addAction</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">actionName:</span><span class="hl-2"> </span><span class="hl-3">&quot;telegram-notifier&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">handler:</span><span class="hl-2"> </span><span class="hl-5">TelegramNotifier</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onInit</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">actionName</span><span class="hl-2">, </span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">frameName</span><span class="hl-2">, </span><span class="hl-5">backtest</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">actionName</span><span class="hl-4">}</span><span class="hl-3">] Initialized for </span><span class="hl-4">${</span><span class="hl-5">strategyName</span><span class="hl-4">}</span><span class="hl-3">/</span><span class="hl-4">${</span><span class="hl-5">frameName</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onSignal</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">event</span><span class="hl-2">, </span><span class="hl-5">actionName</span><span class="hl-2">, </span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">frameName</span><span class="hl-2">, </span><span class="hl-5">backtest</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">actionName</span><span class="hl-4">}</span><span class="hl-3">] Signal event: </span><span class="hl-4">${</span><span class="hl-5">event</span><span class="hl-11">.</span><span class="hl-5">action</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Using plain object handler</span><br/><span class="hl-1">addAction</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">actionName:</span><span class="hl-2"> </span><span class="hl-3">&quot;simple-logger&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">handler:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">signal</span><span class="hl-5">:</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><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">&#39;Signal:&#39;</span><span class="hl-2">, </span><span class="hl-5">event</span><span class="hl-2">.</span><span class="hl-5">action</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">breakeven</span><span class="hl-5">:</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><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">&#39;Breakeven triggered&#39;</span><span class="hl-2">),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {},</span><br/><span class="hl-2">});</span>
30
  </code><button type="button">Copy</button></pre>
31
 
32
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L8128">types.d.ts:8128</a></li></ul></aside></div></li></ul></section></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></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">
functions/types.addExchangeSchema.html CHANGED
@@ -29,7 +29,7 @@ Optional. If not provided, throws an error when called.</p>
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addExchange</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-3">&quot;binance&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">getCandles</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</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">since</span><span class="hl-2">, </span><span class="hl-5">limit</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-0">// Fetch from Binance API or database</span><br/><span class="hl-2"> </span><span class="hl-6">return</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">Date</span><span class="hl-2">.</span><span class="hl-1">now</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-8">50000</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-8">51000</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-8">49000</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-8">50500</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-8">1000</span><span class="hl-2">,</span><br/><span class="hl-2"> }];</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">formatPrice</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">price</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">price</span><span class="hl-2">.</span><span class="hl-1">toFixed</span><span class="hl-2">(</span><span class="hl-8">2</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">formatQuantity</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">quantity</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">quantity</span><span class="hl-2">.</span><span class="hl-1">toFixed</span><span class="hl-2">(</span><span class="hl-8">8</span><span class="hl-2">),</span><br/><span class="hl-2">});</span>
30
  </code><button type="button">Copy</button></pre>
31
 
32
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7875">types.d.ts:7875</a></li></ul></aside></div></li></ul></section></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></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">
 
29
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addExchange</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-3">&quot;binance&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">getCandles</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</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">since</span><span class="hl-2">, </span><span class="hl-5">limit</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-0">// Fetch from Binance API or database</span><br/><span class="hl-2"> </span><span class="hl-6">return</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">Date</span><span class="hl-2">.</span><span class="hl-1">now</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-8">50000</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-8">51000</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-8">49000</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-8">50500</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-8">1000</span><span class="hl-2">,</span><br/><span class="hl-2"> }];</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">formatPrice</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">price</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">price</span><span class="hl-2">.</span><span class="hl-1">toFixed</span><span class="hl-2">(</span><span class="hl-8">2</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">formatQuantity</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">quantity</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><span class="hl-2"> </span><span class="hl-5">quantity</span><span class="hl-2">.</span><span class="hl-1">toFixed</span><span class="hl-2">(</span><span class="hl-8">8</span><span class="hl-2">),</span><br/><span class="hl-2">});</span>
30
  </code><button type="button">Copy</button></pre>
31
 
32
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7875">types.d.ts:7875</a></li></ul></aside></div></li></ul></section></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></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">
functions/types.addFrameSchema.html CHANGED
@@ -17,7 +17,7 @@ Defines backtest period and interval for timestamp generation.</p>
17
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addFrame</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">frameName:</span><span class="hl-2"> </span><span class="hl-3">&quot;1d-backtest&quot;</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-3">&quot;1m&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">startDate:</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;2024-01-01T00:00:00Z&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">endDate:</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;2024-01-02T00:00:00Z&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onTimeframe</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">timeframe</span><span class="hl-2">, </span><span class="hl-5">startDate</span><span class="hl-2">, </span><span class="hl-5">endDate</span><span class="hl-2">, </span><span class="hl-5">interval</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">`Generated </span><span class="hl-4">${</span><span class="hl-5">timeframe</span><span class="hl-11">.</span><span class="hl-5">length</span><span class="hl-4">}</span><span class="hl-3"> timeframes`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
18
  </code><button type="button">Copy</button></pre>
19
 
20
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7906">types.d.ts:7906</a></li></ul></aside></div></li></ul></section></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></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>
21
 
22
  <!-- Yandex.Metrika counter -->
23
  <script type="text/javascript">
 
17
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addFrame</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">frameName:</span><span class="hl-2"> </span><span class="hl-3">&quot;1d-backtest&quot;</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-3">&quot;1m&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">startDate:</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;2024-01-01T00:00:00Z&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">endDate:</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;2024-01-02T00:00:00Z&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onTimeframe</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">timeframe</span><span class="hl-2">, </span><span class="hl-5">startDate</span><span class="hl-2">, </span><span class="hl-5">endDate</span><span class="hl-2">, </span><span class="hl-5">interval</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">`Generated </span><span class="hl-4">${</span><span class="hl-5">timeframe</span><span class="hl-11">.</span><span class="hl-5">length</span><span class="hl-4">}</span><span class="hl-3"> timeframes`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
18
  </code><button type="button">Copy</button></pre>
19
 
20
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7906">types.d.ts:7906</a></li></ul></aside></div></li></ul></section></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></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>
21
 
22
  <!-- Yandex.Metrika counter -->
23
  <script type="text/javascript">
functions/types.addRiskSchema.html CHANGED
@@ -18,7 +18,7 @@ Defines portfolio-level risk controls via custom validations.</p>
18
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-0">// Basic risk limit</span><br/><span class="hl-1">addRisk</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">riskName:</span><span class="hl-2"> </span><span class="hl-3">&quot;conservative&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxConcurrentPositions:</span><span class="hl-2"> </span><span class="hl-8">5</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// With custom validations (access to signal data and portfolio state)</span><br/><span class="hl-1">addRisk</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">riskName:</span><span class="hl-2"> </span><span class="hl-3">&quot;advanced&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxConcurrentPositions:</span><span class="hl-2"> </span><span class="hl-8">10</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">validations:</span><span class="hl-2"> [</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">validate</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> ({ </span><span class="hl-5">params</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-0">// params contains: symbol, strategyName, exchangeName, signal, currentPrice, timestamp</span><br/><span class="hl-2"> </span><span class="hl-0">// Calculate portfolio metrics from external data source</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">portfolio</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">getPortfolioState</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">portfolio</span><span class="hl-2">.</span><span class="hl-5">drawdown</span><span class="hl-2"> &gt; </span><span class="hl-8">20</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;Portfolio drawdown exceeds 20%&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">docDescription:</span><span class="hl-2"> </span><span class="hl-3">&quot;Prevents trading during high drawdown&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> ({ </span><span class="hl-5">params</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-0">// Access signal details</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">positionValue</span><span class="hl-2"> = </span><span class="hl-1">calculatePositionValue</span><span class="hl-2">(</span><span class="hl-5">params</span><span class="hl-2">.</span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">params</span><span class="hl-2">.</span><span class="hl-5">currentPrice</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">positionValue</span><span class="hl-2"> &gt; </span><span class="hl-8">10000</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;Position value exceeds $10,000 limit&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> ],</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onRejected</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">reason</span><span class="hl-2">, </span><span class="hl-5">limit</span><span class="hl-2">, </span><span class="hl-5">params</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">`[RISK] Signal rejected for </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">reason</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onAllowed</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">params</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">`[RISK] Signal allowed for </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-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
19
  </code><button type="button">Copy</button></pre>
20
 
21
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L8059">types.d.ts:8059</a></li></ul></aside></div></li></ul></section></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></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>
22
 
23
  <!-- Yandex.Metrika counter -->
24
  <script type="text/javascript">
 
18
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-0">// Basic risk limit</span><br/><span class="hl-1">addRisk</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">riskName:</span><span class="hl-2"> </span><span class="hl-3">&quot;conservative&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxConcurrentPositions:</span><span class="hl-2"> </span><span class="hl-8">5</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// With custom validations (access to signal data and portfolio state)</span><br/><span class="hl-1">addRisk</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">riskName:</span><span class="hl-2"> </span><span class="hl-3">&quot;advanced&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxConcurrentPositions:</span><span class="hl-2"> </span><span class="hl-8">10</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">validations:</span><span class="hl-2"> [</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">validate</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> ({ </span><span class="hl-5">params</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-0">// params contains: symbol, strategyName, exchangeName, signal, currentPrice, timestamp</span><br/><span class="hl-2"> </span><span class="hl-0">// Calculate portfolio metrics from external data source</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">portfolio</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">getPortfolioState</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">portfolio</span><span class="hl-2">.</span><span class="hl-5">drawdown</span><span class="hl-2"> &gt; </span><span class="hl-8">20</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;Portfolio drawdown exceeds 20%&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-5">docDescription:</span><span class="hl-2"> </span><span class="hl-3">&quot;Prevents trading during high drawdown&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> ({ </span><span class="hl-5">params</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-0">// Access signal details</span><br/><span class="hl-2"> </span><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">positionValue</span><span class="hl-2"> = </span><span class="hl-1">calculatePositionValue</span><span class="hl-2">(</span><span class="hl-5">params</span><span class="hl-2">.</span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">params</span><span class="hl-2">.</span><span class="hl-5">currentPrice</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">positionValue</span><span class="hl-2"> &gt; </span><span class="hl-8">10000</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">Error</span><span class="hl-2">(</span><span class="hl-3">&quot;Position value exceeds $10,000 limit&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> ],</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onRejected</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">reason</span><span class="hl-2">, </span><span class="hl-5">limit</span><span class="hl-2">, </span><span class="hl-5">params</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">`[RISK] Signal rejected for </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">reason</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onAllowed</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">params</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">`[RISK] Signal allowed for </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-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
19
  </code><button type="button">Copy</button></pre>
20
 
21
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L8059">types.d.ts:8059</a></li></ul></aside></div></li></ul></section></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></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>
22
 
23
  <!-- Yandex.Metrika counter -->
24
  <script type="text/javascript">
functions/types.addSizingSchema.html CHANGED
@@ -10,7 +10,7 @@
10
  </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><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-0">// Fixed percentage sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;conservative&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;fixed-percentage&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">riskPercentage:</span><span class="hl-2"> </span><span class="hl-8">1</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxPositionPercentage:</span><span class="hl-2"> </span><span class="hl-8">10</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Kelly Criterion sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;kelly&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;kelly-criterion&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">kellyMultiplier:</span><span class="hl-2"> </span><span class="hl-8">0.25</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxPositionPercentage:</span><span class="hl-2"> </span><span class="hl-8">20</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// ATR-based sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;atr-dynamic&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;atr-based&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">riskPercentage:</span><span class="hl-2"> </span><span class="hl-8">2</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">atrMultiplier:</span><span class="hl-2"> </span><span class="hl-8">2</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onCalculate</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">quantity</span><span class="hl-2">, </span><span class="hl-5">params</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">`Calculated size: </span><span class="hl-4">${</span><span class="hl-5">quantity</span><span class="hl-4">}</span><span class="hl-3"> for </span><span class="hl-4">${</span><span class="hl-5">params</span><span class="hl-11">.</span><span class="hl-5">symbol</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7997">types.d.ts:7997</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">
 
10
  </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><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-0">// Fixed percentage sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;conservative&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;fixed-percentage&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">riskPercentage:</span><span class="hl-2"> </span><span class="hl-8">1</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxPositionPercentage:</span><span class="hl-2"> </span><span class="hl-8">10</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// Kelly Criterion sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;kelly&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;kelly-criterion&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">kellyMultiplier:</span><span class="hl-2"> </span><span class="hl-8">0.25</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">maxPositionPercentage:</span><span class="hl-2"> </span><span class="hl-8">20</span><span class="hl-2">,</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-0">// ATR-based sizing</span><br/><span class="hl-1">addSizing</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">sizingName:</span><span class="hl-2"> </span><span class="hl-3">&quot;atr-dynamic&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">method:</span><span class="hl-2"> </span><span class="hl-3">&quot;atr-based&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">riskPercentage:</span><span class="hl-2"> </span><span class="hl-8">2</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">atrMultiplier:</span><span class="hl-2"> </span><span class="hl-8">2</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onCalculate</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">quantity</span><span class="hl-2">, </span><span class="hl-5">params</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">`Calculated size: </span><span class="hl-4">${</span><span class="hl-5">quantity</span><span class="hl-4">}</span><span class="hl-3"> for </span><span class="hl-4">${</span><span class="hl-5">params</span><span class="hl-11">.</span><span class="hl-5">symbol</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7997">types.d.ts:7997</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">
functions/types.addStrategySchema.html CHANGED
@@ -23,7 +23,7 @@ If priceOpen is omitted - opens immediately at current price.</p>
23
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addStrategy</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">strategyName:</span><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy&quot;</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-3">&quot;5m&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">getSignal</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</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">position:</span><span class="hl-2"> </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceOpen:</span><span class="hl-2"> </span><span class="hl-8">50000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceTakeProfit:</span><span class="hl-2"> </span><span class="hl-8">51000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceStopLoss:</span><span class="hl-2"> </span><span class="hl-8">49000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">minuteEstimatedTime:</span><span class="hl-2"> </span><span class="hl-8">60</span><span class="hl-2">,</span><br/><span class="hl-2"> }),</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onOpen</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">currentPrice</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><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">&quot;Signal opened&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">onClose</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">priceClose</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><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">&quot;Signal closed&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
24
  </code><button type="button">Copy</button></pre>
25
 
26
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7839">types.d.ts:7839</a></li></ul></aside></div></li></ul></section></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></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">
 
23
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addStrategy</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">strategyName:</span><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy&quot;</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-3">&quot;5m&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">getSignal</span><span class="hl-5">:</span><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> (</span><span class="hl-5">symbol</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">position:</span><span class="hl-2"> </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceOpen:</span><span class="hl-2"> </span><span class="hl-8">50000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceTakeProfit:</span><span class="hl-2"> </span><span class="hl-8">51000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">priceStopLoss:</span><span class="hl-2"> </span><span class="hl-8">49000</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">minuteEstimatedTime:</span><span class="hl-2"> </span><span class="hl-8">60</span><span class="hl-2">,</span><br/><span class="hl-2"> }),</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onOpen</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">currentPrice</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><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">&quot;Signal opened&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> </span><span class="hl-1">onClose</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">signal</span><span class="hl-2">, </span><span class="hl-5">priceClose</span><span class="hl-2">, </span><span class="hl-5">backtest</span><span class="hl-2">) </span><span class="hl-4">=&gt;</span><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">&quot;Signal closed&quot;</span><span class="hl-2">),</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span>
24
  </code><button type="button">Copy</button></pre>
25
 
26
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7839">types.d.ts:7839</a></li></ul></aside></div></li></ul></section></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></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">
functions/types.addWalkerSchema.html CHANGED
@@ -14,7 +14,7 @@ Defines A/B testing configuration for multiple strategies.</p>
14
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addWalker</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">walkerName:</span><span class="hl-2"> </span><span class="hl-3">&quot;llm-prompt-optimizer&quot;</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-3">&quot;binance&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">frameName:</span><span class="hl-2"> </span><span class="hl-3">&quot;1d-backtest&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">strategies:</span><span class="hl-2"> [</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v1&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v2&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v3&quot;</span><br/><span class="hl-2"> ],</span><br/><span class="hl-2"> </span><span class="hl-5">metric:</span><span class="hl-2"> </span><span class="hl-3">&quot;sharpeRatio&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onStrategyComplete</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">stats</span><span class="hl-2">, </span><span class="hl-5">metric</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">strategyName</span><span class="hl-4">}</span><span class="hl-3">: </span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onComplete</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">results</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">`Best strategy: </span><span class="hl-4">${</span><span class="hl-5">results</span><span class="hl-11">.</span><span class="hl-5">bestStrategy</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">});</span>
15
  </code><button type="button">Copy</button></pre>
16
 
17
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7944">types.d.ts:7944</a></li></ul></aside></div></li></ul></section></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></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">
 
14
  </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><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-1">addWalker</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">walkerName:</span><span class="hl-2"> </span><span class="hl-3">&quot;llm-prompt-optimizer&quot;</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-3">&quot;binance&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">frameName:</span><span class="hl-2"> </span><span class="hl-3">&quot;1d-backtest&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">strategies:</span><span class="hl-2"> [</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v1&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v2&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-3">&quot;my-strategy-v3&quot;</span><br/><span class="hl-2"> ],</span><br/><span class="hl-2"> </span><span class="hl-5">metric:</span><span class="hl-2"> </span><span class="hl-3">&quot;sharpeRatio&quot;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">callbacks:</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">onStrategyComplete</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">strategyName</span><span class="hl-2">, </span><span class="hl-5">symbol</span><span class="hl-2">, </span><span class="hl-5">stats</span><span class="hl-2">, </span><span class="hl-5">metric</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">strategyName</span><span class="hl-4">}</span><span class="hl-3">: </span><span class="hl-4">${</span><span class="hl-5">metric</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">onComplete</span><span class="hl-5">:</span><span class="hl-2"> (</span><span class="hl-5">results</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">`Best strategy: </span><span class="hl-4">${</span><span class="hl-5">results</span><span class="hl-11">.</span><span class="hl-5">bestStrategy</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">});</span>
15
  </code><button type="button">Copy</button></pre>
16
 
17
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7944">types.d.ts:7944</a></li></ul></aside></div></li></ul></section></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></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">
functions/types.alignToInterval.html CHANGED
@@ -14,7 +14,7 @@ For example, for 15m interval: 00:17 -&gt; 00:15, 00:44 -&gt; 00:30</p>
14
  </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="aligntointerval" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alignToInterval</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">interval</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><a href="#aligntointerval" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div 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">date</span>: <span class="tsd-signature-type">Date</span></span><div class="tsd-comment tsd-typography"><p>Date to align</p>
15
  </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 (e.g., &quot;1m&quot;, &quot;15m&quot;, &quot;1h&quot;)</p>
16
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Date</span></h4><p>New Date aligned down to interval boundary</p>
17
- <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#L31814">types.d.ts:31814</a></li></ul></aside></div></li></ul></section></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></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">
 
14
  </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="aligntointerval" class="tsd-anchor"></a><span class="tsd-kind-call-signature">alignToInterval</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">date</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">interval</span><span class="tsd-signature-symbol">:</span> <a href="../types/types.CandleInterval.html" class="tsd-signature-type tsd-kind-type-alias">CandleInterval</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span><a href="#aligntointerval" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div 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">date</span>: <span class="tsd-signature-type">Date</span></span><div class="tsd-comment tsd-typography"><p>Date to align</p>
15
  </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 (e.g., &quot;1m&quot;, &quot;15m&quot;, &quot;1h&quot;)</p>
16
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Date</span></h4><p>New Date aligned down to interval boundary</p>
17
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L31814">types.d.ts:31814</a></li></ul></aside></div></li></ul></section></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></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">
functions/types.beginContext.html CHANGED
@@ -13,7 +13,7 @@ so it is a transparent drop-in replacement.</p>
13
  </div><div class="tsd-comment tsd-typography"></div></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">run</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a></span><div class="tsd-comment tsd-typography"><p>Function to wrap.</p>
14
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A new function with the same signature as <code>run</code> that escapes any
15
  active context before executing.</p>
16
- <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#L31943">types.d.ts:31943</a></li></ul></aside></div></li></ul></section></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></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>
17
 
18
  <!-- Yandex.Metrika counter -->
19
  <script type="text/javascript">
 
13
  </div><div class="tsd-comment tsd-typography"></div></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">run</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a></span><div class="tsd-comment tsd-typography"><p>Function to wrap.</p>
14
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginContext.html#begincontextt">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A new function with the same signature as <code>run</code> that escapes any
15
  active context before executing.</p>
16
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L31943">types.d.ts:31943</a></li></ul></aside></div></li></ul></section></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></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>
17
 
18
  <!-- Yandex.Metrika counter -->
19
  <script type="text/javascript">
functions/types.beginTime.html CHANGED
@@ -12,7 +12,7 @@ async operations.</p>
12
  </div><div class="tsd-comment tsd-typography"></div></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">run</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a></span><div class="tsd-comment tsd-typography"><p>The function to be wrapped and executed outside of context</p>
13
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A curried function that accepts the original function's parameters
14
  and executes it outside of the current context if one exists</p>
15
- <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#L31979">types.d.ts:31979</a></li></ul></aside></div></li></ul></section></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></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>
16
 
17
  <!-- Yandex.Metrika counter -->
18
  <script type="text/javascript">
 
12
  </div><div class="tsd-comment tsd-typography"></div></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">run</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a></span><div class="tsd-comment tsd-typography"><p>The function to be wrapped and executed outside of context</p>
13
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="types.beginTime.html#begintimet">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>A curried function that accepts the original function's parameters
14
  and executes it outside of the current context if one exists</p>
15
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L31979">types.d.ts:31979</a></li></ul></aside></div></li></ul></section></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></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>
16
 
17
  <!-- Yandex.Metrika counter -->
18
  <script type="text/javascript">
functions/types.cacheCandles.html CHANGED
@@ -2,7 +2,7 @@
2
  Runs a check-then-warm pipeline with one retry: validates the cache first
3
  and, on a miss, downloads the missing data and re-validates.</p>
4
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">ICacheCandlesParams</span></span><div class="tsd-comment tsd-typography"><p>Combined cache parameters with optional lifecycle callbacks</p>
5
- </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><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L5088">types.d.ts:5088</a></li></ul></aside></div></li></ul></section></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></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>
6
 
7
  <!-- Yandex.Metrika counter -->
8
  <script type="text/javascript">
 
2
  Runs a check-then-warm pipeline with one retry: validates the cache first
3
  and, on a miss, downloads the missing data and re-validates.</p>
4
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">ICacheCandlesParams</span></span><div class="tsd-comment tsd-typography"><p>Combined cache parameters with optional lifecycle callbacks</p>
5
+ </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><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L5088">types.d.ts:5088</a></li></ul></aside></div></li></ul></section></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></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>
6
 
7
  <!-- Yandex.Metrika counter -->
8
  <script type="text/javascript">
functions/types.checkCandles.html CHANGED
@@ -2,7 +2,7 @@
2
  Issues one ranged read; adapter-side <code>hasValue</code> covers each expected timestamp,
3
  so a single missing or unaligned candle yields a miss without loading the whole dataset.</p>
4
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">ICheckCandlesParams</span></span><div class="tsd-comment tsd-typography"><p>Validation parameters</p>
5
- </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><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L5073">types.d.ts:5073</a></li></ul></aside></div></li></ul></section></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></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>
6
 
7
  <!-- Yandex.Metrika counter -->
8
  <script type="text/javascript">
 
2
  Issues one ranged read; adapter-side <code>hasValue</code> covers each expected timestamp,
3
  so a single missing or unaligned candle yields a miss without loading the whole dataset.</p>
4
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">params</span>: <span class="tsd-signature-type">ICheckCandlesParams</span></span><div class="tsd-comment tsd-typography"><p>Validation parameters</p>
5
+ </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><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L5073">types.d.ts:5073</a></li></ul></aside></div></li></ul></section></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></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>
6
 
7
  <!-- Yandex.Metrika counter -->
8
  <script type="text/javascript">
functions/types.commitActivateScheduled.html CHANGED
@@ -8,7 +8,7 @@ happens on the next tick() when strategy detects the flag.</p>
8
  <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">commitActivateScheduled</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">// Activate scheduled signal early with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitActivateScheduled</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-activate-001&quot;</span><span class="hl-2"> });</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L6090">types.d.ts:6090</a></li></ul></aside></div></li></ul></section></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></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>
12
 
13
  <!-- Yandex.Metrika counter -->
14
  <script type="text/javascript">
 
8
  <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">commitActivateScheduled</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">// Activate scheduled signal early with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitActivateScheduled</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-activate-001&quot;</span><span class="hl-2"> });</span>
9
  </code><button type="button">Copy</button></pre>
10
 
11
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L6090">types.d.ts:6090</a></li></ul></aside></div></li></ul></section></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></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>
12
 
13
  <!-- Yandex.Metrika counter -->
14
  <script type="text/javascript">
functions/types.commitAverageBuy.html CHANGED
@@ -9,7 +9,7 @@ Automatically fetches current price via getAveragePrice.</p>
9
  <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">commitAverageBuy</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">// Add DCA entry at current market price</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">success</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitAverageBuy</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">success</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">&quot;DCA entry added&quot;</span><span class="hl-2">);</span><br/><span class="hl-2">}</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L6115">types.d.ts:6115</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
 
9
  <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">commitAverageBuy</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">// Add DCA entry at current market price</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">success</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitAverageBuy</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">success</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">&quot;DCA entry added&quot;</span><span class="hl-2">);</span><br/><span class="hl-2">}</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L6115">types.d.ts:6115</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
functions/types.commitBreakeven.html CHANGED
@@ -9,7 +9,7 @@ Automatically fetches current price via getAveragePrice.</p>
9
  <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">breakeven</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">// LONG: entry=100, slippage=0.1%, fee=0.1%, threshold=0.4%</span><br/><span class="hl-0">// Try to move SL to breakeven (activates when price &gt;= 100.4)</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">moved</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">breakeven</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">moved</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">&quot;Position moved to breakeven!&quot;</span><span class="hl-2">);</span><br/><span class="hl-2">}</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L6069">types.d.ts:6069</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
 
9
  <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">breakeven</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">// LONG: entry=100, slippage=0.1%, fee=0.1%, threshold=0.4%</span><br/><span class="hl-0">// Try to move SL to breakeven (activates when price &gt;= 100.4)</span><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">moved</span><span class="hl-2"> = </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">breakeven</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">);</span><br/><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-5">moved</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">&quot;Position moved to breakeven!&quot;</span><span class="hl-2">);</span><br/><span class="hl-2">}</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L6069">types.d.ts:6069</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
functions/types.commitCancelScheduled.html CHANGED
@@ -9,7 +9,7 @@ Does NOT set stop flag - strategy can continue generating new signals.</p>
9
  <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">commitCancelScheduled</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">// Cancel scheduled signal with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCancelScheduled</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-cancel-001&quot;</span><span class="hl-2"> });</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L5849">types.d.ts:5849</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
 
9
  <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">commitCancelScheduled</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">// Cancel scheduled signal with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCancelScheduled</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-cancel-001&quot;</span><span class="hl-2"> });</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L5849">types.d.ts:5849</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
functions/types.commitClosePending.html CHANGED
@@ -9,7 +9,7 @@ Does NOT set stop flag - strategy can continue generating new signals.</p>
9
  <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">commitClosePending</span><span class="hl-2"> } </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;backtest-kit&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-0">// Close pending signal with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitClosePending</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-close-001&quot;</span><span class="hl-2"> });</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L5871">types.d.ts:5871</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
 
9
  <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">commitClosePending</span><span class="hl-2"> } </span><span class="hl-6">from</span><span class="hl-2"> </span><span class="hl-3">&quot;backtest-kit&quot;</span><span class="hl-2">;</span><br/><br/><span class="hl-0">// Close pending signal with custom ID</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitClosePending</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;manual-close-001&quot;</span><span class="hl-2"> });</span>
10
  </code><button type="button">Copy</button></pre>
11
 
12
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L5871">types.d.ts:5871</a></li></ul></aside></div></li></ul></section></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></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>
13
 
14
  <!-- Yandex.Metrika counter -->
15
  <script type="text/javascript">
functions/types.commitCreateSignal.html CHANGED
@@ -10,7 +10,7 @@ call is rejected if a signal or deferred action is already in flight.</p>
10
  <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">createSignal</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">// Open immediately at current price</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateSignal</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">position:</span><span class="hl-2"> </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2">, </span><span class="hl-5">priceTakeProfit:</span><span class="hl-2"> </span><span class="hl-8">110</span><span class="hl-2">, </span><span class="hl-5">priceStopLoss:</span><span class="hl-2"> </span><span class="hl-8">90</span><span class="hl-2"> });</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7079">types.d.ts:7079</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">
 
10
  <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">createSignal</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">// Open immediately at current price</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateSignal</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">position:</span><span class="hl-2"> </span><span class="hl-3">&quot;long&quot;</span><span class="hl-2">, </span><span class="hl-5">priceTakeProfit:</span><span class="hl-2"> </span><span class="hl-8">110</span><span class="hl-2">, </span><span class="hl-5">priceStopLoss:</span><span class="hl-2"> </span><span class="hl-8">90</span><span class="hl-2"> });</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7079">types.d.ts:7079</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">
functions/types.commitCreateStopLoss.html CHANGED
@@ -10,7 +10,7 @@ but the real order may fill on high/low. The close is deferred and emitted with
10
  <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">commitCreateStopLoss</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">// Report SL fill confirmed on the exchange</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateStopLoss</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;sl-fill-001&quot;</span><span class="hl-2"> });</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/38c3f4c07dbcd4a051226b7e2c4efe6dba410763/types.d.ts#L7125">types.d.ts:7125</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">
 
10
  <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">commitCreateStopLoss</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">// Report SL fill confirmed on the exchange</span><br/><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-1">commitCreateStopLoss</span><span class="hl-2">(</span><span class="hl-3">&quot;BTCUSDT&quot;</span><span class="hl-2">, { </span><span class="hl-5">id:</span><span class="hl-2"> </span><span class="hl-3">&quot;sl-fill-001&quot;</span><span class="hl-2"> });</span>
11
  </code><button type="button">Copy</button></pre>
12
 
13
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/a981b8d038d88e8ba119497649d674b3106a6462/types.d.ts#L7125">types.d.ts:7125</a></li></ul></aside></div></li></ul></section></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></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>
14
 
15
  <!-- Yandex.Metrika counter -->
16
  <script type="text/javascript">