OPEN-SOURCE SCRIPT
Opening Range Breakout - NQ Dynamic Risk

Found this video talking about first M15 opening candle range breakout:
youtube.com/watch?v=fuTqr5vlPZM
Was curious about the results and wrote a script to backtest. Strategy rules:
1) First 3 M5 candles defines the opening range
2) First M5 candle that closes outside of this range, enter trade
3) SL at halfway of the range + additional 5 points
4) Target 2R
The script is set for NY open at 9:30 with daylight saving etc accounted for.
By default it's set to start taking trades from May 1 2025.
Dynamic position size. Default equity to risk is 1%, so it automatically calculates number of contracts based on entry to SL. Also, this is NQ so contract multiplier is set to 20.
Have fun.
youtube.com/watch?v=fuTqr5vlPZM
Was curious about the results and wrote a script to backtest. Strategy rules:
1) First 3 M5 candles defines the opening range
2) First M5 candle that closes outside of this range, enter trade
3) SL at halfway of the range + additional 5 points
4) Target 2R
The script is set for NY open at 9:30 with daylight saving etc accounted for.
By default it's set to start taking trades from May 1 2025.
Dynamic position size. Default equity to risk is 1%, so it automatically calculates number of contracts based on entry to SL. Also, this is NQ so contract multiplier is set to 20.
Have fun.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้มันเป็นโอเพ่นซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันการทำงานของสคริปต์ได้ ขอแสดงความชื่นชมผู้เขียน! แม้ว่าคุณจะสามารถใช้งานได้ฟรี แต่อย่าลืมว่าการเผยแพร่โค้ดซ้ำนั้นจะต้องเป็นไปตามกฎระเบียบการใช้งานของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน