CD_Opening_Range_V1 Strategy

Plain 5 min Opening Range breakout. Exits are up to you.
Remove from Favorite Scripts Add to Favorite Scripts
//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)


Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out