+1 888 340 6572

PlaceMarketOrder: Difference between revisions

From MultiCharts
Line 13: Line 13:
   
   
== Notes ==
== Notes ==
* Works with auto trading turned on.  
* Works only with auto trading turned on.  
* Can be used as a mean of synchronization of strategy market position with a broker.  
* Can be used as a mean of synchronization of strategy market position with a broker.  
* Also see the related [[ChangeMarketPosition]] keyword.
* Also see the related [[ChangeMarketPosition]] keyword.

Revision as of 14:14, 12 January 2016

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 only with auto trading turned on.
  • Can be used as a mean of synchronization of strategy market position with a broker.
  • Also see the related ChangeMarketPosition keyword.

Example

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

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