{"id":3922,"date":"2019-08-28T17:39:19","date_gmt":"2019-08-28T17:39:19","guid":{"rendered":"https:\/\/puvox.software\/blog\/?p=3922"},"modified":"2024-02-15T08:07:38","modified_gmt":"2024-02-15T08:07:38","slug":"plot-from-strategy-multicharts","status":"publish","type":"post","link":"https:\/\/puvox.software\/blog\/plot-from-strategy-multicharts\/","title":{"rendered":"Plot From Strategy (MultiCharts)"},"content":{"rendered":"<div class=\"default-content-clss content_3922 type_post \"><h1><img fetchpriority=\"high\" decoding=\"async\" class=\"size-medium wp-image-3923 aligncenter\" src=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/multicharts-300x177.png\" alt=\"\" width=\"300\" height=\"177\" srcset=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/multicharts-300x177.png 300w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/multicharts-400x236.png 400w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/multicharts.png 421w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/h1>\n<h1 style=\"text-align: center;\">Plotting lines from Signals<\/h1>\n<p>We know well, how TradeStation and thus, MultiCharts, have been an evergreen problem for programmers, and it&#8217;s 2020 and they still don&#8217;t support ABC functionalities needed for programmers.<\/p>\n<p>One of them is plotting from strategy. As it&#8217;s not that easy to achieve it, we have to use some extra approaches. One approach is to use <code>i_setplotvalue<\/code>\u00a0function. However, to simplify things, we made a helper indicator, which does that already<\/p>\n<h2 style=\"text-align: center;\">TC__PlotFromStrategy<\/h2>\n<p>You can make your work simpler by using the ready-made helper indicator, which can plot lines from strategies.<\/p>\n<ul>\n<li>1) In strategy, use like this:<\/li>\n<\/ul>\n<pre>input: my_plot_id(<span style=\"color: #ff0000;\"><strong>134<\/strong><\/span>); \/\/random id for your plot value\r\n\r\nmy_value= (high+low)\/2;\r\ni_setplotvalue(my_plot_id * +1, my_value ); \/\/Value: use +1 index \r\ni_setplotvalue(my_plot_id * -1, green );    \/\/Color: use -1 index\r\ni_setplotvalue(my_plot_id * -2, 3);         \/\/Width: use -2 index<\/pre>\n<ul>\n<li>2)\u00a0Then attach the <strong><code>TC__PlotFromStrategy<\/code><\/strong> indicator onto chart and set the same ID in first plot (i.e. <span style=\"color: #ff0000;\"><code><span style=\"color: #ff0000;\">134<\/span><\/code><\/span>\u00a0as in above example).<\/li>\n<\/ul>\n<p>P.S.\u00a0 If you want to apply lines on main chart, go to <strong><code>Indicator &gt; Format &gt; Scaling<\/code><\/strong> and choose\u00a0 <strong><code>Same as instrument<\/code><\/strong>, and also, in Properties, choose <code><strong>Sub-Chart 1<\/strong><\/code>.<\/p>\n<p>Download\u00a0\u00a0<strong><a href=\"https:\/\/github.com\/Puvox\/MultiChart-Libraries\/tree\/master\/PlotFromStrategy\">TC__PlotFromStrategy<\/a><\/strong><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<div class=\"default-content-clss excerpt_3922 type_post \"><p>Plotting lines from Signals We know well, how TradeStation and thus, MultiCharts, have been an evergreen problem for programmers, and it&#8217;s 2020 and they still don&#8217;t support ABC functionalities needed<a class=\"excerpt-read-more\" href=\"https:\/\/puvox.software\/blog\/plot-from-strategy-multicharts\/\">(Continue Reading)<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":5534,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trading-programming"],"_links":{"self":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/comments?post=3922"}],"version-history":[{"count":1,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3922\/revisions"}],"predecessor-version":[{"id":5535,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3922\/revisions\/5535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media\/5534"}],"wp:attachment":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media?parent=3922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/categories?post=3922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/tags?post=3922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}