Correlation is a series function that uses the Pearson's correlation coefficient method to return the statistical coefficient for the range of bars between two markets entered into the first two parameters of this function.

Syntax: |
---|

Correlation( series1, series2, barsToMeasure, [offset1], [offset2] ) |

Parameter: |
Description: |
---|---|

series1 |
Series element/property value of the first series. |

series2 |
Series element/property value of the second series. |

barsToMeasure |
Number of bars over which to measure the correlation coefficient. |

[offset1] |
Optional: Offset value for the first series. |

[offset2] |
Optional: Offset value for the second series. |

Example: |
---|

' Load first parameter's instrument series |

Returns: |

Above example will returns the correlation coefficient between GC and S over the last 500 days. |

Return Range Values: |
Correlation Meaning: |
---|---|

1.0 |
Value 1 indicates there is a perfect positive correlation between the two series. oValues less than 0.7 is generally considered Uncorrelated. oValues between 0.7 to 0.9 is generally considered Loosely correlated. oValues greater than 0.9 is considered Closely correlated. |

0 |
Value of 0 indicates there is no correlation between the two series |

-1.0 |
Value of -1 indicates the two series have a perfect negative correlation. oValues greater than -0.7 is generally considered Uncorrelated. oValues between -0.9 to -0.7 is generally considered Loosely correlated. oValues less than -0.9 is considered Closely correlated. |

Links: |
---|

Correlation Properties, CorrelationSynch, CorrelationLogSynch, MaxSynchBars |

See Also: |

Edit Time: 5/2/2017 7:23:30 AM |
Topic ID#: 225 |