Amibroker help

Почему в этом коде не исполняется ticker “B”, after all, A and B must be executed at the same time?
In the settings, everything seems to be correct.

SB = Foreign(“A”, “Close”);
VT = Foreign(“B”, “Close”);

spread = SB – (VT/10);

UpSig = Cross(spread, 122);
CloseUp = Cross(121, spread);
DwSig = Cross(121.5, spread);
CloseDw = Cross(spread,122);

// remove unnecessary signals
UpSig = ExRem(UpSig, CloseUp);
CloseUp = ExRem(CloseUp, UpSig);
DwSig = ExRem(DwSig, CloseDw);
CloseDw = ExRem(CloseDw, DwSig);

if(Name() == A”)
{
SetPositionSize(1, spsShares);
Buy = DwSig;
Sell = CloseDw;
Short = UpSig;
Cover = CloseUp;
}
if(Name() == “B”)
{
SetPositionSize(1, spsShares);
Buy = UpSig;
Sell = CloseUp;
Short = DwSig;
Cover = CloseDw;
}

  my_trade @ 2011-03-10T23:18:00
Scroll to Top