How to exit a trade using RANKVALUE?

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
danblum29
Posts: 2
Joined: Sat Nov 25, 2023 3:38 pm

How to exit a trade using RANKVALUE?

Post by danblum29 »

Hi, I wrote an entry script that is entering positions on Mondays based on the Rate of Change (ROC) indicator, which it uses as a RANKVALUE, and some other conditions. The script enters the top 10 (highest ROC) stocks.

ROC:= (CLOSE-REF(CLOSE,N))/REF(CLOSE,N)*100;
RANKVALUE:= ROC;
TODAY:= DAYOFWEEK ;
ISMONDAY : TODAY=1;
EVENT: RSI(CLOSE,MR) < 50 & ISMONDAY;

I also need to exit positions on Monday's if the stock's ROC is no longer in the top 10. However, I looked at the different rank selectors, and read about them, but couldn't figure out how.

Any ideas?
Chris White
Posts: 212
Joined: Mon Nov 29, 2010 9:21 pm

Re: How to exit a trade using RANKVALUE?

Post by Chris White »

I think the approach to take is to exit all positions on the Monday and re-enter that Monday's top 10. If there are stocks that carried over from the previous week they will be re-added.
Post Reply