Tool
Premium / Discount (SMC)
interpretor.premium_discount
Inputs
One impulse leg (a zigzag leg bundle from market.zigzag or market.fibonacci_anchor) that defines the dealing range from start to extreme — the same leg that feeds calc.fibonacci_ote.
Outputs
A bundle of {valid, gate, depth, zone}: gate is the yes/no for the chosen mode, depth is a 0-1 confidence (deeper in zone = higher) you can feed an order, and zone is the premium / equilibrium / discount label.
Tells you where price sits inside a dealing range: the premium half (the upper, expensive 'sell' zone), the discount half (the lower, cheap 'buy' zone), or near equilibrium in the middle. The SMC idea is to buy in discount and sell in premium rather than chasing price at the wrong end of a move.
How it works
It locates the chosen source price within the leg from start to extreme and outputs a bundle of {valid, gate, depth, zone}: gate is a yes/no for the chosen mode, depth is a 0-1 confidence you can feed into an order, and zone is the premium/equilibrium/discount label. The mode picks what gate tests — location gates like in_discount, in_premium, at_equilibrium and in_ote, the is_discount/is_premium aliases, or zone_is to match required_zone — while the OTE band, equilibrium deadband and price source are set by ote_near, ote_far, eq_deadband and source.
Modes
Mode options
Gate is true while the source price sits in the lower (discount) half of the dealing range — the cheap zone to buy.
When to use: Only allow long entries in the cheap half of the range.
Gate is true while the source price sits in the upper (premium) half of the dealing range — the expensive zone to sell.
When to use: Only allow short entries in the expensive half of the range.
Gate is true while price is near the 50% midpoint of the range, inside the equilibrium deadband set by eq_deadband.
When to use: Detect a balanced, fair-value zone where you may want to wait.
Gate is true while price sits inside the Optimal Trade Entry band — the sweet-spot retracement between ote_near and ote_far (defaults 61.8% to 78.6%).
When to use: Time entries to the classic OTE retracement window of the leg.
Alias of in_discount: gate is true while the source price is in the discount half of the range.
When to use: Use the friendlier alias name when reading the discount half.
Alias of in_premium: gate is true while the source price is in the premium half of the range.
When to use: Use the friendlier alias name when reading the premium half.
Gate is true when the labelled zone equals required_zone (premium, equilibrium or discount).
When to use: Match an exact zone, including equilibrium, in one mode.
Source options
Locate the bar's open price inside the dealing range.
When to use: Use open when that price best represents your entry.
Locate the bar's high price inside the dealing range.
When to use: Use high to test the most extreme reach of the bar.
Locate the bar's low price inside the dealing range.
When to use: Use low to test the deepest dip of the bar.
Locate the bar's close price inside the dealing range — the usual, most robust choice.
When to use: Use close for confirmed, non-repainting location reads.
Locate the bar's median price (high + low) / 2 inside the dealing range.
When to use: Smooth out the read using the bar's midpoint.
Locate the bar's typical price (high + low + close) / 3 inside the dealing range.
When to use: Weight the read toward the close while including the range.
Locate the bar's average price (open + high + low + close) / 4 inside the dealing range.
When to use: Use the fullest, most balanced single price per bar.
Required zone options
In zone_is mode, match the premium (upper, expensive) half of the dealing range.
When to use: Gate exactly on price being in premium.
In zone_is mode, match the equilibrium band around the 50% midpoint of the range.
When to use: Gate exactly on price being at fair value.
In zone_is mode, match the discount (lower, cheap) half of the dealing range.
When to use: Gate exactly on price being in discount.
Configuration
Which premium/discount condition the gate tests: location gates in_discount / in_premium / at_equilibrium / in_ote, the is_discount / is_premium aliases, or zone_is to match required_zone (depth and zone are emitted no matter what).
Which price to locate inside the dealing range (open, high, low, close, hl2, hlc3 or ohlc4); used by the location-gate modes.
The zone to match in zone_is mode: premium, equilibrium or discount.
The near edge of the Optimal Trade Entry band, as a percent retracement of the leg (default 61.8, matching calc.fibonacci_ote). Used in in_ote mode.
The far edge of the OTE band as a percent (default 78.6, matching calc.fibonacci_ote). Used in in_ote mode.
A neutral band around equilibrium (as a percent of the leg) that reads as 'equilibrium' instead of premium or discount; 0 disables it.
Connects to
Examples
- Filter: only allow long entries when mode is in_discount so you buy in the cheap half of the range.
- Feed the bundle's depth output into an order's confidence so trades deeper in discount get sized more aggressively.
Common mistakes
- Trading premium/discount without checking the trend first — buying discount in a strong downtrend just catches a falling knife.
- Picking a stale or wrong leg as the dealing range, which shifts the equilibrium and mislabels every zone.