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



 
 

Reply via email to