Re: Something interesting from Chatgpt/AI please post here

661
Pelle wrote: Tue Sep 29, 2026 6:01 pm Here is the sources code...
Be aware that the indicator (Buyers_Sellers_Profile_Dynamic_SR) is extremely heavy on the CPU due to the 600-bar calculation for the volume profile. Looping through 600 candles on every single tick will definitely cause the platform to freeze and lag. To fix this, the code must be optimized using the 'is_new_bar' logic, so it only calculates the 600 bars once per closed candle rather than on every tick.

Re: Something interesting from Chatgpt/AI please post here

662
hassan5041 wrote: Wed Sep 30, 2026 7:02 am Be aware that the indicator (Buyers_Sellers_Profile_Dynamic_SR) is extremely heavy on the CPU due to the 600-bar calculation for the volume profile. Looping through 600 candles on every single tick will definitely cause the platform to freeze and lag. To fix this, the code must be optimized using the 'is_new_bar' logic, so it only calculates the 600 bars once per closed candle rather than on every tick.
The source code was requested, but when hassan5041 "asked" for optimization, no one "helped." The source code has now been downloaded 61 times.
### 🛠️ What Was Fixed & Improved in This Release

#### 1. Visual Fidelity & Marker Sizing (1:1 TradingView Match)
* **Concentric Glow Orbs**: Scaled up the layered pivot ring sizes (up to 30pt) to reproduce the rich, glowing, two-tone bullseye orb effect seen in TradingView rather than tiny pixel specks.
* **Crisp Score Badges**: Central score digits inside the markers and right-edge score anchors now use sharp, bold fonts (`Arial Bold`) with high contrast against both dark and light chart themes.

#### 2. Strict Pivot Detection Logic Fix (`ta.pivothigh` / `ta.pivotlow`)
* Corrected the left/right tie-breaking conditions in `IsPivotHigh` and `IsPivotLow` to match Pine Script’s exact built-in behavior (strict left vs. inclusive right). This ensures that historical levels (like high-timeframe structural swing highs/lows) are captured and tracked without false rejections.

#### 3. High CPU Load & Performance Optimization (Smooth 60+ FPS)
* **Smart Redraw Throttling (`InpRedrawMs`)**: On high-tick instruments (e.g., BTCUSD, Gold, EURUSD), MT5 can receive 50–100 ticks per second. Redrawing 150+ graphic objects on every tick was causing high CPU spikes. Added an intelligent redraw rate limiter (default: `200 ms` / 5 FPS for intra-bar updates) while closed bars are still processed **instantly**. This reduces CPU usage by **over 95%** with zero perceptible visual delay.
* **Drawing Object Caching**: Static properties (fill, style, tooltips) are now set only once upon object creation instead of being continuously re-applied on every tick.
* **Profile Math Optimization**: Replaced inner-loop divisions with reciprocal multiplication and fast-skipped zero-volume bars to optimize rolling profile calculations.

#### 4. Dynamic Theme Adaptation
* Added `OnChartEvent` handler (`CHARTEVENT_CHART_CHANGE`) so that transparency blending and colors automatically adapt instantly whenever you change the chart background or color scheme (Dark / Light mode).

---

### ⚙️ Main Input Parameters
* **Lookback (`profLb`)**: Number of historical bars used by the rolling volume profile (default: `600`).
* **Rows (`profRows`)**: Price row discretization for the profile (default: `72`).
* **Swing Length (`swingLen`)**: Pivot left/right confirmation length (default: `5`).
* **Min Score (`scoreMin`)**: Minimum 0–100 composite score required to activate a level (default: `30.0`).
* **Max Levels (`maxLvl`)**: Maximum concurrent active levels on chart (default: `20`).
* **Redraw Rate Limit (`InpRedrawMs`)**: Minimum milliseconds between intra-bar graphic updates (default: `200` ms, set `0` for raw tick-by-tick).
* **Volume Source (`InpVolSrc`)**: Switch between `Tick Volume` (Forex/CFDs) and `Real Volume` (Exchange-traded stocks/futures/crypto).
These users thanked the author Pelle for the post (total 4):
hassan5041, AlainP, Shink, srinarayani13

DownloadRe: Something interesting from Chatgpt/AI please post here

664
Pelle wrote: Wed Sep 30, 2026 11:33 pm The source code was requested, but when hassan5041 "asked" for optimization, no one "helped." The source code has now been downloaded 61 times.
b_s.png
I hope you accept this new modification from me — I actually believe this will be the final update for this indicator!

Just wanted to drop a sick update I just baked into the Buyers_Sellers_Profile_Dynamic_SR indicator: Low Volume Node (LVN) Zones.

Normally, everyone just stares at the POC and High Volume Nodes (HVNs) — you know, those heavy areas where price just gets stuck, ranges, and chops everyone up. But the real magic happens in the empty spaces in between. That's exactly where price just flies.

What's the deal with these LVN Zones?
The indicator now automatically finds volume "valleys" (areas with zero historical trading interest) and paints them as shaded boxes on your chart (Green for Support, Red for Resistance).

The "Abandoned Checkpoint" Concept:
Think of standard S/R lines (HVNs) like a heavily guarded checkpoint. Price HAS to slow down, negotiate, and take its time to pass through because of all the stacked limit orders.

But these new shaded LVN zones? They are like abandoned checkpoints. No guards, no limit orders, no traffic. When price gets there, you usually see one of two things:

1. The Quick Reject (Wick City):
Price pokes its head into the zone, sees there’s no liquidity to grab, freaks out, and snaps right back. Perfect for quick bounce scalps.

2. The Vacuum (Full Send):
If a candle pushes into the zone with some serious momentum/delta, there are no limit orders to absorb the hit. Price acts like it’s in a vacuum and will slice straight through the entire zone to the next HVN level in minutes. Easiest breakout trades you'll ever catch.

Pro Tip for your SL:
Stop putting your Stop Loss in random places. Hide it just behind an LVN zone. The market makers would have to spend a lot of money to push through a "rejection zone" just to hunt your stop.

The solid lines show you where the traffic jam is. The shaded zones show you the open highway.

Oh, and one last thing: If you feel like your chart is getting too cluttered or you just want to stick to the classic look, no sweat. I added a simple On/Off toggle in the settings so you can completely disable the LVN zones whenever you want.
These users thanked the author hassan5041 for the post:
Pelle

Re: Something interesting from Chatgpt/AI please post here

665
hassan5041 wrote: Sat Oct 03, 2026 11:35 pm I hope you accept this new modification from me — I actually believe this will be the final update for this indicator!

Just wanted to drop a sick update I just baked into the Buyers_Sellers_Profile_Dynamic_SR indicator: Low Volume Node (LVN) Zones.

Normally, everyone just stares at the POC and High Volume Nodes (HVNs) — you know, those heavy areas where price just gets stuck, ranges, and chops everyone up. But the real magic happens in the empty spaces in between. That's exactly where price just flies.

What's the deal with these LVN Zones?
The indicator now automatically finds volume "valleys" (areas with zero historical trading interest) and paints them as shaded boxes on your chart (Green for Support, Red for Resistance).

The "Abandoned Checkpoint" Concept:
Think of standard S/R lines (HVNs) like a heavily guarded checkpoint. Price HAS to slow down, negotiate, and take its time to pass through because of all the stacked limit orders.

But these new shaded LVN zones? They are like abandoned checkpoints. No guards, no limit orders, no traffic. When price gets there, you usually see one of two things:

1. The Quick Reject (Wick City):
Price pokes its head into the zone, sees there’s no liquidity to grab, freaks out, and snaps right back. Perfect for quick bounce scalps.

2. The Vacuum (Full Send):
If a candle pushes into the zone with some serious momentum/delta, there are no limit orders to absorb the hit. Price acts like it’s in a vacuum and will slice straight through the entire zone to the next HVN level in minutes. Easiest breakout trades you'll ever catch.

Pro Tip for your SL:
Stop putting your Stop Loss in random places. Hide it just behind an LVN zone. The market makers would have to spend a lot of money to push through a "rejection zone" just to hunt your stop.

The solid lines show you where the traffic jam is. The shaded zones show you the open highway.

Oh, and one last thing: If you feel like your chart is getting too cluttered or you just want to stick to the classic look, no sweat. I added a simple On/Off toggle in the settings so you can completely disable the LVN zones whenever you want.
"Oh, and one last thing: If you feel like your chart is getting too cluttered"
I was too lazy to put each indicator on its own chart, so I put three indicators on the same chart. Sorry about that.

Good Post Thank You

Re: Something interesting from Chatgpt/AI please post here

666
Pelle wrote: Sat Oct 03, 2026 11:51 pm "Oh, and one last thing: If you feel like your chart is getting too cluttered"
I was too lazy to put each indicator on its own chart, so I put three indicators on the same chart. Sorry about that.
"Not at all, having them together is actually great! Really appreciate your work, thank you."
These users thanked the author hassan5041 for the post:
Pelle