{"id":1833,"date":"2022-07-01T11:29:00","date_gmt":"2022-07-01T11:29:00","guid":{"rendered":"https:\/\/www.overcharts.com\/en\/helpcenter\/?post_type=docs&#038;p=1833"},"modified":"2022-07-29T10:13:57","modified_gmt":"2022-07-29T10:13:57","password":"","slug":"overbasic-function","status":"publish","type":"docs","link":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/","title":{"rendered":"Overbasic &#8211; Function"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A function is a sequence of OverBasic statements enclosed between <strong><em>Function<\/em><\/strong> and <strong><em>EndFunction<\/em><\/strong> keywords. A function <strong>performs calculations<\/strong> and <strong>returns a result<\/strong>. The result is returned to the calling function using the <strong><a href=\"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-return\/\" target=\"_blank\" rel=\"noreferrer noopener\">RETURN<\/a><\/strong> keyword.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The execution of the function will terminate at the first RETURN encountered, or at the first error\/exception NOT correctly handled (see error\/exception handling: <strong><em>Try..Catch<\/em><\/strong>).<\/p><\/blockquote>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Syntax<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> &lt;function name&gt; (&#91;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>ref<\/strong><\/mark>] &lt;argument1 name&gt; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> &lt;argument1 type&gt;, &#91;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>ref<\/strong><\/mark>] &lt;argument2 name&gt; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> &lt;argument2 type&gt;, ...) <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> &lt;result type&gt;&#91;()]\n    ...\n    &lt;statements&gt;\n    ...\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>Return<\/strong><\/mark> &lt;expression&gt;\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>EndFunction<\/strong><\/mark><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A function begins with <strong><em>Function<\/em><\/strong> keyword and ends with <strong><em>EndFunction<\/em><\/strong> keyword.<br>In the first line of function, <strong>immediately after Function<\/strong> keyword, the <strong>function name<\/strong> is defined.<br>After the function name, in the same line, any <strong>arguments<\/strong> and the function <strong>result type<\/strong> are defined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example<\/strong>:<br>In this example, <strong>CalculateABS<\/strong> function calculates the absolute value of <strong>n1<\/strong> argument and returns the result:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> CalculateABS(n1 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>Numeric<\/strong><\/mark>) <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>Numeric<\/strong><\/mark>\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>If<\/strong><\/mark> (n1 &lt; 0) <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Then<\/mark><\/strong>\n        <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Return<\/mark><\/strong> -1 * n1\n    <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">EndIf<\/mark><\/strong>\n    <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Return<\/mark><\/strong> n1\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">EndFunction<\/mark><\/strong><\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Arguments<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Arguments are (<strong><em>optional<\/em><\/strong>) parameters passed to the function to influence its behavior.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An argument is defined using the syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>ref<\/strong><\/mark>] &lt;argument name&gt; <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> &lt;argument type&gt;&#91;()]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Each <em>argument<\/em> is <em>defined by a name and a type<\/em>. In the example below, <em>value<\/em> is the argument name and <em>Numeric<\/em> is the type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> DoSomething(value <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>Numeric<\/strong><\/mark>) <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>Numeric<\/strong><\/mark><\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Array<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To define an argument as an <strong><em>array<\/em><\/strong>, simply add the round brackets immediately after the argument type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Argument1 <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark>()<\/strong><\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Passing an argument by Reference (ref)<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">By default, all arguments of a function are passed <strong><em>by Value<\/em><\/strong>, that is, if the argument value is changed within the function, the change will NOT be reflected in the calling function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By placing <strong><em>ref<\/em><\/strong> keyword before the argument name, the argument will be passed to the function <strong><em>by Reference<\/em><\/strong>. In this case, by changing the argument value within the function, the change will also be reflected in the calling function:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> DoSomething(<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ref<\/mark><\/strong> value <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>) <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>\n    value = 12\n    <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Return<\/mark><\/strong> 10 * 5\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>EndFunction\n<\/strong><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\">and in the calling function:<\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#258508\" class=\"has-inline-color\">\n<\/mark>\n...\n...\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Dim<\/mark><\/strong> a1 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong> = 10\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Dim<\/mark><\/strong> result <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong> = DoSomething(a1)\n...\n...\n\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\">After executing DoSomething function, a1 will be 12.<\/mark><\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Warnings on Array arguments:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A change to the element value of an <strong><em>array <\/em><\/strong>passed as an argument will <strong>ALWAYS<\/strong> be reflected in the calling function even if the array is NOT passed by reference (<em>as long as the array has been used at least once before being passed to the function<\/em>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> DoSomething(<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ref<\/mark><\/strong> a1 <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>()) <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>\n    a1(5) = 10\n    <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Return<\/mark><\/strong> 1\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>EndFunction\n<\/strong><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\">and in the calling function:<\/mark><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0);color:#258508\" class=\"has-inline-color\">\n<\/mark>\n...\n...\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Dim<\/mark><\/strong> a1 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>()\n\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\">Use the array at least once before passing it to the function<\/mark>\na1(2) = 3\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Dim<\/mark><\/strong> result <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><strong>As<\/strong><\/mark> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong> = DoSomething(a1)\n...\n...\n\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#3fad1d\" class=\"has-inline-color\">After executing the DoSomething function, the value of element 5 of a1 will be 10.<\/mark><\/code><\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Result<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">A function must <strong>always<\/strong> return a result. Result type is defined in the function first line. In the example below the result type is <strong><em>Numeric<\/em><\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> DoSomething() <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong><\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">To define function result as an <strong><em>array<\/em><\/strong>, simply add the round brackets immediately after the result type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> DoSomething() <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">As<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Numeric<\/mark><\/strong>()<\/code><\/pre>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Main function<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In Overbasic there is a special function called <strong><em>Main<\/em><\/strong>. It is the function where the script execution begins.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Function<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Main<\/mark><\/strong>()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Main function has no arguments or even a defined result type. In fact, result depends on script type. If the script is an indicator, result type will be <strong><em>Numeric<\/em><\/strong>, if Trading System it will be a <strong><em>Boolean<\/em><\/strong>. For more information see user-indicators and trading-systems documentation.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><span style=\"letter-spacing: 0px;\">The Main function is called automatically by Overcharts every time the script is run. For example, when calculating an indicator, the script is run for each bar in the reference chart. If the indicator reference chart contains 100 bars, the script will run 100 times. Script will also be run on each real time data update.<\/span><\/p><\/blockquote>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords. A function performs calculations and returns a result. The result is returned to the calling function using the RETURN keyword. The execution of the function will terminate at the first RETURN encountered, or at the first error\/exception NOT correctly handled (see [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[16],"doc_tag":[],"class_list":["post-1833","docs","type-docs","status-publish","hentry","doc_category-syntax-keywords"],"year_month":"2026-10","word_count":645,"total_views":"1","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Overcharts Team","author_nicename":"overadmin","author_url":"https:\/\/www.overcharts.com\/en\/helpcenter\/author\/overadmin\/"},"doc_category_info":[{"term_name":"Syntax &amp; Keywords","term_url":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs-category\/syntax-keywords\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Overbasic - Function - Overcharts Help Center<\/title>\r\n<meta name=\"description\" content=\"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"Overbasic - Function - Overcharts Help Center\" \/>\r\n<meta property=\"og:description\" content=\"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Overcharts Help Center\" \/>\r\n<meta property=\"article:modified_time\" content=\"2022-07-29T10:13:57+00:00\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-function\\\/\",\"url\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-function\\\/\",\"name\":\"Overbasic - Function - Overcharts Help Center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/#website\"},\"datePublished\":\"2022-07-01T11:29:00+00:00\",\"dateModified\":\"2022-07-29T10:13:57+00:00\",\"description\":\"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-function\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-function\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-function\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Overbasic &#8211; Function\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/#website\",\"url\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/\",\"name\":\"Overcharts Help Center\",\"description\":\"Trading Software &amp; Technical Analysis\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Overbasic - Function - Overcharts Help Center","description":"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.","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.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/","og_locale":"en_US","og_type":"article","og_title":"Overbasic - Function - Overcharts Help Center","og_description":"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.","og_url":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/","og_site_name":"Overcharts Help Center","article_modified_time":"2022-07-29T10:13:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/","url":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/","name":"Overbasic - Function - Overcharts Help Center","isPartOf":{"@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/#website"},"datePublished":"2022-07-01T11:29:00+00:00","dateModified":"2022-07-29T10:13:57+00:00","description":"A function is a sequence of OverBasic statements enclosed between Function and EndFunction keywords.","breadcrumb":{"@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.overcharts.com\/en\/helpcenter\/"},{"@type":"ListItem","position":2,"name":"Overbasic &#8211; Function"}]},{"@type":"WebSite","@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/#website","url":"https:\/\/www.overcharts.com\/en\/helpcenter\/","name":"Overcharts Help Center","description":"Trading Software &amp; Technical Analysis","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.overcharts.com\/en\/helpcenter\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs\/1833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/comments?post=1833"}],"version-history":[{"count":16,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs\/1833\/revisions"}],"predecessor-version":[{"id":1861,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs\/1833\/revisions\/1861"}],"wp:attachment":[{"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/media?parent=1833"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/doc_category?post=1833"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/doc_tag?post=1833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}