OPEN-SOURCE SCRIPT

Edge Sweep | Ismael Borges

267
My strategy is called Edge Sweep. It is based on the high and low of a configurable session range.

First, the system creates a box using the selected session time. After the box is completed, Trade 1 looks for a liquidity sweep outside either side of the box. If price sweeps above the box, the strategy enters a short position. If price sweeps below the box, it enters a long position.

If Trade 1 reaches take profit, the strategy activates Trade 2, which is another liquidity sweep at the opposite side of the box. The entry can be placed slightly inside or outside the box using a configurable tick offset.

If Trade 2 also reaches take profit, Trade 3 becomes available. Trade 3 is another sweep at the opposite side of Trade 2. Therefore, a possible sequence would be: Trade 1 short, Trade 2 long, and Trade 3 short.

The stop-loss sequence is different. If Trade 1 hits stop loss or is force-closed with a negative result, the next trade is a retest setup instead of another sweep. After that retest trade closes, the trading cycle is complete. Trade 3 is only released after two consecutive profitable sweep trades.

If no trade occurs during the regular Trade 1 window, the strategy can carry the original box into an extended trading window. During that extended window, it is allowed to execute only one trade. After that trade closes—whether by take profit, stop loss, or force close—the strategy waits for the next session and a new box.

Every trade has independent settings for entry window, entry type, contracts, tick offset, stop loss, take profit, trailing stop, buy/sell permission, and force close.

The strategy also includes an optional martingale contract progression. A stop loss or negative force close increases the number of contracts for the next trade, up to a configurable maximum. A take profit resets the progression.

It supports Sweep, Retest, and Breakout entry modes, works with different assets by using the instrument’s minimum tick size, and includes webhook compatibility for automated execution.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน