Hey linnux - oddly enough, I put the code you posted in your 29 April 2011 forum message into my strat this morning, because I was having the same problem. Your code fixed my problem! It wasn't trading all last week (even though historical tester and my own analysis showed it should have entered multiple trades). Then, after I uploaded and started the modified strategy in the contest page, it finally ran correctly, and entered a trade.
I just added the following to my onStart section:
Set<Instrument> instSet = new HashSet<Instrument>();
instSet.add(Instrument.GBPUSD);
context.setSubscribedInstruments(instSet);
...and I made sure that the instrument was set to my instrument of choice (GBPUSD) in both the onStart, and at the top of my strategy where I identify what I want "this.instrument" to be. Feel free to pull my strat off of the contest web page to see the fix in case there is something in there you can use.
And, even though yours isn't working yet, you've helped others!
Thanks -
Just4FX