ere i can decide at what price it
It sounds like you're really new and you're getting ahead of yourself a little bit. I'd really recommend thumbing through the FAQ example builds that FxDreema provides as a basic launching point (even if it means just building things you don't even intend to use, just for practice).
You need to create inputs for your Entry, SL, TP, and maybe a bool (T/F) for if you're placing longs or shorts.
You'd probably want to work with pending orders and not "buy now" since you're working with a specific price.
You can go to your "on init" tab an simply set up a "once per bar", into a "No trade/Pending order", into a condition block that checks if you have true or false selected (for placing buy/sell), then out one side, place a pending sell at specified price with specified TP/SL, and the pending buy on the other side.
Since you also have this added criteria that if the last trade was a loss, then to open a new trade, you can Once per bar (or leave it on tick if you must depending on your strategy, just going to be more resource demanding) into a "no trade/pending order", into a check profit of last closed trade, see if it was a loser. If it was, then it checks your true/false condition for buy sell, into a new pending buy/sell order, just like the last step, if that makes sense. If it was profitable on the last trade, if you don't connect anything there, then it will break the loop.