First of all, if you can put in 2" instead of 1.5", it'd be better.
Washing machines pump a lot faster these days.
Secondly, you really need to have it trapped somehow. The trap needs to
be on the same floor of the washing machine, and it needs to be vented. If
it's not, there's a danger of momentum from the water siphoning the trap
dry. BTW, double check to see if there's not already a trap on it
Thirdly, the standpipe needs to be above the top of the washing tub. If
the top of the standpipe is lower than the water level in the tub, it'll
just run out to that level. I like to put the drains visibly higher than
the washing machines, just to keep things in easy view.