WilsonFisk
Lurker From The Deep
- Joined
- 24 June 2008
- Posts
- 19
- Reactions
- 87
MAfilter = MA( C, 10 ); // 10 week lookback period
IndexBuyFilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
I may be missing something, but it doesn't look like your code for the index filter is actually referencing the index, rather just the individual symbol??
I am by no means an Amibroker expert so if I am missing it somewhere please let me know.