Exploration using Positions Score

Hello all,
I am trying to create a result in an exploration where the stocks are sorted by price (c) provided the stock is above its 35 MA of price. So my attempt is below...but it returns null results as well as stocks with c > ma(c,35).....how do I only retrieve the true condition of the IIF please? Note I have colums in my exploration that work fine, it's just that I can't figure out how to leave out the null result.
Thanks in advance..

PositionScore 		= IIf(C>ma(c,35),C,Null);

You are not using PositionScore correctly. The purpose of PositionScore is to give preference to a particular condition over and above the Trade (i.e. Buy/Sell) conditions.

When you write:

PositionScore = C > MA( C, 35 );

Now Trade preference will be given to Stocks/Instrument where C is greater than MA( C, 35 ) before the Stocks where C is not greater than MA( C, 35 ).

Please read and try the example shown in the Using Position Score section of Portfolio-level backtesting guide.

Also this Symbol selection when PositionScore is not defined for more information.

And this thread:

The question is about EXPLORATION, not backtest. For exploration the Users Guide is here http://www.amibroker.com/guide/h_exploration.html and if you read it, you would find that you need a Filter variable and code that you are looking for is:

Filter = C > MA( C, 35 ); // required for EXPLORATION

PositionScore variable affects only backtest (and optimization). It has no meaning and no effect for exploration. If you run code in Exploration mode it only cares about Filter variable.


Thank you....learning slowly, hopefully the newbie questions will stop soon.