网格交易v1.0### Strategy Function Overview
**Grid Trading Framework:**
- Set up 11 grid buy levels evenly distributed between `maxPrice` and `minPrice`.
- Fund allocation increases progressively with each lower grid level (weights 1–11), resulting in more buying at lower prices.
- The grid range is controlled by the `range1` parameter (default: -10%).
**Semi-Final and Final DCA (Dollar-Cost Averaging) Buys:**
- A larger buy order is triggered when the price drops to the `semifinal` level (default: -12%).
- The largest buy order is triggered when the price drops to the `final` level (default: -15%).
**Take-Profit Mechanism:**
- **Primary Take-Profit:** All holdings are sold for profit when the average entry price rises by `tp%`.
- **First Order Trailing Take-Profit:** If only the first order has been executed, a dynamic trailing take-profit is set based on ATR.
**Visualization Elements:**
- **Grid Lines and Labels:** Show the price and quantity at each buy level.
- **Price Lines:** Indicate the highest grid price, the current average entry price, and the take-profit target.
- **Event Markers:** Flag for start time, 🛑 for semi-final trigger, and 🚀 for final trigger.