Difference between revisions of "I MarketPosition"

From MultiCharts
Jump to navigation Jump to search
(Created page with "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...")
 
m
 
Line 1: Line 1:
 
Returns a numerical value, indicating the type of the specified position.  
 
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.  
 
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 ====
+
== Usage ==
 
<syntaxhighlight>i_MarketPosition</syntaxhighlight>  
 
<syntaxhighlight>i_MarketPosition</syntaxhighlight>  
 
   
 
   
==== Notes ====  
+
== Notes ==
This function can only be used in studies.  
+
* This function can only be used in studies (indicators). Use the regular [[MarketPosition]] in signals.
 
==== Example ====
 
<syntaxhighlight>i_MarketPosition will return a value of 0 if 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>
 
 
   
 
   
 +
== 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]]
 
[[Category:Strategy Performance]]

Latest revision as of 19:52, 14 February 2012

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

i_MarketPosition

Notes

  • This function can only be used in studies (indicators). Use the regular MarketPosition in signals.

Example

i_MarketPosition
  • 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.