ncallie301
Member
- Joined
 - Apr 13, 2021
 
- Posts
 - 5
 
- Likes
 - 0
 
I created a PercentR Function which I have validated.  I created a Study that should return a Signal on Bars in which PercentR crosses it's own Exponential Moving Average (PREMA).
	
	
	
		
This is instead returning a signal for every bar where PercentR is above it's EMA, instead of only when it crosses above that EMA.
				
			
		Java:
	
	if (crossedAbove(series, index - i, Values.PERCENTR, Values.PREMA)) {
        ruleOne = true;
        break;
}
	This is instead returning a signal for every bar where PercentR is above it's EMA, instead of only when it crosses above that EMA.