+1 888 340 6572

ChangeMarketPosition: Difference between revisions

From MultiCharts
(Created page with "Places the order with set name and price on the chart. Though when auto trading is off the order will not be sent to a broker. ==== Usage ==== <syntaxhighlight>ChangeMarket...")
 
Line 14: Line 14:
   
   
==== Example ====  
==== Example ====  
<syntaxhighlight>If MarketPosition = 2 then ChangeMarketPosition (-2,100,"LX")</syntaxhighlight>  
<syntaxhighlight>If MarketPosition = 2 then  
ChangeMarketPosition (-2,100,"LX")</syntaxhighlight>  


Will place close order with the name “LX” and the price 100 if current marketposition =2  
Will place close order with the name “LX” and the price 100 if current marketposition =2  


<syntaxhighlight>If MarketPosition = 0 then ChangeMarketPosition (-2,100,"SE")</syntaxhighlight>  
<syntaxhighlight>If MarketPosition = 0 then  
ChangeMarketPosition (-2,100,"SE")</syntaxhighlight>  


Will place open order with the name “SE” and the price 100 if current marketposition =0  
Will place open order with the name “SE” and the price 100 if current marketposition =0