Hi,
I am working on scanner to get stocks based on "Long" status on daily basis, but partially successful.
1. In screenshot "Conditions" , I am using 3 conditions
2. In screenshot "Long11_25" , Long status appeared on 11/25, but stock PRFX appeared in scan today
3. In screenshot "Long11_27" , Long status appeared on 11/25, but stock TARA appeared in scan today
4. In screenshot "RKDA" , Long status appeared on 12/5, but stock RKDA appeared in scan today as expected.
Out of 3 stocks, RKDA worked as expected. Can you please suggest me if I am missing anything to see why I got 11/25 stocks appeared in today's scan?
Really appreciate your help.
thanks, I am using script from this forums..it's CSR script from this forum
#CSR Buy/Sell Arrows with Short/LongHaulFilter Bubbles
#Developed 4-9-22 First Edition
declare upper;
input atrreversal = 2.0;#Hint atrreversal: Turn down for more entries, up for less entries. Purple signal indicates low point reversal and close approaching Kijun. Orange signal indicates the price is crossing the Kijun. Green signal indicates the low of the candle holds over the Kijun. Red signal means reversal at a high point.
def priceh = MovingAverage(AverageType.EXPONENTIAL, high, 5);
def pricel = MovingAverage(AverageType.EXPONENTIAL, low, 5);
def EIL = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastL;
def EIH = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastH;
def tenkan_period = 9;
def kijun_period = 26;
def Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
def avgPerc = ((Kijun - close) / Kijun) * 100;
plot signal = !isNaN(EIL) within 15 bars and low < Kijun and avgPerc < 15 and avgPerc > 0 and avgPerc[1] < avgPerc;
signal.setDefaultColor(color.white);
plot KijunCross = signal within 10 bars and Crosses(close, kijun, CrossingDirection.ABOVE);
kijuncross.setDefaultColor(color.white);
def overKijun = (kijunCross within 10 bars or overKijun[1] == 1) and low > kijun;
plot overKijun1 = overKijun;
overKijun1.setDefaultcolor(color.white);
plot signalrevBot = !isNaN(EIL);
AddChartBubble(Signalrevbot, low, "Long", Color.White, no);
AddLabel(!isNan(EIL), "LONG", Color.GREEN);
input usealerts = yes;
alert(usealerts and signalrevbot[1] == 1, "Long", alert.bar, sound.ring);
I am working on scanner to get stocks based on "Long" status on daily basis, but partially successful.
1. In screenshot "Conditions" , I am using 3 conditions
2. In screenshot "Long11_25" , Long status appeared on 11/25, but stock PRFX appeared in scan today
3. In screenshot "Long11_27" , Long status appeared on 11/25, but stock TARA appeared in scan today
4. In screenshot "RKDA" , Long status appeared on 12/5, but stock RKDA appeared in scan today as expected.
Out of 3 stocks, RKDA worked as expected. Can you please suggest me if I am missing anything to see why I got 11/25 stocks appeared in today's scan?
Really appreciate your help.
thanks, I am using script from this forums..it's CSR script from this forum
#CSR Buy/Sell Arrows with Short/LongHaulFilter Bubbles
#Developed 4-9-22 First Edition
declare upper;
input atrreversal = 2.0;#Hint atrreversal: Turn down for more entries, up for less entries. Purple signal indicates low point reversal and close approaching Kijun. Orange signal indicates the price is crossing the Kijun. Green signal indicates the low of the candle holds over the Kijun. Red signal means reversal at a high point.
def priceh = MovingAverage(AverageType.EXPONENTIAL, high, 5);
def pricel = MovingAverage(AverageType.EXPONENTIAL, low, 5);
def EIL = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastL;
def EIH = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastH;
def tenkan_period = 9;
def kijun_period = 26;
def Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
def avgPerc = ((Kijun - close) / Kijun) * 100;
plot signal = !isNaN(EIL) within 15 bars and low < Kijun and avgPerc < 15 and avgPerc > 0 and avgPerc[1] < avgPerc;
signal.setDefaultColor(color.white);
plot KijunCross = signal within 10 bars and Crosses(close, kijun, CrossingDirection.ABOVE);
kijuncross.setDefaultColor(color.white);
def overKijun = (kijunCross within 10 bars or overKijun[1] == 1) and low > kijun;
plot overKijun1 = overKijun;
overKijun1.setDefaultcolor(color.white);
plot signalrevBot = !isNaN(EIL);
AddChartBubble(Signalrevbot, low, "Long", Color.White, no);
AddLabel(!isNan(EIL), "LONG", Color.GREEN);
input usealerts = yes;
alert(usealerts and signalrevbot[1] == 1, "Long", alert.bar, sound.ring);