{"id":1070,"date":"2015-02-09T17:06:06","date_gmt":"2015-02-09T22:06:06","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=1070"},"modified":"2015-02-11T17:08:39","modified_gmt":"2015-02-11T22:08:39","slug":"how-to-show-date-axis-in-a-newly-created-chart-pane","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2015\/02\/09\/how-to-show-date-axis-in-a-newly-created-chart-pane\/","title":{"rendered":"How to show date axis in a newly created chart pane"},"content":{"rendered":"

When we double-click on the selected indicator in Charts<\/strong> window to display it in a new chart pane or apply our custom code as indicator, by default most of the indicator formulas will not show the date-axis, unless we specified such requirement in our formula.<\/p>

In order to display the date axis, we need to click on the chart with the right<\/strong> mouse button, choose Parameters->Axes&Grid<\/strong> tab, then set Show date axis<\/strong> option to YES<\/strong>.<\/p>

\"Axis&Grid\"<\/p>

There is also a way to pre-code such condition in our custom indicator formula. To enable data-axis display when we apply the new indicator formula, we just need to add relevant SetChartOptions<\/strong>() function call:<\/p>SetChartOptions<\/span>( <\/span>0<\/span>, <\/span>chartShowDates <\/span>);

<\/span>\/\/ sample custom indicator
<\/span>Plot<\/span>( <\/span>RSI<\/span>(), <\/span>"RSI"<\/span>, <\/span>colorRed <\/span>)<\/code>

More information about SetChartOptions function can be found in the AFL reference:
http:\/\/www.amibroker.com\/f?SetChartOptions<\/a><\/p>","protected":false},"excerpt":{"rendered":"

When we double-click on the selected indicator in Charts window to display it in a new chart pane or apply our custom code as indicator, by default most of the indicator formulas will not show the date-axis, unless we specified such requirement in our formula.In order to display the date axis, we need to click […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1070"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=1070"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1070\/revisions"}],"predecessor-version":[{"id":1072,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1070\/revisions\/1072"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=1070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=1070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=1070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}