Iran threats put global oil supply at risk while reserves hit danger zone — ride
Created
Thesis
The price of oil spikes whenever there is a threat to the world's oil supply, like the current conflict near Iran. Right now the situation is extra risky because experts say global backup supplies have been drained so much that an actual disruption could send prices soaring to $135 a barrel. By buying oil-related funds while the news is breaking, you position yourself to profit if those fears push prices even higher in the coming days. It's a fast-moving situation, so this is a short-term trade rather than a long-term hold.
Strategy approach
Build a rule-based strategy that enters long USO on the D1 timeframe when price closes above the upper Bollinger Band (20, 2) or when RSI(14) > 60. Exit if RSI(14) < 40 or after a 10-day max hold.
Markets and timeframes
Entry and exit at a glance
These are the named rules in the shared configuration. Review the full conditions below before using a strategy.
- Entry: BB/RSI/ADX/ATR Signal Long (USO@1d) (4 conditions)
- Entry: BB/RSI/ADX/ATR Signal Long (XLE@1d) (4 conditions)
- Entry: BB/RSI Signal Long (USO@1d) (2 conditions)
- Entry: BB/RSI Signal Long (XLE@1d) (2 conditions)
- Exit: Position Exit Rule (USO@1d) (1 condition)
- Exit: Position Exit Rule (XLE@1d) (1 condition)
- Exit: TP: Near Resistance[1] (USO@1d) (1 condition)
- Exit: TP: Near Resistance[1] (XLE@1d) (1 condition)
- Exit: SL: Below Support[1] (USO@1d) (1 condition)
- Exit: SL: Below Support[1] (XLE@1d) (1 condition)
- Exit: SL: Fib Retracement 78.6% (USO@1d) (1 condition)
- Exit: SL: Fib Retracement 78.6% (XLE@1d) (1 condition)
- Exit: Stop Loss at 2.0% (1 condition)
- Exit: Take Profit at 4.0% (1 condition)
Shared strategy rules
Rule configuration
{
"data_dependencies": [
{
"symbol": "USO",
"timeframe": "1d"
},
{
"symbol": "XLE",
"timeframe": "1d"
}
],
"entry_rules": [
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "adx",
"indicator": {
"name": "adx",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 20
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "atr",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 0.5
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_1_uso",
"name": "BB/RSI/ADX/ATR Signal Long (USO@1d)",
"priority": 1,
"trade_symbol": "USO"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "adx",
"indicator": {
"name": "adx",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 20
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "atr",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 0.5
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_1_xle",
"name": "BB/RSI/ADX/ATR Signal Long (XLE@1d)",
"priority": 2,
"trade_symbol": "XLE"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_2_uso",
"name": "BB/RSI Signal Long (USO@1d)",
"priority": 2,
"trade_symbol": "USO"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_2_xle",
"name": "BB/RSI Signal Long (XLE@1d)",
"priority": 3,
"trade_symbol": "XLE"
}
],
"exit_rules": [
{
"applies_to": "both",
"conditions": [
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "less_than",
"right": {
"type": "constant",
"value": 40
}
}
],
"enabled": true,
"id": "exit_1_uso",
"name": "Position Exit Rule (USO@1d)",
"priority": 1,
"purpose": "signal",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "less_than",
"right": {
"type": "constant",
"value": 40
}
}
],
"enabled": true,
"id": "exit_1_xle",
"name": "Position Exit Rule (XLE@1d)",
"priority": 2,
"purpose": "signal",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than_or_equal",
"right": {
"rank": 1,
"type": "resistance_level"
}
}
],
"enabled": true,
"id": "exit_2_uso",
"name": "TP: Near Resistance[1] (USO@1d)",
"priority": 97,
"purpose": "take_profit",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than_or_equal",
"right": {
"rank": 1,
"type": "resistance_level"
}
}
],
"enabled": true,
"id": "exit_2_xle",
"name": "TP: Near Resistance[1] (XLE@1d)",
"priority": 98,
"purpose": "take_profit",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "crossed_above",
"right": {
"rank": 1,
"type": "support_level"
}
}
],
"enabled": true,
"id": "exit_3_uso",
"name": "SL: Below Support[1] (USO@1d)",
"priority": 100,
"purpose": "stop_loss",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "crossed_above",
"right": {
"rank": 1,
"type": "support_level"
}
}
],
"enabled": true,
"id": "exit_3_xle",
"name": "SL: Below Support[1] (XLE@1d)",
"priority": 101,
"purpose": "stop_loss",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "less_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"ratio": 786,
"type": "fibonacci_retracement"
}
}
],
"enabled": true,
"id": "exit_4_uso",
"name": "SL: Fib Retracement 78.6% (USO@1d)",
"priority": 101,
"purpose": "stop_loss",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "less_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"ratio": 786,
"type": "fibonacci_retracement"
}
}
],
"enabled": true,
"id": "exit_4_xle",
"name": "SL: Fib Retracement 78.6% (XLE@1d)",
"priority": 102,
"purpose": "stop_loss",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "unrealized_pnl_percent",
"type": "position"
},
"operator": "less_than_or_equal",
"right": {
"type": "constant",
"value": -2
}
}
],
"enabled": true,
"id": "exit_5",
"name": "Stop Loss at 2.0%",
"priority": 100,
"purpose": "stop_loss"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "unrealized_pnl_percent",
"type": "position"
},
"operator": "greater_than_or_equal",
"right": {
"type": "constant",
"value": 4
}
}
],
"enabled": true,
"id": "exit_6",
"name": "Take Profit at 4.0%",
"priority": 100,
"purpose": "take_profit"
}
],
"position_sizing": {
"max_position_percent": 25,
"method": {
"fib_stop_ratio": 786,
"risk_percent": 2,
"type": "fixed_risk"
},
"min_position_value": 100
},
"trigger_timeframe": "1d",
"version": 1
}Indicator configuration
{
"indicators": [
{
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
{
"name": "rsi",
"period": 14
},
{
"name": "adx",
"period": 14
},
{
"name": "atr",
"period": 14
},
{
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
{
"name": "rsi",
"period": 14
},
{
"name": "adx",
"period": 14
},
{
"name": "atr",
"period": 14
}
]
}Parsed strategy
{
"data_dependencies": [
{
"symbol": "USO",
"timeframe": "1d"
},
{
"symbol": "XLE",
"timeframe": "1d"
}
],
"entry_rules": [
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "adx",
"indicator": {
"name": "adx",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 20
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "atr",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 0.5
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_1_uso",
"name": "BB/RSI/ADX/ATR Signal Long (USO@1d)",
"priority": 1,
"trade_symbol": "USO"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "adx",
"indicator": {
"name": "adx",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 20
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "atr",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 0.5
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_1_xle",
"name": "BB/RSI/ADX/ATR Signal Long (XLE@1d)",
"priority": 2,
"trade_symbol": "XLE"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_2_uso",
"name": "BB/RSI Signal Long (USO@1d)",
"priority": 2,
"trade_symbol": "USO"
},
{
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"field": "upper",
"indicator": {
"name": "bollinger_bands",
"period": 20,
"std_dev": 2
},
"type": "indicator"
}
},
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "greater_than",
"right": {
"type": "constant",
"value": 60
}
}
],
"direction": "long",
"enabled": true,
"id": "entry_2_xle",
"name": "BB/RSI Signal Long (XLE@1d)",
"priority": 3,
"trade_symbol": "XLE"
}
],
"exit_rules": [
{
"applies_to": "both",
"conditions": [
{
"left": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "less_than",
"right": {
"type": "constant",
"value": 40
}
}
],
"enabled": true,
"id": "exit_1_uso",
"name": "Position Exit Rule (USO@1d)",
"priority": 1,
"purpose": "signal",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"indicator": {
"name": "rsi",
"period": 14
},
"type": "indicator"
},
"operator": "less_than",
"right": {
"type": "constant",
"value": 40
}
}
],
"enabled": true,
"id": "exit_1_xle",
"name": "Position Exit Rule (XLE@1d)",
"priority": 2,
"purpose": "signal",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than_or_equal",
"right": {
"rank": 1,
"type": "resistance_level"
}
}
],
"enabled": true,
"id": "exit_2_uso",
"name": "TP: Near Resistance[1] (USO@1d)",
"priority": 97,
"purpose": "take_profit",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "greater_than_or_equal",
"right": {
"rank": 1,
"type": "resistance_level"
}
}
],
"enabled": true,
"id": "exit_2_xle",
"name": "TP: Near Resistance[1] (XLE@1d)",
"priority": 98,
"purpose": "take_profit",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "crossed_above",
"right": {
"rank": 1,
"type": "support_level"
}
}
],
"enabled": true,
"id": "exit_3_uso",
"name": "SL: Below Support[1] (USO@1d)",
"priority": 100,
"purpose": "stop_loss",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "crossed_above",
"right": {
"rank": 1,
"type": "support_level"
}
}
],
"enabled": true,
"id": "exit_3_xle",
"name": "SL: Below Support[1] (XLE@1d)",
"priority": 101,
"purpose": "stop_loss",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "less_than",
"right": {
"chart_ref": {
"symbol": "USO",
"timeframe": "1d"
},
"ratio": 786,
"type": "fibonacci_retracement"
}
}
],
"enabled": true,
"id": "exit_4_uso",
"name": "SL: Fib Retracement 78.6% (USO@1d)",
"priority": 101,
"purpose": "stop_loss",
"target_symbol": "USO"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "close",
"type": "price"
},
"operator": "less_than",
"right": {
"chart_ref": {
"symbol": "XLE",
"timeframe": "1d"
},
"ratio": 786,
"type": "fibonacci_retracement"
}
}
],
"enabled": true,
"id": "exit_4_xle",
"name": "SL: Fib Retracement 78.6% (XLE@1d)",
"priority": 102,
"purpose": "stop_loss",
"target_symbol": "XLE"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "unrealized_pnl_percent",
"type": "position"
},
"operator": "less_than_or_equal",
"right": {
"type": "constant",
"value": -2
}
}
],
"enabled": true,
"id": "exit_5",
"name": "Stop Loss at 2.0%",
"priority": 100,
"purpose": "stop_loss"
},
{
"applies_to": "both",
"conditions": [
{
"left": {
"field": "unrealized_pnl_percent",
"type": "position"
},
"operator": "greater_than_or_equal",
"right": {
"type": "constant",
"value": 4
}
}
],
"enabled": true,
"id": "exit_6",
"name": "Take Profit at 4.0%",
"priority": 100,
"purpose": "take_profit"
}
],
"position_sizing": {
"max_position_percent": 25,
"method": {
"fib_stop_ratio": 786,
"risk_percent": 2,
"type": "fixed_risk"
},
"min_position_value": 100
},
"trigger_timeframe": "1d",
"version": 1
}Strategy instructions
Trading agent generated from recommendation idea 'Iran threats put global oil supply at risk while reserves hit danger zone — ride the energy price spike'. Thesis: The price of oil spikes whenever there is a threat to the world's oil supply, like the current conflict near Iran. Right now the situation is extra risky because experts say global backup supplies have been drained so much that an actual disruption could send prices soaring to $135 a barrel. By buying oil-related funds while the news is breaking, you position yourself to profit if those fears push prices even higher in the coming days. It's a fast-moving situation, so this is a short-term trade rather than a long-term hold.
Performance
No trade count, win rate, or realized P&L figures are provided in this public preview. The thesis and shared rules do not establish a performance record.
What this public preview can establish
- The thesis and strategy approach describe a market view. They do not show whether an entry or exit condition is currently met.
- Technical strategy fields are shared above. Inspect the actual conditions and check when they were evaluated before relying on them.
- No trade count, win rate, or P&L figure is published in this preview. It cannot establish a performance record.
Explore
How CommonQuant researches and tests strategies · Public paper-trading record and its limits · Discover public strategies