<\/a><\/p>\nTry changing the size of your charting pane, the overall AmiBroker window, and the font for the axis, to see how the pixel values change. Be aware that opening multiple chart panes and\/or windows will also change pixel values. Also, probably to ensure that the first bar shows, the left edge of your charting pane is located at the third pixel, while actual bars start plotting at the fifth pixel. This means that trying to overlay the Blue line to determine the left boundary will be offset to the left by two pixels. To use the code below copy it to a new Indicator formula window and click Apply. <\/p>\n
<\/span>function <\/span>gfxPlotHLine<\/span>( <\/span>YPixels<\/span>, <\/span>Color <\/span>)\r{\r global <\/span>pxwidth<\/span>;\r <\/span>GfxSelectPen<\/span>( <\/span>Color <\/span>) ;\r <\/span>GfxMoveTo<\/span>( <\/span>0<\/span>, <\/span>YPixels <\/span>);\r <\/span>GfxLineTo<\/span>( <\/span>pxwidth<\/span>, <\/span>YPixels <\/span>);\r}\r\rfunction <\/span>gfxPlotVLine<\/span>( <\/span>XPixels<\/span>, <\/span>Color <\/span>)\r{\r global <\/span>pxheight<\/span>;\r <\/span>GfxSelectPen<\/span>( <\/span>Color <\/span>) ;\r <\/span>GfxMoveTo<\/span>( <\/span>XPixels<\/span>, <\/span>0 <\/span>);\r <\/span>GfxLineTo<\/span>( <\/span>XPixels<\/span>, <\/span>pxheight <\/span>);\r}\r\r<\/span>GraphXSpace <\/span>= <\/span>0<\/span>;\r<\/span>SetChartOptions<\/span>( <\/span>2<\/span>, <\/span>chartHideQuoteMarker <\/span>);\r\r<\/span>pxwidth <\/span>= <\/span>Status<\/span>( <\/span>"pxwidth" <\/span>);\r<\/span>pxheight <\/span>= <\/span>Status<\/span>( <\/span>"pxheight" <\/span>);\r\r<\/span>BottomMargin <\/span>= <\/span>Param<\/span>( <\/span>"Bottom Margin"<\/span>, <\/span>14<\/span>, <\/span>0<\/span>, <\/span>100 <\/span>);\r<\/span>gfxPlotHLine<\/span>( <\/span>pxheight <\/span>- <\/span>BottomMargin<\/span>, <\/span>6 <\/span>);\r\r<\/span>RightMargin <\/span>= <\/span>Param<\/span>( <\/span>"Right Margin"<\/span>, <\/span>77<\/span>, <\/span>0<\/span>, <\/span>100 <\/span>);\r<\/span>gfxPlotVLine<\/span>( <\/span>pxwidth <\/span>- <\/span>RightMargin<\/span>, <\/span>6 <\/span>);\r\r<\/span>LeftMargin <\/span>= <\/span>Param<\/span>( <\/span>"Left margin"<\/span>, <\/span>3<\/span>, <\/span>0<\/span>, <\/span>100 <\/span>);\r<\/span>gfxPlotVLine<\/span>( <\/span>LeftMargin<\/span>, <\/span>6 <\/span>);\r\r<\/span>TopMargin <\/span>= <\/span>Param<\/span>( <\/span>"Top Margin"<\/span>, <\/span>5<\/span>, <\/span>0<\/span>, <\/span>100 <\/span>);\r<\/span>gfxPlotHLine<\/span>( <\/span>TopMargin<\/span>, <\/span>6 <\/span>);\r\r<\/span>Title<\/span>=<\/span>"\\n"<\/span>+\r<\/span>" Pixel width: "<\/span>+<\/span>NumToStr<\/span>(<\/span>pxwidth<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>)+<\/span>"\\n"<\/span>+\r<\/span>" Pixel height: "<\/span>+<\/span>NumToStr<\/span>(<\/span>pxheight<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>)+<\/span>"\\n"<\/span>+\r<\/span>" Top marging: "<\/span>+<\/span>NumToStr<\/span>(<\/span>TopMargin<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>)+<\/span>"\\n"<\/span>+\r<\/span>" Right marging: "<\/span>+<\/span>NumToStr<\/span>(<\/span>RightMargin<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>)+<\/span>"\\n"<\/span>+\r<\/span>"Bottom marging: "<\/span>+<\/span>NumToStr<\/span>(<\/span>BottomMargin<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>)+<\/span>"\\n"<\/span>+\r<\/span>" Left marging: "<\/span>+<\/span>NumToStr<\/span>(<\/span>LeftMargin<\/span>,<\/span>1.0<\/span>,<\/span>False<\/span>);\r<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"Important note: The AmiBroker 5.09.0 Beta introduced the following new GFX functions: Status(“pxchartleft”) – returns x-coordinate of top-left corner of chart area Status(“pxcharttop”) – returns y-coordinate of top-left corner of chart area Status(“pxchartright”) – returns x-coordinate of bottom-right corner of chart area Status(“pxchartbottom”) – returns y-coordinate of bottom-right corner of chart area Status(“pxchartwidth”) – returns […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[138],"tags":[],"_links":{"self":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/1670"}],"collection":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/comments?post=1670"}],"version-history":[{"count":0,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/1670\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/media?parent=1670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/categories?post=1670"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/tags?post=1670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}