" Israel hath sinned, and they have also transgressed my covenant which I commanded them: for they have even taken of the accursed thing, and have also stolen, and dissembled also, and they have put it even among their own stuff. Therefore the children of Israel could not stand before their enemies, but turned their backs before their enemies, because they were accursed: neither will I be with you any more, except ye destroy the accursed from among you. Up, sanctify the people, and say, Sanctify yourselves against to morrow: for thus saith the LORD God of Israel, There is an accursed thing in the midst of thee, O Israel: thou canst not stand before thine enemies, until ye take away the accursed thing from among you."
When you willingly invite sin into your life, whether publicly or privately, you cripple yourself and affect those around you. You can't expect the Lord to fight your battles for you when you are knowingly going against what pleases Him. His holiness and justice demands that you be blameless. His mercy and love enables Him to forgive you. But you have to ask for it. You have to repent. This means being sorry for your sins and sincerely making a change.
What secret sin is holding you back? What recurring sin is keeping you from your victory?
When the children of Israel got rid of the accursed thing, they were able to go forward and fight and win their battle.
"And the LORD said unto Joshua, Fear not, neither be thou dismayed: take all the people of war with thee, and arise, go up to Ai: see, I have given into thy hand the king of Ai, and his people, and his city, and his land:"
Let go of the thing that is hindering you. Repent, change, and turn your battles over to the Lord and He will fight for you. And when God fights for you, He always wins.