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?
How to exit a trade using RANKVALUE?
Moderator: Chris White
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: How to exit a trade using RANKVALUE?
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.