{"id":1937,"date":"2022-07-07T13:13:00","date_gmt":"2022-07-07T13:13:00","guid":{"rendered":"https:\/\/www.overcharts.com\/en\/helpcenter\/?post_type=docs&#038;p=1937"},"modified":"2022-09-30T11:04:57","modified_gmt":"2022-09-30T11:04:57","password":"","slug":"overbasic-pragma","status":"publish","type":"docs","link":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/","title":{"rendered":"Overbasic &#8211; Pragma"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.<br>Some Pragmas can be defined exclusively within the script, while others are used to set default values of properties accessible in the configuration window of the Indicator \/ Trading-System.<\/p>\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><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"&lt;parameter name>\", &lt;value>, &lt;result index>)<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A pragma is defined by <strong>PRAGMA<\/strong> keyword and the following attributes:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameter Name<\/strong>: name of the parameter to be set (<strong><a href=\"#1-toc-title\">see available parameters<\/a><\/strong>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Value<\/strong>: parameter value<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Result Index<\/strong>: (<em>ONLY for Indicators<\/em>) if an indicator returns multiple results\/curves (RETURN keyword), result index indicates which result the Pragma refers to.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#fff36b\">Pragmas must be defined at script level, that is, externally to all functions. We recommend you define all Pragmas at the beginning of the script.<\/p>\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>Available Parameters<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table has-small-font-size\"><table><tbody><tr><td><strong>HORIZONTAL_SHIFT<\/strong><br><br>Allows right\/left shift (of x bars) of the entire indicator-values series.<br><strong>If greater than zero<\/strong>, the curve after being calculated is shifted to the <strong>right<\/strong> by the specified number of bars.<br><strong>If lower than zero<\/strong>, the curve after being calculated is shifted to the <strong>left<\/strong> by the specified number of bars.<br><br>Possible Values: Any integer value.<br><br><em>Available for indicators ONLY. If used elsewhere it is ignored.<\/em><\/td><\/tr><tr><td><strong>STYLE_DRAW_AS<\/strong><br><br>Defines the default value of &#8216;<strong>Draw As<\/strong>&#8216; style property present in the indicator configuration.<br><br><em>Available for indicators ONLY. If used elsewhere it is ignored.<\/em><\/td><\/tr><tr><td><strong>STYLE_ZORDER<\/strong><br><br>Defines the default value of &#8216;<strong>Z-Order<\/strong>&#8216; style property present in the indicator configuration. This property specifies the drawing order with respect to the other curves present IN THE SAME indicator. The higher the Z-Order value, the more the curve will be drawn in the foreground.<br><br>Possible values: any positive integer value.<br><br><em>Available for indicators ONLY. If used elsewhere it is ignored.<\/em><\/td><\/tr><tr><td><strong>USE_REFERENCE_OBJECT_SCALE_AS_DEFAULT<\/strong><br><br>Sets the use of reference chart\/indicator scale as default. <br>In other words, if the indicator is mainly used together with its reference chart\/indicator (as happens for example for moving average), then we recommend you use this Pragma to set by default the use of the same scale as the reference chart\/indicator.<br><br>Possible values: TRUE, FALSE.<br><br><em>Available for indicators ONLY. If used elsewhere it is ignored.<\/em><\/td><\/tr><tr><td><strong>VALID_STARTING_FROM<\/strong><br><br>Defines the bar from which to start drawing the indicator curve. In other words, it is the index of the first valid value in the indicator values series.<br><br>Possible values: any positive integer value.<br><br><em>Available for indicators ONLY. If used elsewhere it is ignored.<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Usage<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Pragmas must be defined at script level, that is, externally to all functions. We recommend you define all Pragmas at the beginning of the script.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Examples<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:11px\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"HORIZONTAL_SHIFT\", 20)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"STYLE_DRAW_AS\", \"HI\")\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"STYLE_ZORDER\", 100)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"USE_REFERENCE_OBJECT_SCALE_AS_DEFAULT\", <mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>True<\/strong><\/mark>)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"VALID_STARTING_FROM\", 10)\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">Function Main<\/mark><\/strong>()\n    ...\n    ...\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-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<p class=\"wp-block-paragraph\">If an indicator returns multiple results\/curves, the result index Pragma refers to must be specified:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"HORIZONTAL_SHIFT\", 20, 3)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"VALID_STARTING_FROM\", 10, 1)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"VALID_STARTING_FROM\", 10, 2)\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"VALID_STARTING_FROM\", 10, 3)\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">Function Main<\/mark><\/strong>()\n    ...\n    ...\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-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<p class=\"wp-block-paragraph\">Pragma value can also be defined as an expression consisting of Numbers, Strings, Boolean values (true\/false), Options, Properties:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\"><strong>Pragma<\/strong><\/mark> (\"VALID_STARTING_FROM\", Period)\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">Property<\/mark><\/strong> Period <strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">As Numeric<\/mark><\/strong>\n    <strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">Default<\/mark><\/strong> (20)\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">EndProperty<\/mark><\/strong>\n\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">Function Main<\/mark><\/strong>()\n    ...\n    ...\n<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0088cd\" class=\"has-inline-color\">EndFunction<\/mark><\/strong><\/code><\/pre>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.Some Pragmas can be defined exclusively within the script, while others are used to set default values of properties accessible in the configuration window of the Indicator \/ Trading-System. Syntax A pragma is defined by PRAGMA keyword and [&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-1937","docs","type-docs","status-publish","hentry","doc_category-syntax-keywords"],"year_month":"2026-10","word_count":526,"total_views":0,"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 - Pragma - Overcharts Help Center<\/title>\r\n<meta name=\"description\" content=\"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.\" \/>\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-pragma\/\" \/>\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 - Pragma - Overcharts Help Center\" \/>\r\n<meta property=\"og:description\" content=\"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Overcharts Help Center\" \/>\r\n<meta property=\"article:modified_time\" content=\"2022-09-30T11:04: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-pragma\\\/\",\"url\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-pragma\\\/\",\"name\":\"Overbasic - Pragma - Overcharts Help Center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/#website\"},\"datePublished\":\"2022-07-07T13:13:00+00:00\",\"dateModified\":\"2022-09-30T11:04:57+00:00\",\"description\":\"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \\\/ Trading-System.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-pragma\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-pragma\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/docs\\\/overbasic-pragma\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.overcharts.com\\\/en\\\/helpcenter\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Overbasic &#8211; Pragma\"}]},{\"@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 - Pragma - Overcharts Help Center","description":"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.","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-pragma\/","og_locale":"en_US","og_type":"article","og_title":"Overbasic - Pragma - Overcharts Help Center","og_description":"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.","og_url":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/","og_site_name":"Overcharts Help Center","article_modified_time":"2022-09-30T11:04: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-pragma\/","url":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/","name":"Overbasic - Pragma - Overcharts Help Center","isPartOf":{"@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/#website"},"datePublished":"2022-07-07T13:13:00+00:00","dateModified":"2022-09-30T11:04:57+00:00","description":"A Pragma is a special parameter that allows you to influence the behavior of the Indicator \/ Trading-System.","breadcrumb":{"@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.overcharts.com\/en\/helpcenter\/docs\/overbasic-pragma\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.overcharts.com\/en\/helpcenter\/"},{"@type":"ListItem","position":2,"name":"Overbasic &#8211; Pragma"}]},{"@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\/1937","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=1937"}],"version-history":[{"count":13,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs\/1937\/revisions"}],"predecessor-version":[{"id":1995,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/docs\/1937\/revisions\/1995"}],"wp:attachment":[{"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/media?parent=1937"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/doc_category?post=1937"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.overcharts.com\/en\/helpcenter\/wp-json\/wp\/v2\/doc_tag?post=1937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}