Announcement

Collapse
No announcement yet.

Dow Cash v FTSE 100 Indices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dow Cash v FTSE 100 Indices

    Hi there,

    Can you tell me how to chart the difference between the Dow 30 Cash and the FTSE 100 index?

    i.e $Indu minus whatever the FTSE 100 Index symbol is

  • #2
    Hello boycee,

    Try the formula below. It will plot a line as an indicator and can be used while your chart is set to any symbol.

    I'm not sure if $UKX-FTSE is the symbol you want to use for the FTSE 100. If not, you can find what you are looking for here.


    Code:
    function preMain() {
        setPriceStudy(false);
        setStudyTitle("Dow 30 Cash Vs. FTSE 100 ");
        setCursorLabelName("Difference ", 0);
    }
    
    function main() {
        var vValue = 0;
        var c1 = close(0, 1, "$INDU");
        if (c1 == null) {
            return;
        }
        var c2 = close(0, 1, "$UKX-FTSE");
        if (c2 == null) {
            return;
        }
        
        vValue = (c1 - c2);
    
        return (vValue);
    }
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thanks Jason,

      I will try it out and let you know.

      boycee

      Comment

      Working...
      X