A direct-forcing fictitious domain method is employed to study the dynamics of an open triangle in a vertically oscillatory flow. The flow structures, the vertical force and the torque on the fixed body are analysed for the stable flow regime in which the flow structures form and evolve exactly in the same way in each period and the unstable regime, respectively. Our results indicate that in the stable flow regime for the body with upright orientation, the steady streaming structure mainly comprises two vortex pairs located respectively above and below the body. Due to up–down asymmetry of the body, the pair below the body produces a larger vertical force on the body than the upper pair, which is mainly responsible for the non-zero average force at relatively high Reynolds numbers. The average force increases with increasing Reynolds number or increasing dimensionless period for the parameter range studied, due to the vortex effects. In the unstable regime, a vortex pair is ejected downward from each body edge. The irregular motion of the emitted vortices below the body leads to the irregular fluctuation of the vertical force. Regarding the torque on a tilted body, in the stable regime, the body experiences a restoring torque when its vertex angle is larger than a critical value being close to (and smaller than) 60°, and otherwise a destructive torque, irrespective of the value of tilt angle. For a fixed vertex angle, the torque magnitude is largest when the tilt angle is around 45°. In the unstable regime, the persistent ejection of the vortex pair during upward flow and corresponding restoring torque are observed for a large tilt angle with one edge aligned close to the horizontal direction, as in the experiment of Liu et al. (Phys. Rev. Lett., vol. 108, 2012, 068103). For a relatively small tilt angle, the emission direction of the vortex pair has intermittency, leading to the intermittency in the direction of torque. The reasons for the above observations are discussed. The predictions on the stable orientation for a hovering body in the stable flow regime and the irregular orientation in the unstable regime are confirmed in the dynamic simulation of a freely moving body. The body with the stable horizontal orientation in case of small vertex angle migrates along the body-shape-diverging direction.