Allah's Compass — Strategy by mpio222

By mpio222

Performance Metrics

Description

This strategy trades bullish divergence setups using the Bollinger Band %B indicator (BB%) as its primary signal. Rather than trading price action directly, it reads momentum through the position of price relative to the Bollinger Bands, entering when oversold conditions show signs of reversal and exiting when price reaches the upper extreme.Entry LogicThe strategy enters on a bullish divergence — when price makes a lower low but BB% makes a higher low, signaling that downside momentum is weakening while price is still falling. This divergence must occur while BB% is in oversold territory, filtered by an adjustable ceiling threshold. A second divergence while already in a trade triggers a scaled add-on position using a configurable multiplier. A third add-on fires when BB% crosses back above zero, confirming the bounce is underway.Failed Run Double-DownIf BB% runs up after entry but fails to reach the exit threshold, then pulls back with price making a new low and a fresh divergence forming, the strategy adds to the position again using a separate multiplier. This targets the scenario where the first recovery attempt stalls and resets before a stronger move.Exit LogicAll positions are closed when BB% reaches the configurable exit threshold, defaulting to 1.0 which represents price touching the upper Bollinger Band. A percentage-based stop loss is set at each entry and updated to the lowest stop across all add-on entries.Inputs SummaryBB length, standard deviation multiplier, stop loss percentage, divergence lookback period, divergence BB% ceiling, double-down multiplier, failed run multiplier, green cross add-on toggle, and exit threshold are all adjustable from the strategy settings panel.Release NotesAllah's Compass — Strategy DescriptionThis strategy uses the Bollinger Band %B indicator (BB%) to identify momentum reversals, entering on strength confirmation and adding on weakness with a scaled recovery position.Entry LogicThe initial buy triggers when BB% crosses above zero, meaning price has moved back inside the lower Bollinger Band and momentum is shifting upward. This is a smaller probe entry with a tight stop loss to keep risk low if the move fails immediately.Divergence Add-OnIf price pulls back while already in the trade and a bullish divergence forms — price making a lower low while BB% makes a higher low — the strategy adds to the position with a multiplied order size configurable in the settings. This larger add-on is designed to recover losses from the first entry being stopped out and capitalize on the stronger divergence signal. A separate wider stop loss is applied to this order to give it room to develop.Stop Loss StructureTwo independent stop loss settings allow fine-tuned risk control. The first entry uses a tight stop to minimize damage if the initial green cross fails. Once the divergence add-on fires, the stop updates to the wider divergence stop, reflecting the higher conviction and larger position size. This two-tier structure is designed to reduce drawdown in downtrending conditions where the first entry gets faked out before the real move begins.Exit LogicAll positions are closed when BB% reaches 1.0, meaning price has reached the upper Bollinger Band. This applies regardless of which entries are active.Adjustable SettingsBB length, standard deviation multiplier, first entry stop loss, divergence add-on stop loss, divergence add-on size multiple, and divergence lookback bars are all configurable from the strategy settings panel.Release NotesAllah's Compass — Strategy DescriptionThis strategy uses the Bollinger Band %B indicator (BB%) to identify momentum reversals, entering on strength confirmation and adding on weakness with a scaled recovery position. Pyramiding is set to 3, allowing up to three entries in the same direction within a single trade.Entry LogicThe initial buy triggers when BB% crosses above zero, meaning price has moved back inside the lower Bollinger Band and momentum is shifting upward. This is a smaller probe entry with a configurable stop loss to keep risk low if the move fails immediately.Divergence Add-OnIf price pulls back while already in the trade and a bullish divergence forms — price making a lower low while BB% makes a higher low — the strategy adds to the position with a multiplied order size configurable in the settings. This larger add-on is designed to recover losses from the first entry and capitalize on the stronger divergence signal. A separate wider stop loss is applied to this order to give it room to develop.Stop Loss StructureTwo independent stop loss settings allow fine-tuned risk control. The first entry uses its own stop to minimize damage if the initial green cross fails. Once the divergence add-on fires, the stop updates to the divergence stop level, reflecting the higher conviction and larger position size. Both stops default to 100% so they are effectively disabled until manually configured. This two-tier structure is designed to reduce drawdown in downtrending conditions where the first entry gets faked out before the real move begins.Exit LogicAll positions are closed when BB% reaches 1.0, meaning price has reached the upper Bollinger Band. This applies regardless of which entries are active.Adjustable SettingsBB length, standard deviation multiplier, first entry stop loss, divergence add-on stop loss, divergence add-on size multiple, divergence lookback bars, and pyramiding depth are all configurable from the strategy settings panel.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView