Nifty Vs BankNifty

Discussion in 'AmiBroker' started by amitrandive, Sep 5, 2013.

  1. amitrandive

    amitrandive Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    8,799
    Likes Received:
    24,022
    Trophy Points:
    113
    Dear All

    I want an AFL like the attached image from GoogleFinance.
    Here the Bank Nifty is plotted vs Nifty.
    Also there should be an option for changing the scrip and putting any scrip instead of BankNifty.

    Thanks for your help.
    Amit
     
    Last edited: Sep 12, 2013
  2. manojborle

    manojborle Well-Known Member

    Joined:
    May 9, 2012
    Messages:
    2,981
    Likes Received:
    4,781
    Trophy Points:
    113
    Location:
    Pune
    RelStrength
    - comparative relative strength Referencing other symbol data
    (AFL 1.3)


    SYNTAX RelStrength( "tickername", fixup = 1)
    RETURNS ARRAY
    FUNCTION Calculates relative strength of currently selected security compared to "tickername" security. When you give an empty string as argument, a standard relative strength base security taken from Stock->Categories will be used.
    The last parameter - fixup - with the default value of 1 - causes filling the holes in the data with previous values (behaviour introduced in 3.90.3), if fixup is 0 - the holes are not fixed (the old, pre-3.90.3 behaviour)
    Note: you can still use Foreign/RelStrength in the old way:
    Foreign( "ticker", "field" ), RelStrength( "ticker" ) - then the holes will be fixed.
    EXAMPLE relstrength( "^DJI" )
    SEE ALSO

    Comments:
    jayson

    2003-06-23 09:20:02 Interpretation

    Comparative Relative Strength compares a security's price change with that of a "base" security. When the Comparative Relative Strength indicator is moving up, it shows that the security is performing better than the base security. When the indicator is moving sideways, it shows that both securities are performing the same (i.e., rising and falling by the same percentages). When the indicator is moving down, it shows that the security is performing worse than the base security (i.e., not rising as fast or falling faster).

    Comparative Relative Strength is often used to compare a security's performance with a market index. It is also useful in developing spreads (i.e., buy the best performer and short the weaker issue).



    References:
    The RelStrength function is used in the following formulas in AFL on-line library:

    Relative Strength
    Relative strength comparison with moving average
     
    columbus and amitrandive like this.
  3. amitrandive

    amitrandive Well-Known Member

    Joined:
    Jul 26, 2010
    Messages:
    8,799
    Likes Received:
    24,022
    Trophy Points:
    113
    Thanks Manoj for the detailed reply.
    :clapping:
     
Loading...

Share This Page