ChangeMarketPosition: Difference between revisions
From MultiCharts
m
no edit summary
mNo edit summary |
|||
Line 4: | Line 4: | ||
<syntaxhighlight>ChangeMarketPosition (Delta, Price, Name)</syntaxhighlight> | <syntaxhighlight>ChangeMarketPosition (Delta, Price, Name)</syntaxhighlight> | ||
Where: | Where: | ||
:'''Delta''' - number of contracts by which current market position should be changed; | |||
:'''Price''' - order filling price; | |||
:'''Name''' - name of the order that changes the position. | |||
==== Notes ==== | ==== Notes ==== | ||
Line 15: | Line 17: | ||
==== Example ==== | ==== Example ==== | ||
<syntaxhighlight>If MarketPosition = 2 then | <syntaxhighlight>If MarketPosition = 2 then | ||
ChangeMarketPosition (-2,100,"LX")</syntaxhighlight> | 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 | <syntaxhighlight>If MarketPosition = 0 then | ||
ChangeMarketPosition (-2,100,"SE")</syntaxhighlight> | 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. | ||
[[Category:Strategy Position Synchronization]] | [[Category:Strategy Position Synchronization]] |