{"id":459407,"date":"2025-05-13T03:00:37","date_gmt":"2025-05-13T03:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459407"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459407","title":{"rendered":"<span>Pine Script \u0432 \u0434\u0435\u043b\u0435: \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0441 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0435\u0439 \u0438 R\u00b2 (\u043f\u043e \u043c\u043e\u0442\u0438\u0432\u0430\u043c S&amp;C \u0438\u0437 2007 \u0433\u043e\u0434\u0430) \u043d\u0430 \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0411\u0438\u0440\u0436\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u044f \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u0438\u0437 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 Traders\u2019 Tips \u0436\u0443\u0440\u043d\u0430\u043b\u0430 Technical Analysis of STOCKS &amp; COMMODITIES \u0437\u0430 2001-2005 \u0438 2006-2010 \u0433\u043e\u0434\u044b. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 &#8212; \u043e\u0442 \u0438\u0440\u043e\u043d\u0438\u0447\u043d\u044b\u0445 \u201c\u043e\u043f\u044f\u0442\u044c \u043a\u043e\u043c\u0438\u043a\u0441\u044b?\u201d \u0434\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0438 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0430\u0445. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0434\u0435\u043b\u0443 \u0438\u043d\u0430\u0447\u0435.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/903434\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed_link embed_layout-right\"><\/p>\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a1a\/0f4\/9cb\/a1a0f49cbf1ab0ef16334534c048a479.png&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430 2001-2005 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0435\u0439\u0448\u0435\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0443<\/span><\/div>\n<div class=\"embed__caption-description\">\u041f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0435\u043c\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0425\u0430\u0431\u0440\u0430, \u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e&#8230;<\/div>\n<p><span class=\"embed__caption-host\">habr.com<\/span><\/div>\n<p><\/a><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0434\u0435\u0435: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043d\u0430 Pine Script \u0434\u043b\u044f TradingView \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430\u0445 \u0441 \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0411\u0438\u0440\u0436\u0438. \u041a\u0441\u0442\u0430\u0442\u0438, Traders\u2019 Tips &#8212; \u044d\u0442\u043e \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u0440\u0443\u0431\u0440\u0438\u043a\u0430 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c: \u0435\u0451 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u0435\u043b\u0438\u043a\u0430.  <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/907030\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed_link embed_layout-right\"><\/p>\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c6\/422\/38f\/4c642238f47661f8f94a86dfce048265.png&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430 2006-2010 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0435\u0439\u0448\u0435\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0443<\/span><\/div>\n<div class=\"embed__caption-description\">\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u0434\u0435\u0438 \u0438\u0437 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 Technical Analysis of STOCKS &amp; COMMODITIES. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447&#8230;<\/div>\n<p><span class=\"embed__caption-host\">habr.com<\/span><\/div>\n<p><\/a><\/p>\n<p>\u0412 \u0446\u0435\u043d\u0442\u0440\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f &#8212; \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0411\u0430\u0440\u0431\u0430\u0440\u044b \u0421\u0442\u0430\u0440 \u201cConfirming Price Trend\u201d (S&amp;C, \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2007). \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430? \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u043d\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 R\u00b2 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u043d\u0430 \u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0438 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.<\/p>\n<p> \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; \u0442\u0435\u043e\u0440\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u043a\u043e\u0434 \u043d\u0430 Pine Script, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee1\/abe\/fb4\/ee1abefb4b2f03773952469586336908.png\" alt=\"\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442 \" title=\"\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442 \" width=\"1333\" height=\"773\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ee1\/abe\/fb4\/ee1abefb4b2f03773952469586336908.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ee1\/abe\/fb4\/ee1abefb4b2f03773952469586336908.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. <a href=\"https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442<\/a> <\/figcaption><\/div>\n<\/figure>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0438 R-squared: \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0435\u0434\u0435\u0442\u0435 \u043f\u043e \u0434\u043e\u0440\u043e\u0433\u0435. \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f &#8212; \u044d\u0442\u043e \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0430, \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u0430\u044f \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c: \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u0443\u0440\u0441, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u043a\u043e\u0447\u043a\u0438 \u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b. \u0426\u0435\u043d\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 \u044d\u0442\u043e\u0439 &#171;\u0434\u043e\u0440\u043e\u0433\u0438&#187;, \u0430 \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0432 \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0435\u0434\u0435\u043c &#8212; \u0432\u0432\u0435\u0440\u0445 \u0438\u043b\u0438 \u0432\u043d\u0438\u0437. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e R-squared: \u044d\u0442\u043e \u043a\u0430\u043a \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 Wi-Fi. \u0415\u0441\u043b\u0438 \u043e\u043d \u0431\u043b\u0438\u0437\u043e\u043a \u043a 1 &#8212; \u0446\u0435\u043d\u0430 \u0447\u0451\u0442\u043a\u043e \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u0434\u043e\u043b\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0442\u0440\u0435\u043d\u0434 \u0441\u0438\u043b\u044c\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0431\u043b\u0438\u0436\u0435 \u043a \u043d\u0443\u043b\u044e &#8212; \u00ab\u0441\u0432\u044f\u0437\u044c\u00bb \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0440\u044b\u043d\u043e\u043a \u0448\u0443\u043c\u043d\u044b\u0439, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u044f\u0441\u043d\u043e\u0435.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/53c\/cb1\/6f9\/53ccb16f96ba1c3132f912a24400637a.png\" alt=\"\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442 \" title=\"\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. \u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442 \" width=\"1623\" height=\"1105\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/53c\/cb1\/6f9\/53ccb16f96ba1c3132f912a24400637a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/53c\/cb1\/6f9\/53ccb16f96ba1c3132f912a24400637a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. <a href=\"https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442<\/a> <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043a\u0440\u0443\u0447\u0435 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445? \u0423 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u043e\u043d\u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u00ab\u0441\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u00bb \u0440\u0430\u0437\u0432\u043e\u0440\u043e\u0442\u044b. \u0410 R-squared \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0435 \u0433\u0430\u0434\u0430\u0442\u044c &#8212; \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u043d\u0434 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435. \u0412\u043c\u0435\u0441\u0442\u0435 \u043e\u043d\u0438 \u0434\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u043d\u043e \u043c\u043e\u0449\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0448\u0443\u043c\u0430 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u043d\u0434\u0430.  <\/p>\n<h3>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0435<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u0430: <strong>10 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0438 \u0440\u0430\u043d\u043d\u0438\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, <strong>20 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, <strong>50 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0448\u0443\u043c\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0442\u0440\u0435\u043d\u0434\u0443. \u0412\u044b\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0438\u043b\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u0438 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430.  <\/p>\n<p><strong>R-squared<\/strong> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <em>\u0444\u0430\u0437\u0443 \u0442\u0440\u0435\u043d\u0434\u0430<\/em>: <\/p>\n<ul>\n<li>\n<p>\u0435\u0433\u043e <strong>\u0440\u043e\u0441\u0442<\/strong> \u0441 \u043d\u0438\u0437\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 0.1 \u0434\u043e 0.3) \u0447\u0430\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 <strong>\u043d\u0430\u0447\u0430\u043b\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0430\u0434\u0435\u043d\u0438\u0435<\/strong> \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 0.6 \u0434\u043e 0.3) \u2014 \u043f\u0440\u0438\u0437\u043d\u0430\u043a <strong>\u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u044f<\/strong> \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0444\u043b\u044d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0434\u043b\u044f 20 \u0431\u0430\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0438\u043c \u0443\u0440\u043e\u0432\u0435\u043d\u044c 0.20; <\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f 10: 0.40; <\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f 50: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 0.08.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (slope) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435: <\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0448\u0435 \u043d\u0443\u043b\u044f &#8212; \u0442\u0440\u0435\u043d\u0434 \u0432\u0432\u0435\u0440\u0445; <\/p>\n<\/li>\n<li>\n<p>\u043d\u0438\u0436\u0435 &#8212; \u0432\u043d\u0438\u0437. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 R\u00b2 \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 \u0438 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043e\u0432.  <\/p>\n<h3>\u0411\u044d\u043a\u0442\u0435\u0441\u0442: \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0434\u0435\u044e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h3>\n<p><strong>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: TradingView \u0438 Pine Script<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u044f \u0432\u044b\u0431\u0440\u0430\u043b TradingView. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0438\u0434\u0435\u0439: \u043e\u0442\u043a\u0440\u044b\u043b \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u0434 &#8212; \u0438 \u0441\u0440\u0430\u0437\u0443 \u0443\u0432\u0438\u0434\u0435\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0441 Python \u0438\u043b\u0438 AmiBroker. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb, \u0430 \u044f\u0437\u044b\u043a Pine Script &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c.<\/p>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u043d\u0435\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0433 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e &#8212; \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. <a href=\"https:\/\/ru.tradingview.com\/pricing\/?share_your_love=empenoso\" rel=\"noopener noreferrer nofollow\">\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0440\u0435\u0444\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 TradingView<\/a>: \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0435\u0441\u044c \u043f\u043e \u043d\u0435\u0439, \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0435\u043d\u044f, \u0430 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435.<\/p>\n<p><strong>\u0422\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b: \u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u0439<\/strong><\/p>\n<p>\u042f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043d\u0430 \u0434\u0432\u0443\u0445 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430\u0445: \u0434\u043d\u0435\u0432\u043d\u043e\u043c \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u043c. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438?<\/p>\n<ul>\n<li>\n<p>\u0414\u043d\u0435\u0432\u043d\u043e\u0439 &#8212; \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439. \u0415\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0442\u0435\u043c, \u043a\u0442\u043e \u0442\u043e\u0440\u0433\u0443\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u043d\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u043e\u0432\u043e\u0439 &#8212; \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0435\u043d\u0434\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0430 \u044d\u0442\u0438 \u0434\u0432\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 &#8212; \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430<\/strong><\/p>\n<p>\u0412 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u0430: \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R\u00b2. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435: \u0432\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u0446\u0435\u043d\u0430 \u00ab\u043f\u0440\u043e\u0440\u044b\u0432\u0430\u0435\u0442\u00bb \u043b\u0438\u043d\u0438\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0430 R\u00b2 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0438 \u0440\u0430\u0441\u0442\u0451\u0442. \u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u0443, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043e\u0442 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 &#8212; \u043c\u043e\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0411\u0430\u0440\u0431\u0430\u0440\u044b \u0421\u0442\u0430\u0440. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0436\u0443\u0440\u043d\u0430\u043b\u0430, \u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u00ab<a href=\"https:\/\/ru.tradingview.com\/support\/solutions\/43000685266\/\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432<\/a>\u00bb &#8212;  \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u0440\u044b\u0432\u044b \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 (\u0433\u044d\u043f\u044b), \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443. <\/p>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u043c \u043d\u0430 \u0434\u043e\u043b\u043b\u0430\u0440\/\u0440\u0443\u0431\u043b\u044c (Si) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0435\u0439 0.04% \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e29\/da2\/eba\/e29da2eba9dae3694474131fb8b6fba8.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c\" width=\"1947\" height=\"1110\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e29\/da2\/eba\/e29da2eba9dae3694474131fb8b6fba8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e29\/da2\/eba\/e29da2eba9dae3694474131fb8b6fba8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b33\/313\/5b7\/b333135b7a84512b03d0e5ad9b663914.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c\" width=\"1937\" height=\"1707\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b33\/313\/5b7\/b333135b7a84512b03d0e5ad9b663914.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b33\/313\/5b7\/b333135b7a84512b03d0e5ad9b663914.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/strong><\/p>\n<p>\u041d\u0430 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0445\u0432\u0430\u0442\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0430\u0437\u0430\u0445 \u0440\u044b\u043d\u043a\u0430: \u0442\u0440\u0435\u043d\u0434\u043e\u0432\u044b\u0445 \u0438 \u0431\u043e\u043a\u043e\u0432\u044b\u0445. <\/p>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u043c \u043d\u0430 \u0434\u043e\u043b\u043b\u0430\u0440\/\u0440\u0443\u0431\u043b\u044c (Si) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0435\u0439 0.04% \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8e\/8c0\/de5\/c8e8c0de5781c81ea627a89383d558b2.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441\" width=\"1950\" height=\"1128\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c8e\/8c0\/de5\/c8e8c0de5781c81ea627a89383d558b2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8e\/8c0\/de5\/c8e8c0de5781c81ea627a89383d558b2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/737\/0eb\/08a\/7370eb08aaef88ca62069be2d2cd4e75.png\" alt=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441\" title=\"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441\" width=\"1937\" height=\"1704\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/737\/0eb\/08a\/7370eb08aaef88ca62069be2d2cd4e75.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/737\/0eb\/08a\/7370eb08aaef88ca62069be2d2cd4e75.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<h3>\u041a\u043e\u0434 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438 \u043d\u0430 Pine Script \u0434\u043b\u044f TradingView<\/h3>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/954\/833\/17c\/95483317c45cd5cb472c38f215d1bb55.png\" width=\"1941\" height=\"1049\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/954\/833\/17c\/95483317c45cd5cb472c38f215d1bb55.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/954\/833\/17c\/95483317c45cd5cb472c38f215d1bb55.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0435\u0440\u0445\u043d\u044f\u044f \u043f\u0430\u043d\u0435\u043b\u044c &#8212; \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438:<\/p>\n<pre><code class=\"javascript\">\/\/07.05.2025 \/\/ \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 R-squared \/\/ \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html  \/\/ \u041c\u0438\u0445\u0430\u0438\u043b \u0428\u0430\u0440\u0434\u0438\u043d, https:\/\/shardin.name\/?utm_source=tradingview  \/\/@version=6 strategy(\"\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f + R\u00b2 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\",      overlay=true,      commission_type=strategy.commission.percent,   \/\/ \u0422\u0438\u043f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438: \u043f\u0440\u043e\u0446\u0435\u043d\u0442      commission_value=0.04,                         \/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438: 0.04%      slippage=10,                                   \/\/ \u041f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 \u0442\u0438\u043a\u0430\u0445      process_orders_on_close=true,      default_qty_type=strategy.fixed,      default_qty_value=3,          initial_capital=500000)                        \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043f\u0438\u0442\u0430\u043b  \/\/ === \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b === \/\/ \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 src = input.source(hlcc4, title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445\") len = input.int(defval=20, minval=1, title=\"\u0414\u043b\u0438\u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438\") r_squared_threshold = input.float(0.2, title=\"\u041f\u043e\u0440\u043e\u0433 R-squared\", step=0.01, minval=0) trailingStopOffset = input.float(3.9, \"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u0430 (%)\", step=0.1, minval=0.1)  \/\/ \u0412\u044b\u0431\u043e\u0440 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 targetTimeframe = input.timeframe(\"\", title=\"\u0422\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432\",       tooltip=\"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u044b\")  \/\/ === \u0420\u0430\u0441\u0447\u0435\u0442\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 R-squared === \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 targetClose = request.security(syminfo.tickerid, targetTimeframe, src)  \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 lrc = ta.linreg(targetClose, len, 0)  \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 R-squared correlation_coeff = ta.correlation(targetClose, lrc, len) r_squared = math.pow(correlation_coeff, 2)  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043b\u0443\u0447\u0430\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e (\u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b) is_constant_src = ta.stdev(targetClose, len) == 0 r_squared_adjusted = is_constant_src ? 1.0 : r_squared  \/\/ === \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0445\u043e\u0434\u0430 === \/\/ \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043b\u043e\u043d\u0433: \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043d\u0438\u0436\u0435 \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0438 R\u00b2 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 long_condition = lrc &lt; close and r_squared_adjusted &gt; r_squared_adjusted[1] and r_squared_adjusted &gt; r_squared_threshold  \/\/ \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u0448\u043e\u0440\u0442: \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432\u044b\u0448\u0435 \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0438 R\u00b2 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 short_condition = lrc &gt; close and r_squared_adjusted &gt; r_squared_adjusted[1] and r_squared_adjusted &gt; r_squared_threshold  \/\/ === \u0422\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u0430 === var float highestLongPrice = na var float lowestShortPrice = na var float trailingStopLong = na var float trailingStopShort = na  \/\/ \u0424\u043b\u0430\u0433 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 var bool blockNewSignals = false  \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u044b if (strategy.position_size &gt; 0)  \/\/ \u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0434\u043b\u0438\u043d\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f     highestLongPrice := na(highestLongPrice) ? close : math.max(highestLongPrice, close)     trailingStopLong := highestLongPrice * (1 - trailingStopOffset \/ 100)     blockNewSignals := true      if (strategy.position_size &lt; 0)  \/\/ \u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f     lowestShortPrice := na(lowestShortPrice) ? close : math.min(lowestShortPrice, close)     trailingStopShort := lowestShortPrice * (1 + trailingStopOffset \/ 100)     blockNewSignals := true  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 if (strategy.position_size &gt; 0 and close &lt;= trailingStopLong)     strategy.close(\"\u041b\u043e\u043d\u0433\")     highestLongPrice := na     trailingStopLong := na     blockNewSignals := false  if (strategy.position_size &lt; 0 and close &gt;= trailingStopShort)     strategy.close(\"\u0428\u043e\u0440\u0442\")     lowestShortPrice := na     trailingStopShort := na     blockNewSignals := false  \/\/ === \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 (\u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438) === if (long_condition and not blockNewSignals and strategy.position_size == 0)     strategy.entry(\"\u041b\u043e\u043d\u0433\", strategy.long)     highestLongPrice := close     trailingStopLong := close * (1 - trailingStopOffset \/ 100)     blockNewSignals := true  if (short_condition and not blockNewSignals and strategy.position_size == 0)     strategy.entry(\"\u0428\u043e\u0440\u0442\", strategy.short)     lowestShortPrice := close     trailingStopShort := close * (1 + trailingStopOffset \/ 100)     blockNewSignals := true  \/\/ === \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 === \/\/ \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 plot(lrc, color = color.blue, title = \"\u041b\u0438\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438\",       style = plot.style_line, linewidth = 2)  \/\/ \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u043e\u0432 plot(strategy.position_size &gt; 0 ? trailingStopLong : na, title=\"\u041b\u043e\u043d\u0433 \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\", color=color.green, linewidth=2, style=plot.style_linebr) plot(strategy.position_size &lt; 0 ? trailingStopShort : na, title=\"\u0428\u043e\u0440\u0442 \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\", color=color.red, linewidth=2, style=plot.style_linebr)  \/\/ \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 var table info = table.new(position.top_right, 3, 4, border_width=1) table.cell(info, 0, 0, \"Linear Regression\", bgcolor=color.new(color.blue, 90), text_color=color.white) table.cell(info, 0, 1, \"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435:\", text_color=color.white) table.cell(info, 1, 1, str.tostring(lrc, \"#.##\"), text_color=color.white) table.cell(info, 0, 2, \"R-squared:\", text_color=color.white) table.cell(info, 1, 2, str.tostring(r_squared_adjusted, \"#.####\"), text_color=r_squared_adjusted &gt; r_squared_threshold ? color.green : color.red) table.cell(info, 0, 3, \"\u0421\u0438\u0433\u043d\u0430\u043b:\", text_color=color.white) table.cell(info, 1, 3, blockNewSignals ? \"\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\" : long_condition ? \"\u041b\u041e\u041d\u0413\" : short_condition ? \"\u0428\u041e\u0420\u0422\" : \"\u041d\u0435\u0442 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\",             text_color=blockNewSignals ? color.yellow :                       long_condition ? color.green :                       short_condition ? color.red :                       color.white)<\/code><\/pre>\n<p>\u041d\u0438\u0436\u043d\u044f\u044f \u043f\u0430\u043d\u0435\u043b\u044c &#8212; \u043a\u043e\u0434 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"javascript\">\/\/ 07.05.2025 \/\/ \u041c\u0438\u0445\u0430\u0438\u043b \u0428\u0430\u0440\u0434\u0438\u043d, https:\/\/shardin.name\/?utm_source=tradingview  \/\/ \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html  \/\/@version=6 indicator(title=\"\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 (R-squared)\", shorttitle=\"R\u00b2\", overlay=false, precision=4)  \/\/ \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 src = input.source(close, title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445\") len = input.int(20, minval=2, title=\"\u0414\u043b\u0438\u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\") \/\/ \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0443\u043c 2 \u0442\u043e\u0447\u043a\u0438  \/\/ \u0412\u044b\u0431\u043e\u0440 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 targetTimeframe = input.timeframe(\"\", title=\"\u0422\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432\",      tooltip=\"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 R\u00b2\")  targetSrc = request.security(syminfo.tickerid, targetTimeframe, src, lookahead=barmerge.lookahead_on)   \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (\u0176 - \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f) lrc = ta.linreg(targetSrc, len, 0)  \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 R-squared \/\/ R\u00b2 = (Correlation(Y, \u0176))\u00b2 \/\/ Y - \u044d\u0442\u043e targetSrc (\u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f) \/\/ \u0176 - \u044d\u0442\u043e lrc (\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f) correlation_coeff = ta.correlation(targetSrc, lrc, len) r_squared = math.pow(correlation_coeff, 2)  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043b\u0443\u0447\u0430\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e (\u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b) is_constant_src = ta.stdev(targetSrc, len) == 0 r_squared_adjusted = is_constant_src ? 1.0 : r_squared  \/\/ \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 R-squared \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 plot(r_squared_adjusted, color=color.new(color.blue, 0), title=\"R-squared\", style=plot.style_line, linewidth=2)  \/\/ \u0423\u0440\u043e\u0432\u043d\u0438 \u0434\u043b\u044f R-squared \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438 hline(1, \"\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435\", color.gray, linestyle=hline.style_dashed) hline(0.8, \"\u041e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e\u0435\", color.new(color.green, 50), linestyle=hline.style_dotted) hline(0.5, \"\u0421\u0440\u0435\u0434\u043d\u0435\u0435\", color.new(color.orange, 50), linestyle=hline.style_dotted) hline(0.2, \"\u0421\u043b\u0430\u0431\u043e\u0435\", color.new(color.red, 50), linestyle=hline.style_dotted) hline(0, \"\u041d\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f\", color.gray, linestyle=hline.style_dashed)<\/code><\/pre>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b \u0438 \u043b\u0438\u0447\u043d\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0435\u0441\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043b: \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0441 R\u00b2 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u0442\u0440\u0435\u043d\u0434\u0430 &#8212; \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u0430 \u0443\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0438\u043e\u0434\u0430\u0445. <\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u0431\u044b\u043b\u044c &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0440\u044b\u043d\u043a\u0430 &#8212; \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. <\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044d\u0442\u0430 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0438\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0442\u043e\u0440\u0433\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p><strong>\u0410\u0432\u0442\u043e\u0440:<\/strong> \u041c\u0438\u0445\u0430\u0438\u043b \u0428\u0430\u0440\u0434\u0438\u043d<br \/> <a href=\"https:\/\/shardin.name\/?utm_source=habr\" rel=\"noopener noreferrer nofollow\">\ud83d\udd17 \u041c\u043e\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u0432\u0438\u0437\u0438\u0442\u043a\u0430<\/a><br \/> <a href=\"https:\/\/t.me\/+ros3jcpKDb8xODhi\" rel=\"noopener noreferrer nofollow\">\ud83d\udce2 Telegram \u00ab\u0423\u043c\u043d\u044b\u0439 \u0414\u043e\u043c \u0418\u043d\u0432\u0435\u0441\u0442\u043e\u0440\u0430\u00bb<\/a><\/p>\n<p>13 \u043c\u0430\u044f 2025 \u0433.<\/p>\n<p>P.S. \u041a\u0440\u0438\u0442\u0438\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f &#8212; \u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0443\u043f\u0443\u0441\u0442\u0438\u043b \u044f.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/907682\/\"> https:\/\/habr.com\/ru\/articles\/907682\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u044f \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u0438\u0437 \u0440\u0443\u0431\u0440\u0438\u043a\u0438 Traders\u2019 Tips \u0436\u0443\u0440\u043d\u0430\u043b\u0430 Technical Analysis of STOCKS &amp; COMMODITIES \u0437\u0430 2001-2005 \u0438 2006-2010 \u0433\u043e\u0434\u044b. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 &#8212; \u043e\u0442 \u0438\u0440\u043e\u043d\u0438\u0447\u043d\u044b\u0445 \u201c\u043e\u043f\u044f\u0442\u044c \u043a\u043e\u043c\u0438\u043a\u0441\u044b?\u201d \u0434\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0438 \u0431\u044d\u043a\u0442\u0435\u0441\u0442\u0430\u0445. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u043f\u043e\u0431\u0443\u0434\u0438\u043b\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0434\u0435\u043b\u0443 \u0438\u043d\u0430\u0447\u0435.<\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/903434\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed_link embed_layout-right\"><\/p>\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a1a\/0f4\/9cb\/a1a0f49cbf1ab0ef16334534c048a479.png&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430 2001-2005 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0435\u0439\u0448\u0435\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0443<\/span><\/div>\n<div class=\"embed__caption-description\">\u041f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0435\u043c\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0425\u0430\u0431\u0440\u0430, \u043d\u043e \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e&#8230;<\/div>\n<p><span class=\"embed__caption-host\">habr.com<\/span><\/div>\n<p><\/a><\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0434\u0435\u0435: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043d\u0430 Pine Script \u0434\u043b\u044f TradingView \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430\u0445 \u0441 \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u043e\u0439 \u0411\u0438\u0440\u0436\u0438. \u041a\u0441\u0442\u0430\u0442\u0438, Traders\u2019 Tips &#8212; \u044d\u0442\u043e \u043d\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u0440\u0443\u0431\u0440\u0438\u043a\u0430 \u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u0435. \u041d\u043e \u0441\u0443\u0442\u044c \u043d\u0435 \u0432 \u044d\u0442\u043e\u043c: \u0435\u0451 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u0435\u043b\u0438\u043a\u0430.  <\/p>\n<p><a href=\"https:\/\/habr.com\/ru\/articles\/907030\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed_link embed_layout-right\"><\/p>\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4c6\/422\/38f\/4c642238f47661f8f94a86dfce048265.png&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>\u041f\u043e\u0434\u0431\u043e\u0440\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430 2006-2010 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0435\u0439\u0448\u0435\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0443<\/span><\/div>\n<div class=\"embed__caption-description\">\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u0434\u0435\u0438 \u0438\u0437 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 Technical Analysis of STOCKS &amp; COMMODITIES. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447&#8230;<\/div>\n<p><span class=\"embed__caption-host\">habr.com<\/span><\/div>\n<p><\/a><\/p>\n<p>\u0412 \u0446\u0435\u043d\u0442\u0440\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f &#8212; \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0411\u0430\u0440\u0431\u0430\u0440\u044b \u0421\u0442\u0430\u0440 \u201cConfirming Price Trend\u201d (S&amp;C, \u0434\u0435\u043a\u0430\u0431\u0440\u044c 2007). \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430? \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u043d\u0434\u0430 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0440\u043e\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 R\u00b2 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u043d\u0430 \u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0438 \u0447\u0430\u0441\u043e\u0432\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u0445.<\/p>\n<p> \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; \u0442\u0435\u043e\u0440\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438, \u043a\u043e\u0434 \u043d\u0430 Pine Script, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u0432\u043e\u0434\u044b.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. <a href=\"https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442<\/a> <\/figcaption><\/div>\n<\/figure>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u0438 R-squared: \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438<\/h3>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0435\u0434\u0435\u0442\u0435 \u043f\u043e \u0434\u043e\u0440\u043e\u0433\u0435. \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f &#8212; \u044d\u0442\u043e \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u0430\u044f \u0442\u0440\u0430\u0441\u0441\u0430, \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043d\u043d\u0430\u044f \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c: \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043a\u0443\u0440\u0441, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u043a\u043e\u0447\u043a\u0438 \u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b. \u0426\u0435\u043d\u0430 \u0434\u0432\u0438\u0436\u0435\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 \u044d\u0442\u043e\u0439 &#171;\u0434\u043e\u0440\u043e\u0433\u0438&#187;, \u0430 \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0432 \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0435\u0434\u0435\u043c &#8212; \u0432\u0432\u0435\u0440\u0445 \u0438\u043b\u0438 \u0432\u043d\u0438\u0437. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e R-squared: \u044d\u0442\u043e \u043a\u0430\u043a \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 Wi-Fi. \u0415\u0441\u043b\u0438 \u043e\u043d \u0431\u043b\u0438\u0437\u043e\u043a \u043a 1 &#8212; \u0446\u0435\u043d\u0430 \u0447\u0451\u0442\u043a\u043e \u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u0434\u043e\u043b\u044c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0442\u0440\u0435\u043d\u0434 \u0441\u0438\u043b\u044c\u043d\u044b\u0439. \u0415\u0441\u043b\u0438 \u0431\u043b\u0438\u0436\u0435 \u043a \u043d\u0443\u043b\u044e &#8212; \u00ab\u0441\u0432\u044f\u0437\u044c\u00bb \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0440\u044b\u043d\u043e\u043a \u0448\u0443\u043c\u043d\u044b\u0439, \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u044f\u0441\u043d\u043e\u0435.  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u044c\u0438. <a href=\"https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html\" rel=\"noopener noreferrer nofollow\">\u041b\u0435\u0433\u0430\u043b\u044c\u043d\u043e \u0442\u0443\u0442<\/a> <\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043a\u0440\u0443\u0447\u0435 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0438\u0445 \u0441\u0440\u0435\u0434\u043d\u0438\u0445? \u0423 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u043d\u0438\u0439 \u0438 \u043e\u043d\u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u00ab\u0441\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u00bb \u0440\u0430\u0437\u0432\u043e\u0440\u043e\u0442\u044b. \u0410 R-squared \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0435 \u0433\u0430\u0434\u0430\u0442\u044c &#8212; \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u043d\u0434 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435. \u0412\u043c\u0435\u0441\u0442\u0435 \u043e\u043d\u0438 \u0434\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u043d\u043e \u043c\u043e\u0449\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0448\u0443\u043c\u0430 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u043d\u0434\u0430.  <\/p>\n<h3>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u0442\u0440\u0435\u0439\u0434\u0438\u043d\u0433\u0435<\/h3>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u0430: <strong>10 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0438 \u0440\u0430\u043d\u043d\u0438\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432, <strong>20 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0434\u043d\u0435\u0432\u043d\u044b\u0445 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0432, <strong>50 \u0431\u0430\u0440\u043e\u0432<\/strong> &#8212; \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0448\u0443\u043c\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e \u0442\u0440\u0435\u043d\u0434\u0443. \u0412\u044b\u0431\u043e\u0440 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0442\u0438\u043b\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u0438 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430.  <\/p>\n<p><strong>R-squared<\/strong> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <em>\u0444\u0430\u0437\u0443 \u0442\u0440\u0435\u043d\u0434\u0430<\/em>: <\/p>\n<ul>\n<li>\n<p>\u0435\u0433\u043e <strong>\u0440\u043e\u0441\u0442<\/strong> \u0441 \u043d\u0438\u0437\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 0.1 \u0434\u043e 0.3) \u0447\u0430\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 <strong>\u043d\u0430\u0447\u0430\u043b\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f<\/strong>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0430\u0434\u0435\u043d\u0438\u0435<\/strong> \u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 0.6 \u0434\u043e 0.3) \u2014 \u043f\u0440\u0438\u0437\u043d\u0430\u043a <strong>\u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u044f<\/strong> \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0444\u043b\u044d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b:<\/p>\n<ul>\n<li>\n<p>\u0434\u043b\u044f 20 \u0431\u0430\u0440\u043e\u0432 \u0437\u043d\u0430\u0447\u0438\u043c \u0443\u0440\u043e\u0432\u0435\u043d\u044c 0.20; <\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f 10: 0.40; <\/p>\n<\/li>\n<li>\n<p>\u0434\u043b\u044f 50: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e 0.08.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 (slope) \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435: <\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0448\u0435 \u043d\u0443\u043b\u044f &#8212; \u0442\u0440\u0435\u043d\u0434 \u0432\u0432\u0435\u0440\u0445; <\/p>\n<\/li>\n<li>\n<p>\u043d\u0438\u0436\u0435 &#8212; \u0432\u043d\u0438\u0437. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043c\u0435\u0441\u0442\u0435 \u0441 R\u00b2 \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 \u0438 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043e\u0432.  <\/p>\n<h3>\u0411\u044d\u043a\u0442\u0435\u0441\u0442: \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0438\u0434\u0435\u044e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h3>\n<p><strong>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442: TradingView \u0438 Pine Script<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u044f \u0432\u044b\u0431\u0440\u0430\u043b TradingView. \u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0440\u0433\u043e\u0432\u044b\u0445 \u0438\u0434\u0435\u0439: \u043e\u0442\u043a\u0440\u044b\u043b \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u043e\u0434 &#8212; \u0438 \u0441\u0440\u0430\u0437\u0443 \u0443\u0432\u0438\u0434\u0435\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043a\u0430\u043a \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u0441 Python \u0438\u043b\u0438 AmiBroker. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb, \u0430 \u044f\u0437\u044b\u043a Pine Script &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u044b\u0439, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c.<\/p>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u043d\u0435\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0433 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e &#8212; \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. <a href=\"https:\/\/ru.tradingview.com\/pricing\/?share_your_love=empenoso\" rel=\"noopener noreferrer nofollow\">\u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0440\u0435\u0444\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 TradingView<\/a>: \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0435\u0441\u044c \u043f\u043e \u043d\u0435\u0439, \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0435\u043d\u044f, \u0430 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435.<\/p>\n<p><strong>\u0422\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u044b: \u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u0439<\/strong><\/p>\n<p>\u042f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u043d\u0430 \u0434\u0432\u0443\u0445 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430\u0445: \u0434\u043d\u0435\u0432\u043d\u043e\u043c \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u043c. \u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438?<\/p>\n<ul>\n<li>\n<p>\u0414\u043d\u0435\u0432\u043d\u043e\u0439 &#8212; \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u0435\u043d \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439. \u0415\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0442\u0435\u043c, \u043a\u0442\u043e \u0442\u043e\u0440\u0433\u0443\u0435\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u043d\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u043e\u0432\u043e\u0439 &#8212; \u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u0447\u043d\u0435\u0435 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0435\u043d\u0434\u0430. <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0439\u0434\u0435\u0440\u0430 \u044d\u0442\u0438 \u0434\u0432\u0430 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430 &#8212; \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u043c\u0435\u0436\u0434\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438.<\/p>\n<p><strong>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430<\/strong><\/p>\n<p>\u0412 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u0430: \u043d\u0430\u043a\u043b\u043e\u043d \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 R\u00b2. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435: \u0432\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u0446\u0435\u043d\u0430 \u00ab\u043f\u0440\u043e\u0440\u044b\u0432\u0430\u0435\u0442\u00bb \u043b\u0438\u043d\u0438\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u0430 R\u00b2 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0438 \u0440\u0430\u0441\u0442\u0451\u0442. \u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u0443, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445 \u043e\u0442 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 &#8212; \u043c\u043e\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u0411\u0430\u0440\u0431\u0430\u0440\u044b \u0421\u0442\u0430\u0440. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 \u0436\u0443\u0440\u043d\u0430\u043b\u0430, \u043d\u043e \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438 \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/strong><\/p>\n<p>\u0414\u043b\u044f \u0434\u043d\u0435\u0432\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u00ab<a href=\"https:\/\/ru.tradingview.com\/support\/solutions\/43000685266\/\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432<\/a>\u00bb &#8212;  \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u0440\u044b\u0432\u044b \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 (\u0433\u044d\u043f\u044b), \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u0430 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443. <\/p>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u043c \u043d\u0430 \u0434\u043e\u043b\u043b\u0430\u0440\/\u0440\u0443\u0431\u043b\u044c (Si) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0435\u0439 0.04% \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0435\u043d\u044c<\/figcaption><\/div>\n<\/figure>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/strong><\/p>\n<p>\u041d\u0430 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043e\u0445\u0432\u0430\u0442\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043e\u043a. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0430\u0437\u0430\u0445 \u0440\u044b\u043d\u043a\u0430: \u0442\u0440\u0435\u043d\u0434\u043e\u0432\u044b\u0445 \u0438 \u0431\u043e\u043a\u043e\u0432\u044b\u0445. <\/p>\n<p>\u0422\u043e\u0440\u0433\u043e\u0432\u043b\u044f \u0442\u0440\u0435\u043c\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438 \u0444\u044c\u044e\u0447\u0435\u0440\u0441\u043e\u043c \u043d\u0430 \u0434\u043e\u043b\u043b\u0430\u0440\/\u0440\u0443\u0431\u043b\u044c (Si) \u043d\u0430 \u041c\u043e\u0441\u0431\u0438\u0440\u0436\u0435 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0435\u0439 0.04% \u0438 \u043f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0447\u0430\u0441<\/figcaption><\/div>\n<\/figure>\n<h3>\u041a\u043e\u0434 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438 \u043d\u0430 Pine Script \u0434\u043b\u044f TradingView<\/h3>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412\u0435\u0440\u0445\u043d\u044f\u044f \u043f\u0430\u043d\u0435\u043b\u044c &#8212; \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438:<\/p>\n<pre><code class=\"javascript\">\/\/07.05.2025 \/\/ \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 R-squared \/\/ \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 https:\/\/traders.com\/documentation\/feedbk_docs\/2007\/12\/Abstracts_new\/Star\/star.html  \/\/ \u041c\u0438\u0445\u0430\u0438\u043b \u0428\u0430\u0440\u0434\u0438\u043d, https:\/\/shardin.name\/?utm_source=tradingview  \/\/@version=6 strategy(\"\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f + R\u00b2 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\",      overlay=true,      commission_type=strategy.commission.percent,   \/\/ \u0422\u0438\u043f \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438: \u043f\u0440\u043e\u0446\u0435\u043d\u0442      commission_value=0.04,                         \/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438: 0.04%      slippage=10,                                   \/\/ \u041f\u0440\u043e\u0441\u043a\u0430\u043b\u044c\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432 \u0442\u0438\u043a\u0430\u0445      process_orders_on_close=true,      default_qty_type=strategy.fixed,      default_qty_value=3,          initial_capital=500000)                        \/\/ \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043f\u0438\u0442\u0430\u043b  \/\/ === \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b === \/\/ \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 src = input.source(hlcc4, title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445\") len = input.int(defval=20, minval=1, title=\"\u0414\u043b\u0438\u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438\") r_squared_threshold = input.float(0.2, title=\"\u041f\u043e\u0440\u043e\u0433 R-squared\", step=0.01, minval=0) trailingStopOffset = input.float(3.9, \"\u041e\u0442\u0441\u0442\u0443\u043f \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u0430 (%)\", step=0.1, minval=0.1)  \/\/ \u0412\u044b\u0431\u043e\u0440 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 targetTimeframe = input.timeframe(\"\", title=\"\u0422\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432\",       tooltip=\"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u044b\")  \/\/ === \u0420\u0430\u0441\u0447\u0435\u0442\u044b \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0438 R-squared === \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0444\u0440\u0435\u0439\u043c\u0430 targetClose = request.security(syminfo.tickerid, targetTimeframe, src)  \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 lrc = ta.linreg(targetClose, len, 0)  \/\/ \u0420\u0430\u0441\u0447\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 R-squared correlation_coeff = ta.correlation(targetClose, lrc, len) r_squared = math.pow(correlation_coeff, 2)  \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043b\u0443\u0447\u0430\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e (\u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b) is_constant_src = ta.stdev(targetClose, len) == 0 r_squared_adjusted = is_constant_src ? 1.0 : r_squared  \/\/ === \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0445\u043e\u0434\u0430 === \/\/ \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u043b\u043e\u043d\u0433: \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043d\u0438\u0436\u0435 \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0438 R\u00b2 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 long_condition = lrc &lt; close and r_squared_adjusted &gt; r_squared_adjusted[1] and r_squared_adjusted &gt; r_squared_threshold  \/\/ \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u0448\u043e\u0440\u0442: \u043b\u0438\u043d\u0438\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0432\u044b\u0448\u0435 \u0446\u0435\u043d\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0438 R\u00b2 \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430 short_condition = lrc &gt; close and r_squared_adjusted &gt; r_squared_adjusted[1] and r_squared_adjusted &gt; r_squared_threshold  \/\/ === \u0422\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0441\u0442\u0443\u043f\u0430 === var float highestLongPrice = na var float lowestShortPrice = na var float trailingStopLong = na var float trailingStopShort = na  \/\/ \u0424\u043b\u0430\u0433 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 var bool blockNewSignals = false  \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0435\u0439\u043b\u0438\u043d\u0433-\u0441\u0442\u043e\u043f\u044b if (strategy.position_size &gt; 0)  \/\/ \u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0434\u043b\u0438\u043d\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f     highestLongPrice := na(highestLongPrice) ? close : math.max(highestLongPrice, close)     trailingStopLong := highestLongPrice * (1 - trailingStopOffset \/ 100)     blockNewSignals := true      if (strategy.position_size &lt; 0)  \/\/ \u0415\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f     lowestShortPrice := na(lowestShortPrice) ? close : math.min(lowestShortPrice, close)     trailingStopShort := lowestShortPrice * (1 + trailingStopOffset \/ 100)     blockNewSignals := true  \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430 if (strategy.position_size &gt; 0 and close &lt;= trailingStopLong)     strategy.close(\"\u041b\u043e\u043d\u0433\")     highestLongPrice := na     trailingStopLong := na     blockNewSignals := false  if (strategy.position_size &lt; 0 and close &gt;= trailingStopShort)     strategy.close(\"\u0428\u043e\u0440\u0442\")     lowestShortPrice := na     trailingStopShort := na     blockNewSignals := false  \/\/ === \u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 (\u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438) === if (long_condition and not blockNewSignals and strategy.position_size == 0)     strategy.entry(\"\u041b\u043e\u043d\u0433\", strategy.long)     highestLongPrice := close     trailingStopLong := close * (1 - trailingStopOffset \/ 100)     blockNewSignals := true  if (short_condition and not blockNewSignals and strategy.position_size == 0)     strategy.entry(\"\u0428\u043e\u0440\u0442\", strategy.short)     lowestShortPrice := close     trailingStopShort := close * (1 + trailingStopOffset \/ 100)     blockNewSignals := true  \/\/ === \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 === \/\/ \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 plot(lrc, color = color.blue, title = \"\u041b\u0438\u043d\u0438\u044f \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-459407","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=459407"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459407\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}