Forum

[Help] - EA Bar length alert

Dear pro, I try to code EA to alert if bar length > 20pip in M15 chart. But when running, alert is continuous and cannot stop. I just need alert 1 time/1 bar. Pls help me to check code below. Thanks a lot! void OnTick() { double a = iHigh(Symbol(), PERIOD_M15 ,0); double b = iLow (Symbol()

Pls help me to check this code!!!

I code a simple RSI alert, i use M15 timeframe, if the RSI value of last bar < 40, it display box and alert sound. I tried to code but it not work. Anyone could help me to fix it. Thanks so much! double MIN_LEVEL = 40; double actualRSI = iRSI(NULL, PERIOD_M15 , 9 , PRICE_LOW); void OnTick() { if