the script draws the FVG from 3 bars ago using left=bar_index - 5 and right=bar_index - 4 (these values are offset to display the previous FVG). Upcoming FVG: It also draws an upcoming FVG from the current bar + 1 using left=bar_index + 1 and right=bar_index + 2. Handling Both FVGs (Previous and Upcoming): For both Bullish and Bearish FVGs, it draws boxes for both the previous and upcoming FVG areas. Number of FVGs Managed: It still limits the number of FVGs displayed on the chart using fvgHistoryNbr. How This Works: The Previous FVG is drawn based on the gap that happened a few bars ago (from 3 bars ago), while the Upcoming FVG is drawn based on the expected price movement. The FVG areas are highlighted using boxes and labels, making it easier to visualize past and potential future gaps.