OPEN-SOURCE SCRIPT

Order Block Strategy with Lines

Key Changes:

Added recentBullishOB and recentBearishOB conditions that check if the order block occurred within the last 24 hours using timenow - time <= 86400000 (24 hours in milliseconds).

Modified all trade execution logic and line drawing to use these recent conditions instead of the original order block conditions.

Maintained original plotting of all order blocks (including older ones) using the unfiltered bullishOB and bearishOB variables.

This modification ensures that:

All order blocks are still visually marked on the chart

Trading levels are only calculated for recent order blocks

Trades are only executed on order blocks created within the last 24 hours

Support/resistance lines are only drawn for recent order blocks

Penafian