[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: pair trading chart



PureBytes Links

Trading Reference Links

Mike, THANKS A LOT !!!
that's just what I need !!!!


--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> Hi,
> 
> Your message is a bit confusing since what you are asking for is completely different from the example graphs that you have provided. 
> 
> I believe that the example graphs are showing the performance to date of each symbol on a single chart (i.e. two independent lines), whereas you appear to be asking for a single line showing performance of one symbol relative to the other.
> 
> That being the case, here's an example:
> 
> DIAClose = Foreign("DIA", "Close");
> IWMClose = Foreign("IWM", "Close");
> Diff = (DIAClose - IWMClose)/IWMClose;	// Expressed as a percentage.
> 
> Plot(Diff, "Diff", colorRed, styleLine);
> 
> Mike
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Alexander  Shelupinin" <shelupinin@> wrote:
> >
> > Hi !
> > I want to explore the opportunitie of pair trading, i.e. to trade 2 instruments with very high correlation, if , say, the difference in 2 instruments increased over it's historic value than put a trade with a bet that their difference will come to lower value, close to historic value. I gonna trade index ETFs.
> > Here is an idea what I mean:
> > http://finance.yahoo.com/q/bc?t=1d&s=DIA&l=on&z=l&q=l&c=iwm
> > http://finance.yahoo.com/q/bc?s=dia&t=1d&l=on&z=l&q=l&p=&a=&c=spy
> > http://finance.yahoo.com/q/bc?t=1d&s=QQQQ&l=on&z=l&q=l&c=iwm
> > http://finance.yahoo.com/q/bc?t=1d&s=QQQQ&l=on&z=l&q=l&c=dia
> > 
> > So the question: Could someone help and write a simple code that will draw a chart of difference between mentioned ETFs: IWM, SPY, QQQQ, DIA. I mean not a chart of symbol, but chart of 2 symbol difference, say {DIA} minus {IWM} or {QQQQ} minus {DIA}
> > 
> > thanks a lot for any help !!!
> > 
> > Alex
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/