+1 888 340 6572

SetMaxBarsBack: Difference between revisions

From MultiCharts
No edit summary
No edit summary
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Returns a numerical value indicating the Maximum Bars Back setting for the study.  
Sets a numerical value indicating the Maximum Bars Back setting for the study.  


All studies based on past data use a certain number of bars for their calculations. The number of bars is called ''Maximum number of bars a study will reference'', or Maximum Bars Back, and can be found in the settings of an indicator or signal.  
All studies based on past data use a certain number of bars for their calculations.  
 
The number of bars is called '''''Maximum number of bars a study will reference''''', or '''''Maximum Bars Back'''''.
   
   
== Usage ==
== Usage ==
<syntaxhighlight>MaxBarsBack</syntaxhighlight>  
<syntaxhighlight>SetMaxBarsBack (BarsBack)</syntaxhighlight>'''
 
Where: ''<code>(BarsBack)</code>'' - numerical expression, specifying the number of bars back
 
== Note ==
 
''<code>(BarsBack)</code>'' can't be a negative value.
 
== Example ==
== Example ==
Assign a value, indicating the Maximum Bars Back setting for the study, to Value1 variable:  
Set a value, indicating the Maximum Bars Back setting for the study to 50:


<syntaxhighlight>Value1 = MaxBarsBack;</syntaxhighlight>  
<syntaxhighlight>variables: SetMaxBarsBack(50);</syntaxhighlight>


[[Category:Environment Information]]
[[Category:Environment Information]]

Revision as of 22:03, 28 June 2012

Sets a numerical value indicating the Maximum Bars Back setting for the study.

All studies based on past data use a certain number of bars for their calculations.

The number of bars is called Maximum number of bars a study will reference, or Maximum Bars Back.

Usage

SetMaxBarsBack (BarsBack)

Where: (BarsBack) - numerical expression, specifying the number of bars back

Note

(BarsBack) can't be a negative value.

Example

Set a value, indicating the Maximum Bars Back setting for the study to 50:

variables: SetMaxBarsBack(50);