@guy111 i have a video that explains what i wanted:
https://youtu.be/yF9e8_SuXCA
in the video you'll see what exactly i want the bot to do, and in the video's description i tried to explain what you might not understand.
About the pending orders thing: - i suggested it becuse i thought it's a better way to build the bot.
because in CFD we have the spread which makes the price not accurate.