Re: [amibroker] making ticker=current ticker
Ya that would work but I was thinking of trying to run one stock against a list in a watchlist one by one. But then this would be too long and tedious to code. From: Herman psy...@magma.ca To: jim fenster amibroker@yahoogroups.com Sent: Tue, July 6, 2010 1:36:24 PM Subject: Re: [amibroker] making ticker=current ticker Perhaps: if( name() == ABC ) { Ticker1 = ABC; Ticker2 = XYZ; } else { Ticker2 = ABC; Ticker1 = XYZ; } Herman Hi, I am trying to run a pairs trading system that starts with: ticker1=ABC ; ticker2=XYZ ; What im wondering is, what if I want to use the current ticker and say ABC. So ticker 1 is the current symbol and ticker two is ABC. How do I write that code? If I put the ticker2 as the current stock, it doesnt work. Because when the current stock is ABC, then the system doesnt know what the other ticker was..Anyone run into this problem? Thanks, Jim
Re: [amibroker] making ticker=current ticker
_xyz=Foreign(xyz,C,1); Plot(_xyz,xyz,*colorGreen*,*styleLine*); overlay the above code on ABC price chart. u shall get both ticker in the same pane. On Tue, Jul 6, 2010 at 10:33 PM, jim fenster normanj...@yahoo.com wrote: Hi, I am trying to run a pairs trading system that starts with: ticker1=ABC; ticker2=XYZ; What im wondering is, what if I want to use the current ticker and say ABC. So ticker 1 is the current symbol and ticker two is ABC. How do I write that code? If I put the ticker2 as the current stock, it doesnt work. Because when the current stock is ABC, then the system doesnt know what the other ticker was..Anyone run into this problem? Thanks, Jim