PlaceMarketOrder: Difference between revisions
From MultiCharts
no edit summary
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Places market order at the broker without position changing on the chart. | Places market order at the broker without position changing on the chart. | ||
== Usage == | |||
<syntaxhighlight>PlaceMarketOrder(IsBuy, IsEntry, Contracts)</syntaxhighlight> | <syntaxhighlight>PlaceMarketOrder(IsBuy, IsEntry, Contracts)</syntaxhighlight> | ||
Line 12: | Line 12: | ||
:'''Contracts''' - indicates the number of contracts/shares of the order. | :'''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. | * Works with auto trading turned off. | ||
* Can be used as a mean of synchronization of strategy market position with a broker. | |||
* Also see the related [[ChangeMarketPosition]] keyword. | |||
== 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. |