Unpredictable system component contingencies have imposed vulnerability on power systems, which are under high renewables penetration nowadays. Intermittent nature of renewable energy sources has made this unpredictability even worse than before and calls for excellent adaptability. This study proposes a flexible security-constrained structure to meet the superior flexibility by coordination of generation and demand sides. In the suggested model, demand-side flexibility is enabled via an optimum real-time (RT) pricing program, while the commitment of conventional units through providing up and down operational reserves improves the flexibility of supply-side. The behaviour of two types of customers is characterised to define an accurate model of demand response and the effect of customers' preferences on the optimal operation of power networks. Conclusively, the proposed model optimises RT prices in the face of contingency events as well as wind power penetration. System operators together with customers could benefit from the proposed method to schedule generation and consumption units reliably.