"on Trade" is an event that fires when something happens with some trade or order - open, close, modify. I think you just want to put blocks 8 and 7 under "on Tick". And you probably need something more, because MA10 can be > than MA20 and on the very next tick it can be the opposite, so you will end up with a trade closed immediately. "Once per bar" or something else can help, it depends. And it's totally different when Sell is used as well.
M