+1 888 340 6572

PlaceMarketOrder: Difference between revisions

From MultiCharts
(Created page with "Places market order at the broker without position changing on the chart. ==== Usage ==== <syntaxhighlight>PlaceMarketOrder(IsBuy, IsEntry, Contracts)</syntaxhighlight> W...")
 
mNo edit summary
Line 4: Line 4:
<syntaxhighlight>PlaceMarketOrder(IsBuy, IsEntry, Contracts)</syntaxhighlight>  
<syntaxhighlight>PlaceMarketOrder(IsBuy, IsEntry, Contracts)</syntaxhighlight>  


Where: [[IsBuy]] - indicates whether order is buy or sell;  
Where:  
 
:'''IsBuy''' - indicates whether order is buy or sell;  
              
              
[[IsEntry]] - indicates whether order is entry or exit;  
:'''IsEntry''' - indicates whether order is entry or exit;  
              
              
[[Contracts]] - indicates the number of contracts/shares of the order.  
:'''Contracts''' - indicates the number of contracts/shares of the order.  
   
   
==== Notes ====  
==== Notes ====  
Line 15: Line 17:
==== Example ====  
==== Example ====  
<syntaxhighlight>If MarketPosition = 2 then  
<syntaxhighlight>If MarketPosition = 2 then  
PlaceMarketOrder (true, true, 2) </syntaxhighlight>
  PlaceMarketOrder (true, true, 2); </syntaxhighlight>


Will place buy market order for 2 contracts if current marketposition =2  
Will place buy market order for 2 contracts if current MarketPosition = 2.
   
   



Revision as of 14:19, 27 January 2012

Places market order at the broker without position changing on the chart.

Usage

PlaceMarketOrder(IsBuy, IsEntry, Contracts)

Where:

IsBuy - indicates whether order is buy or sell;
IsEntry - indicates whether order is entry or exit;
Contracts - indicates the number of contracts/shares of the order.

Notes

Works with auto trading turned off. Can be used as a mean of synchronization of strategy market position with a broker.

Example

If MarketPosition = 2 then 
   PlaceMarketOrder (true, true, 2);

Will place buy market order for 2 contracts if current MarketPosition = 2.