Difference between revisions of "Ago"

From MultiCharts
Jump to navigation Jump to search
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Used in combination with [[Bar]] or [[Bars]] and a numerical expression to reference the bar a specified number of bars back from the current bar.  
+
Used in combination with [[Bar]] or [[Bars]] and a numerical expression to reference the bar a specified number of bars back from the current bar. For example, ''Close 4 Bars Ago''.
Bars Ago can also be specified by using the bar offset notation that consists of a numerical expression enclosed in square brackets.  
+
 
 +
Bars Ago can also be specified by using the bar offset notation that consists of a numerical expression enclosed in square brackets. For example, ''Close[4]''.  
 
   
 
   
==== Usage ====
+
== Usage ==
 
<syntaxhighlight>N Bars Ago</syntaxhighlight>  
 
<syntaxhighlight>N Bars Ago</syntaxhighlight>  
  
 
or:  
 
or:  
  
[N]  
+
<syntaxhighlight>[N]</syntaxhighlight>
  
 +
Where:
  
Where: [[N]] - a numerical expression specifying the number of bars back to reference
+
:'''N''' - a numerical expression specifying the number of bars back to reference.
  
==== Example ====
+
== Example ==
 
Plot the closing price of the previous bar:  
 
Plot the closing price of the previous bar:  
  
Line 20: Line 22:
  
 
<syntaxhighlight>Plot1(Close[2], "Close 2 bars ago");</syntaxhighlight>
 
<syntaxhighlight>Plot1(Close[2], "Close 2 bars ago");</syntaxhighlight>
 
  
 
[[Category:Data Information/General]]
 
[[Category:Data Information/General]]

Latest revision as of 10:48, 7 February 2012

Used in combination with Bar or Bars and a numerical expression to reference the bar a specified number of bars back from the current bar. For example, Close 4 Bars Ago.

Bars Ago can also be specified by using the bar offset notation that consists of a numerical expression enclosed in square brackets. For example, Close[4].

Usage

N Bars Ago

or:

[N]

Where:

N - a numerical expression specifying the number of bars back to reference.

Example

Plot the closing price of the previous bar:

Plot1(Close Of 1 Bar Ago, "Previous bar's close");

Plot the closing price of two bars ago:

Plot1(Close[2], "Close 2 bars ago");