This  function returns the maximum available date synched bars in the two series.  It was designed to be used with the CorrelationSynch and CorrelationLogSync functions to determine a minimum threshold value, return 0 or some other action.

 

This example shows the use of the common auto indexed series.

Syntax:

MaxSynchBars( series1, series2 )

 

Parameter:

Description:

series1

The name of the first series.

series2

The name of the second series

 

Example:

'  Possible Use Example
maxAvailableSynchBars = MaxSynchBars( instrument.close, instrument2.close )
'  When Correlation comparison lenght is less than the max available records,...
IF maxAvailableSynchBars > correlationPeriod THEN
  '  Use the correlation period parameter length
  correlationValue = CorrelationSynch( instrument.close, instrument2.close, correlationPeriod )
ELSE
  '  Use the maxAvailableSynchBars period length
  correlationValue = CorrelationSynch( instrument.close, instrument2.close, maxAvailableSynchBars )
ENDIF

Returns:

Returns the maximum number of bars from the current series location.

 

Links:

CorrelationSynch, CorrelationLogSynch

See Also:

Series Functions

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 416

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software