TEN = MA(CLOSE,10);
TENCHANGE = TEN - TEN[1];
TENCHANGEDIS = TENCHANGE > 0;
LASTMORE = BArslAST(TENCHANGEDIS);
LASTMORE1 = LASTMORE[1];
DIS = (CLOSE - CLOSE[LASTMORE1 + 1]) / CLOSE[LASTMORE1 + 1];
SELECT DIS <= -0.15 AND TENCHANGE >= 0;
TEN = MA(CLOSE,10);
TENCHANGE = TEN - TEN[1];
TENCHANGEDIS = TENCHANGE > 0;
LASTMORE = BArslAST(TENCHANGEDIS);
LASTMORE1 = LASTMORE[1];
DIS = (CLOSE - CLOSE[LASTMORE1 + 1]) / CLOSE[LASTMORE1 + 1];
SELECT DIS <= -0.15 AND TENCHANGE >= 0;