Amibroker spread formula

Discussion in 'Technical Analysis' started by themickey, May 8, 2010.

  1. themickey


    Would anyone know how to plot the formula for the spread between two companies using RSI within Amibroker?
    Below is how I've attempted the formula.
    I'm attempting to compare the RSI of the Dow vs other stocks.
    The R2 line of the formula below appears incorrect.


    R1 = RSI(14); // company RSI
    R2 = Foreign( "DJ", "R1 "); // Foreign stock RSI
    R3 = R1 - R2;

  2. auric


    this might do..

    Ticker= ParamStr("Short ticker", "?");//short stock
    tickersc=Foreign( ticker, "C");//Short stock
    ticker2=C;//long stock

  3. empee




    R1 = RSI(14); // company RSI
    R2 = RSIa(dj,14)
    R3 = R1 - R2;


    To see it:

    plot(R3,"R1-R2 Spread",colorblack,1,1);
  4. themickey


    Thankyou auric and empee.
    I noticed after my first posting that foreign was limited to datafields of O,C,H,L,V and OI and I couldn't get my head around on how to use it otherwise.
    I have 2 of Bandy's books on using AB formulas but still couldn't suss it out.
    Thanks again.
  5. gjohn


    Hi, could anyone have the Amibroker formula for candlestick spread between two stocks? I have only spread with plotting just line of EOD prices, but I need candlestick chart of OHLC spread prices. Thanks.