<\/a><\/p>\nIn Chart-Trading the first click that places the solid line would also place your order on the TWS. Each subsequent click would modify the order to the new price. This way you can adjust several prices on your chart, setting and moving around Entries, Targets, Stops, etc.<\/p>\n
RequestTimedRefresh<\/span>( <\/span>1 <\/span>);\r<\/span>SetChartOptions<\/span>( <\/span>2<\/span>, <\/span>chartHideQuoteMarker <\/span>);\r<\/span>LButtonDown <\/span>= <\/span>GetCursorMouseButtons<\/span>() == <\/span>9<\/span>;\r<\/span>MousePrice <\/span>= <\/span>GetCursorYPosition<\/span>();\r\rif ( <\/span>MousePrice <\/span>)\r{\r <\/span>StaticVarSet<\/span>( <\/span>"MousePrice"<\/span>, <\/span>MousePrice <\/span>);\r if ( <\/span>LButtonDown <\/span>)\r <\/span>StaticVarSet<\/span>( <\/span>"ClickedMousePrice"<\/span>, <\/span>MousePrice <\/span>);\r}\r\r<\/span>LB <\/span>= <\/span>BarCount <\/span>- <\/span>1<\/span>;\r<\/span>MousePrice <\/span>= <\/span>Nz<\/span>( <\/span>StaticVarGet<\/span>( <\/span>"Mouseprice" <\/span>), <\/span>Null <\/span>);\r<\/span>ClickedMousePrice <\/span>= <\/span>StaticVarGet<\/span>( <\/span>"ClickedMousePrice" <\/span>);\r\r<\/span>Plot<\/span>( <\/span>C<\/span>, <\/span>""<\/span>, <\/span>1<\/span>, <\/span>128 <\/span>);\r<\/span>Plot<\/span>( <\/span>MousePrice<\/span>, <\/span>""<\/span>, <\/span>colorWhite<\/span>, <\/span>1 <\/span>| <\/span>styleNoRescale <\/span>| <\/span>styleDashed <\/span>| <\/span>styleNoLabel<\/span>, <\/span>0<\/span>, <\/span>0<\/span>, <\/span>2 <\/span>);\r<\/span>PlotText<\/span>( <\/span>"CURSOR " <\/span>+ <\/span>NumToStr<\/span>( <\/span>MousePrice<\/span>[<\/span>LB<\/span>], <\/span>1.2 <\/span>), <\/span>LB <\/span>- <\/span>5<\/span>, <\/span>MousePrice<\/span>[<\/span>LB<\/span>], <\/span>colorBlack<\/span>, <\/span>colorWhite <\/span>);\r<\/span>Plot<\/span>( <\/span>ClickedMousePrice<\/span>, <\/span>""<\/span>, <\/span>colorBlack<\/span>, <\/span>1 <\/span>| <\/span>styleNoLabel <\/span>| <\/span>styleNoRescale<\/span>, <\/span>0<\/span>, <\/span>0<\/span>, <\/span>2 <\/span>);\r<\/span>PlotText<\/span>( <\/span>"ORDER PLACED $" <\/span>+ <\/span>NumToStr<\/span>( <\/span>ClickedMousePrice<\/span>[<\/span>LB<\/span>], <\/span>1.2 <\/span>), <\/span>LB <\/span>- <\/span>5<\/span>, <\/span>ClickedMousePrice<\/span>[<\/span>LB<\/span>], <\/span>colorBlack<\/span>, <\/span>colorWhite <\/span>);<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"To place LMT or STP orders quickly is easiest done by moving the horizontal cursor-line over the desired price and making a left mouse click. The demo code below shows how you can lock in prices this way. To Chart-Trade additional code must be added to make the click perform one task of many, and […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[136],"tags":[],"_links":{"self":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/1730"}],"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=1730"}],"version-history":[{"count":0,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/1730\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/media?parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/categories?post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/tags?post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}