×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

I MarketPosition

18 bytes added, 19:52, 14 February 2012
m
no edit summary
Returns a numerical value, indicating the type of the specified position.
 
A value of 1 indicates the current bar has a long position, -1 indicates the current bar has a short position, and 0 is returned only if the current bar has a flat position.
==== Usage ====
<syntaxhighlight>i_MarketPosition</syntaxhighlight>
==== Notes ==== * This function can only be used in studies(indicators). ==== Example ====<syntaxhighlight>i_MarketPosition will return a value of 0 if Use the position on the current bar is flat  i_MarketPosition will return a value of 1 if the position on the current bar is long  i_MarketPosition will return a value of -1 if the position on the current bar is short</syntaxhighlight> regular [[MarketPosition]] in signals.
== Example ==
<syntaxhighlight>i_MarketPosition</syntaxhighlight>
* Will return a value of 0 if the position on the current bar is flat,
* Will return a value of 1 if the position on the current bar is long,
* Will return a value of -1 if the position on the current bar is short.
[[Category:Strategy Performance]]