Thanks - I do appreciate your insight. However, bieng new to Amibroker and AFL, that is beyond my abilities. I'm trying to tinker with the concept right now, but I don't fully understand exactly how to set that up. It seems to be pulling trades from a whole host of symbols, so I obviously didn't do it right.
Any help? --- In [email protected], "Mike" <sfclimb...@...> wrote: > > Have a look at SetForeign()/RestorePriceArrays(). Wrap all your trade > calculation logic within those two calls. > > http://www.amibroker.com/guide/afl/afl_view.php?id=247 > > Mike > > --- In [email protected], "graphman27" <steve@> wrote: > > > > I hear it's possible to generate signals using a proxy (such as an index), > > but actually buy and sell an ETF, I just can't figure out how to do it > > within PORTFOLIO. To you code wizards, how do I change the code below to > > have the signals come from an index, but yet have the buys and sells > > acutally be on an ETF? > > > > Sample Code within a portfolio: > > > > //symbol-specific rules > > n = Name(); > > if( n == "EWZ" ) > > { > > //strategy 1 for Brazil here > > MAShortBuy=Optimize("MAShortBuy",10,7,12,1); > > MALongBuy=Optimize("MALongBuy",50,20,60,10); > > MAShortSell=Optimize("MAShortSell",8,2,8,1); > > MALongSell=Optimize("MALongSell",40,10,40,10); > > > > Buy = Cross(MA( Close,MAShortBuy ),MA( Close,MALongBuy )); > > Sell = Cross(MA( Close,MALongSell ),MA( Close,MAshortSell )); > > .............more comes after, but you get the point....... > > > > This example would have an index titled "BrazilIndex" and have the iShares > > Brazil ETF (EWZ) for actual purchases. > > > > Thanks in advance! > > > > Steve. > > >
