PositionScore criteria for new buys and another for existing positions?

In the example below, the MOMO variable gives equal weighting for RSI and momentum and low RSI. This is exactly what I want for an entry or new signal. However, once a position is already entered, I'd like to rank that position based on momentum only.

Is this possible? If so, can someone point me to some example code? Any flaws with this idea that I might be missing?

Sys_buy = MA(C,10) > MA(C,30);
MOMO = (  (100-RSI(3))  + ROC(C,26)  ) /2;

PositionScore = IIf( Sys_buy, Max( 1000 + MOMO, 0 ), 0); 

Alternatively, if the Sys_buy line were changed to include a condition such as RSI(3)<50 the same momentum ranking could be used for all positions (new and existing) but I don't know how to change the PositionScore statement to include a different check for existing positions.

Many thanks for the assistance.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.