Plain 5 min Opening Range breakout. Exits are up to you.
//@version=2 //Created by CristianD strategy(title="CD_Opening_Range_V1", shorttitle="CD_Opening Range Strategy", overlay=true) Newbar(res) => change(time(res)) != 0 High = valuewhen(Newbar('D'),high,0) Low = valuewhen(Newbar('D'),low,0) Long = close>High and open<=High if (Long) strategy.entry("Long", strategy.long) strategy.exit("Close Long", "Long", trail_points=100, trail_offset=50) Short = close <Low and open>=Low if (Short) strategy.entry("Short", strategy.short) strategy.exit("Close Short","Short",trail_points=100, trail_offset=50)