{"id":12341,"date":"2020-06-01T08:00:24","date_gmt":"2020-06-01T05:00:24","guid":{"rendered":"https:\/\/www.davinci-fx.com\/averagerange-average-volatility-calculation-script\/"},"modified":"2021-05-25T20:05:52","modified_gmt":"2021-05-25T17:05:52","slug":"averagerange-average-volatility-calculation-script","status":"publish","type":"post","link":"https:\/\/www.davinci-fx.com\/en\/averagerange-average-volatility-calculation-script\/","title":{"rendered":"AverageRange &#8211; average volatility calculation script"},"content":{"rendered":"<p>A very simple script for MT4, the main purpose of which is to display volatility on your chart. With it, you can find out what movement made candles on average for a given period of time, what was the average or maximum body size of the candle, what length of their tails was fixed. The script plays the role of an additional filter to your trading system.<\/p>\n<p>The script is simple. Let&#8217;s say you want to open a trade, but do not know what Stop Loss put up, this script will be able to tell you the movement that made previous candles, if the average volatility of Candles D1 for the last 200 days was, say 80 points, then we can assume that the next candle is likely to pass this movement and if you are a &#8220;Daily Trader&#8221; then the stop should be more than that value.<\/p>\n<p>Or you want to open a position inside the day and close it before the next one, then you can see what size the average items were at the day candle, take that value away from the distance already passed at the moment and calculate whether on average there is enough more power to move today.<\/p>\n<p>You can also consider the average or maximum size of the candle&#8217;s tail to analyze possible high\/low rollbacks.<\/p>\n<p>Of course, to trade only with this one script is not worth it, it only gives an additional hint.<\/p>\n<p>For a more detailed calculation of volatility on H1 or D1, use our indicator <a href=\"http:\/\/www.davinci-fx.com\/truly-volatility\/\"><strong>TrulyVolatility<\/strong><\/a>.<\/p>\n<h2 style=\"text-align: center;\"><span style=\"color: #333333; font-size: 18pt;\">Script settings:<\/span><\/h2>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 18.4536%;\"><strong>NumberOfBars<\/strong><\/td>\n<td style=\"width: 81.5464%;\">Number of closed candles to analyze volatility<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"text-align: center;\"><span style=\"color: #333333; font-size: 18pt;\"><strong>An example of how the script works:<\/strong><\/span><\/h2>\n<p>The script is set on the graph as usual, displays the basic data:<\/p>\n<ul style=\"list-style-type: square;\">\n<li><strong>Count Bars<\/strong> is the number of bars involved in the calculation of volatility.<\/li>\n<li><strong>Start<\/strong> <strong>Time,<\/strong> <strong>End<\/strong> <strong>Time<\/strong> is the start and end of the estimated period.<\/li>\n<li><strong>Average Volatility<\/strong> is directly average volatility.<\/li>\n<li><strong>Average<\/strong> <strong>Candle<\/strong> <strong>body<\/strong> &#8211; the average body size of a candle during a given period.<\/li>\n<li><strong>Max<\/strong> <strong>Candle<\/strong> <strong>body,<\/strong> <strong>Min<\/strong> <strong>Candle<\/strong> <strong>body<\/strong> &#8211; the maximum and minimum size of candles found on the chart.<\/li>\n<li><strong>The average<\/strong> <strong>size<\/strong> <strong>of<\/strong> <strong>a high<\/strong> <strong>candle<\/strong> <strong>shadow<\/strong> is the average size of the upper shadows (tails) of each candle.<\/li>\n<li><strong>The average size of low candle shadow<\/strong> is the average size of the lower shadows (tails).<\/li>\n<li><strong>Max<\/strong> <strong>high<\/strong> <strong>candle<\/strong> <strong>shadow<\/strong> &#8211; maximum size of the upper shadows (tail) of the candle involved in the calculation<\/li>\n<li><strong>Max low candle shadow<\/strong> is the maximum size of the lower shade (tail) of the candle.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11622\" src=\"http:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/1-7.png\" alt=\"\" width=\"259\" height=\"187\" srcset=\"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/1-7.png 259w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/1-7-213x154.png 213w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/1-7-200x144.png 200w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/p>\n<p style=\"text-align: center;\"><em><span style=\"font-size: 14pt; color: #993300;\"><strong>Simplicity is the key to success!<\/strong><\/span><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11550\" src=\"http:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple.png\" alt=\"\" width=\"331\" height=\"173\" srcset=\"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple.png 675w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple-300x157.png 300w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple-500x261.png 500w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple-230x120.png 230w, https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2019\/05\/Keep-it-simple-200x105.png 200w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n\n<style id=\"kama-click-counter-shortcode\">.kcc_block{ position:relative; width: auto; padding:1em 0 1em; text-align: center; transition:background-color 0.4s; cursor:pointer; }\r\n.button4 {\r\nposition: relative;\r\nwidth: auto;\r\ndisplay: inline-block;\r\nfont-family: Arial,Helvetica,FreeSans,&quot;Liberation Sans&quot;,&quot;Nimbus Sans L&quot;,sans-serif;\r\nfont-size: 1.5em;\r\nfont-weight: 700;\r\ncolor: rgb(245,245,245);\r\ntext-shadow: 0 -1px rgba(0,0,0,.1);\r\ntext-decoration: none;\r\nuser-select: none;\r\npadding: .5em 1em;\r\noutline: none;\r\nborder: none;\r\nborder-radius: 10px;\r\nbackground: #0c9c0d linear-gradient(#82d18d, #0c9c0d);\r\nbox-shadow: inset #72de26 0 -1px 1px, inset 0 1px 1px #98ff98, #3caa3c 0 0 0 1px, rgba(0,0,0,.3) 0 2px 5px;\r\n-webkit-animation: pulsate 1.2s linear infinite;\r\nanimation: pulsate 3s linear infinite;\r\n}\r\n.button4:hover {\r\n-webkit-animation-play-state: paused;\r\nanimation-play-state: paused;\r\ncursor: pointer;\r\n}\r\n.button4:active {\r\ntop: 1px;\r\ncolor: #fff;\r\ntext-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;\r\nbox-shadow: 0 -1px 3px rgba(0,0,0,.3), 0 1px 1px #fff, inset 0 1px 2px rgba(0,0,0,.8), inset 0 -1px 0 rgba(0,0,0,.05);\r\n}\r\n@-webkit-keyframes pulsate {\r\n50% {color: #fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;}\r\n}\r\n@keyframes pulsate {\r\n50% {color: #fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;}\r\n}<\/style>\n<div class=\"kcc_block\" title=\"Download\">\r\n        <button class=\"button4 \"><i class=\"fas fa-download\"><\/i> Download for free<\/button>\r\n         \r\n\t\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A very simple script for MT4, the main purpose of which is to display volatility on your chart. With it, you can find out what movement made candles on average for a given period of time, what was the average or maximum body size of the candle, what length of their tails was fixed. The&#8230;<\/p>\n","protected":false},"author":1,"featured_media":11621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115],"tags":[],"post_folder":[62],"class_list":["post-12341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-a-set-of-useful-scripts-for-mt4"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The script calculates the average volatility of a trading pair<\/title>\n<meta name=\"description\" content=\"A script for analyzing the volatility of the current trading pair, the average size of the candles and their tails.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.davinci-fx.com\/en\/averagerange-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The script calculates the average volatility of a trading pair\" \/>\n<meta property=\"og:description\" content=\"A script for analyzing the volatility of the current trading pair, the average size of the candles and their tails.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.davinci-fx.com\/averagerange-script\/\" \/>\n<meta property=\"og:site_name\" content=\"DaVinci FX Group\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-01T05:00:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-25T17:05:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The script calculates the average volatility of a trading pair","description":"A script for analyzing the volatility of the current trading pair, the average size of the candles and their tails.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.davinci-fx.com\/en\/averagerange-script\/","og_locale":"en_US","og_type":"article","og_title":"The script calculates the average volatility of a trading pair","og_description":"A script for analyzing the volatility of the current trading pair, the average size of the candles and their tails.","og_url":"https:\/\/www.davinci-fx.com\/averagerange-script\/","og_site_name":"DaVinci FX Group","article_published_time":"2020-06-01T05:00:24+00:00","article_modified_time":"2021-05-25T17:05:52+00:00","og_image":[{"width":1200,"height":960,"url":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#article","isPartOf":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/"},"author":{"name":"admin","@id":"https:\/\/www.davinci-fx.com\/#\/schema\/person\/c82159c82394b08fba2ada8d18dcff38"},"headline":"AverageRange &#8211; average volatility calculation script","datePublished":"2020-06-01T05:00:24+00:00","dateModified":"2021-05-25T17:05:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/"},"wordCount":447,"commentCount":0,"publisher":{"@id":"https:\/\/www.davinci-fx.com\/#organization"},"image":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#primaryimage"},"thumbnailUrl":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png","articleSection":["Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.davinci-fx.com\/averagerange-script\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/","url":"https:\/\/www.davinci-fx.com\/averagerange-script\/","name":"The script calculates the average volatility of a trading pair","isPartOf":{"@id":"https:\/\/www.davinci-fx.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#primaryimage"},"image":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#primaryimage"},"thumbnailUrl":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png","datePublished":"2020-06-01T05:00:24+00:00","dateModified":"2021-05-25T17:05:52+00:00","description":"A script for analyzing the volatility of the current trading pair, the average size of the candles and their tails.","breadcrumb":{"@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.davinci-fx.com\/averagerange-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#primaryimage","url":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png","contentUrl":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/8-\u0417\u0430\u0441\u0442\u0430\u0432\u043a\u0430-e1598883388298.png","width":1200,"height":960,"caption":"Script for calculating average volatility"},{"@type":"BreadcrumbList","@id":"https:\/\/www.davinci-fx.com\/averagerange-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/www.davinci-fx.com\/en\/"},{"@type":"ListItem","position":2,"name":"AverageRange &#8212; average volatility calculation script"}]},{"@type":"WebSite","@id":"https:\/\/www.davinci-fx.com\/#website","url":"https:\/\/www.davinci-fx.com\/","name":"DaVinci FX Group","description":"\u0424\u043e\u0440\u0435\u043a\u0441 \u0421\u043e\u0432\u0435\u0442\u043d\u0438\u043a\u0438, \u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b, \u0421\u043a\u0440\u0438\u043f\u0442\u044b, \u041e\u0431\u0443\u0447\u0435\u043d\u0438\u044f","publisher":{"@id":"https:\/\/www.davinci-fx.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.davinci-fx.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.davinci-fx.com\/#organization","name":"DaVinci FX Group","url":"https:\/\/www.davinci-fx.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.davinci-fx.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/Logo-\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435-\u0441-\u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e-\u043a\u0440\u0443\u043f\u043d\u044b\u0439.png","contentUrl":"https:\/\/www.davinci-fx.com\/wp-content\/uploads\/2020\/05\/Logo-\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435-\u0441-\u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e-\u043a\u0440\u0443\u043f\u043d\u044b\u0439.png","width":800,"height":800,"caption":"DaVinci FX Group"},"image":{"@id":"https:\/\/www.davinci-fx.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.instagram.com\/davincifxgroup\/","https:\/\/www.youtube.com\/channel\/UC-rERLLrIiTADzyoYyQ1JOg"]},{"@type":"Person","@id":"https:\/\/www.davinci-fx.com\/#\/schema\/person\/c82159c82394b08fba2ada8d18dcff38","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.davinci-fx.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1e0c72ade8262ff623eeb91910865a86c4923ca6db1ce50997aee96dec89154b?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1e0c72ade8262ff623eeb91910865a86c4923ca6db1ce50997aee96dec89154b?s=96&d=monsterid&r=g","caption":"admin"},"url":"https:\/\/www.davinci-fx.com\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/posts\/12341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/comments?post=12341"}],"version-history":[{"count":9,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/posts\/12341\/revisions"}],"predecessor-version":[{"id":16898,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/posts\/12341\/revisions\/16898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/media\/11621"}],"wp:attachment":[{"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/media?parent=12341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/categories?post=12341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/tags?post=12341"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/www.davinci-fx.com\/en\/wp-json\/wp\/v2\/post_folder?post=12341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}