- Joined
- 24 October 2005
- Posts
- 1,302
- Reactions
- 834
Using close price in relation to DEMA 250 this way references close price of stock and not foreign index.
SetForeign( ParamList("Index","^AORD | ^GSPC"), True, True );
X1 = DEMA(C, 250);
X2 = C > X1; //Open long stock positions
X3 = C < X1; //Open short stock positions
RestorePriceArrays(True);
X1 and X2 and X3 arrays are filled inside the SetForeign function and therefore reference only the Foreign ticker.
Running my code in the backtester on just WOW I get short entries on 21/01/09 and 5/03/2009. No entry in June.