Thanks a lot pacois, have not tested it in live market but the indicator seems to be working perfectly.
just make a modification to the code and also have a question which i explain below
EDIT: what I mean in the second picture about the DSS bressert it's actually not the part in the green rectangle that I know it won't affect the code, but the part below that which I am not sure if it's related to the DSS bressert.
thanks in advance.