Re: Something interesting please post here (Metatrader)

4341
You have tyo play with settings...change that first to false and so on

extern bool UseTrendFilter = true; // Käytä trendisuodatinta
extern int TrendMAPeriod = 50; // Trendi MA periodi
extern bool UseVolumeFilter = true; // Käytä volyymisuodatinta
extern double VolumeMultiplier = 1.5; // Minimi volyymi verrattuna keskiarvoon
extern bool UseRSIFilter = true; // Käytä RSI-suodatinta
extern int RSIPeriod = 14; // RSI periodi
extern int RSIOverbought = 70; // Yliostettu raja
extern int RSIOversold = 30; // Ylimyyty raja
extern bool UseDoubleConfirmation = true; // Vaadi 2 peräkkäistä palkkia
extern bool ShowWeakSignals = false; // Näytä heikot signaalit keltaisella

extern bool AudioAlert = true;
extern bool EmailAlert = false;
extern bool PushAlert = false;
extern bool DrawLine = true; // Piirretäänkö Z-Line

Re: Something interesting please post here (Metatrader)

4342
This indicator looks really awesome (statistical-wise)
https://www.tradingview.com/script/DGGZ ... NN-Engine/

Code: Select all

[i]
Chrono-Decay [KNN Engine]

1. What the Script Does

The Chrono-Decay Engine is an advanced "Time-Based" diagnostic tool designed to measure the temporal health of a trend. Rather than focusing on price magnitude or volume, it specifically analyzes Stagnation—measuring exactly how long it takes for a market to produce new highs or lows relative to historical institutional entry points.

Furthermore, it introduces a built-in K-Nearest Neighbors (KNN) Machine Learning Algorithm to calculate the statistical probability of a trend dying of "old age" based on historical market data.

By tracking 24 simultaneous time-horizons, this engine mathematically flags leading divergences—identifying the exact moment a trend begins to run out of "Time-Fuel" even if price is still grinding higher.

2. The Core Innovation: How it Calculates Everything

Standard time-based indicators (like the Aroon oscillator) rely on fixed lookback periods (e.g., 25 bars). This forces the indicator to constantly drop relevant historical data. This script is fundamentally original because it abandons fixed lookbacks in favor of Anomaly Anchoring, Derivative Calculus (
D
D/DX
$), and Predictive Classification.

Anomaly Anchoring: The engine constantly scans volume for statistical deviations. When it detects a volume spike exceeding a 2.5 Z-Score, it drops a mathematical "Anchor." It tracks the last 24 of these institutional liquidity events simultaneously.

The 24-Vector Matrix: From each of the 24 anchor points, the script calculates an independent, expanding Aroon oscillator (measuring the percentage of time since the highest high or lowest low for that specific anchor).

The Chrono-Derivative (
D
D/DX
$): The script calculates the average of these 24 time-cycles to find the "Meta-Mean." Crucially, it then calculates the First Derivative (Rate of Change) of this mean, standardizing it into a Z-Score. This maps the exact velocity of the trend's time-dominance.

The K-Nearest Neighbors (KNN) Engine: When the script detects 100% Temporal Consensus (e.g., all 24 cycles are decaying or expanding simultaneously), it captures the exact numerical fingerprint of the market (Decay Velocity, Decay Acceleration, and Price Velocity). The KNN engine calculates the Euclidean Distance between the current fingerprint and the last 300 historical fingerprints. It finds the 5 nearest neighbors (the 5 times history looked mathematically identical) and checks their win/loss results to generate a live probability score.

3. Justifying the Methodology

Why combine 24 anchored Aroon derivatives with a KNN machine learning model? Because trends often die of stagnation before they die of momentum loss.

If price is grinding to new highs, but it is taking progressively longer and longer to reach those highs relative to the last 24 institutional entry points, the trend is decaying. Standard momentum oscillators miss this entirely. By anchoring 24 separate cycles and calculating their derivative, we map the exact speed of this decay. Passing that data through a KNN algorithm allows us to filter out chop by asking the data: "The last 5 times the trend stagnated at this exact velocity, did price successfully reverse by at least 0.1%?"

4. How to Use the Indicator

Visual Layout:

The Signal Histogram: Represents the standardized velocity of the trend's time-dominance.

Blue (Bullish Structure) / Red (Bearish Structure): The base color represents the direction of the trend's temporal gravity.

Bright vs. Dark: Bright bars indicate that the trend is actively expanding its time-dominance. Dark, highly transparent bars indicate the trend is stagnating and decaying back toward equilibrium.

Chrono-Decay Velocity (White Line): The raw, smoothed derivative mapping the physical acceleration of the decay.

The Structural Fan (Ribbons): 24 individual time-decay cycles. These are dynamically capped in height relative to the histogram to prevent visual clutter while showing the internal agreement of the institutional cluster.

Tactical Trade Execution:

Spot the Leading Divergence: Watch for price to make a new high, but for the Signal Histogram to turn dark and crash toward the Zero Line. This indicates the trend is rapidly taking too long to maintain its trajectory. Do not enter yet.

Wait for the Machine Learning Confirmation: Wait for the background to flash Lime (Bullish Potential) or Red (Bearish Potential) with a printed percentage (e.g., 80%). This means the KNN algorithm has verified that identical historical stagnation setups successfully reversed price.

The Trigger: Look for the Exhaustion Star (✧) on the Chrono-Decay Velocity line, or wait for the white line to roll over and re-envelop the histogram cluster. This confirms the mechanical transition from "Stagnation" into an active mean-reversion pull.[/i]

but i'm not sure how to use it lol

Jeff
These users thanked the author ionone for the post:
moey_dw
Scalping the Century TimeFrame since 1999

Re: Something interesting please post here (Metatrader)

4343
ionone wrote: Thu Mar 26, 2026 8:38 pm This indicator looks really awesome (statistical-wise)
https://www.tradingview.com/script/DGGZ ... NN-Engine/

Code: Select all

[i]
Chrono-Decay [KNN Engine]

1. What the Script Does

The Chrono-Decay Engine is an advanced "Time-Based" diagnostic tool designed to measure the temporal health of a trend. Rather than focusing on price magnitude or volume, it specifically analyzes Stagnation—measuring exactly how long it takes for a market to produce new highs or lows relative to historical institutional entry points.

Furthermore, it introduces a built-in K-Nearest Neighbors (KNN) Machine Learning Algorithm to calculate the statistical probability of a trend dying of "old age" based on historical market data.

By tracking 24 simultaneous time-horizons, this engine mathematically flags leading divergences—identifying the exact moment a trend begins to run out of "Time-Fuel" even if price is still grinding higher.

2. The Core Innovation: How it Calculates Everything

Standard time-based indicators (like the Aroon oscillator) rely on fixed lookback periods (e.g., 25 bars). This forces the indicator to constantly drop relevant historical data. This script is fundamentally original because it abandons fixed lookbacks in favor of Anomaly Anchoring, Derivative Calculus (
D
D/DX
$), and Predictive Classification.

Anomaly Anchoring: The engine constantly scans volume for statistical deviations. When it detects a volume spike exceeding a 2.5 Z-Score, it drops a mathematical "Anchor." It tracks the last 24 of these institutional liquidity events simultaneously.

The 24-Vector Matrix: From each of the 24 anchor points, the script calculates an independent, expanding Aroon oscillator (measuring the percentage of time since the highest high or lowest low for that specific anchor).

The Chrono-Derivative (
D
D/DX
$): The script calculates the average of these 24 time-cycles to find the "Meta-Mean." Crucially, it then calculates the First Derivative (Rate of Change) of this mean, standardizing it into a Z-Score. This maps the exact velocity of the trend's time-dominance.

The K-Nearest Neighbors (KNN) Engine: When the script detects 100% Temporal Consensus (e.g., all 24 cycles are decaying or expanding simultaneously), it captures the exact numerical fingerprint of the market (Decay Velocity, Decay Acceleration, and Price Velocity). The KNN engine calculates the Euclidean Distance between the current fingerprint and the last 300 historical fingerprints. It finds the 5 nearest neighbors (the 5 times history looked mathematically identical) and checks their win/loss results to generate a live probability score.

3. Justifying the Methodology

Why combine 24 anchored Aroon derivatives with a KNN machine learning model? Because trends often die of stagnation before they die of momentum loss.

If price is grinding to new highs, but it is taking progressively longer and longer to reach those highs relative to the last 24 institutional entry points, the trend is decaying. Standard momentum oscillators miss this entirely. By anchoring 24 separate cycles and calculating their derivative, we map the exact speed of this decay. Passing that data through a KNN algorithm allows us to filter out chop by asking the data: "The last 5 times the trend stagnated at this exact velocity, did price successfully reverse by at least 0.1%?"

4. How to Use the Indicator

Visual Layout:

The Signal Histogram: Represents the standardized velocity of the trend's time-dominance.

Blue (Bullish Structure) / Red (Bearish Structure): The base color represents the direction of the trend's temporal gravity.

Bright vs. Dark: Bright bars indicate that the trend is actively expanding its time-dominance. Dark, highly transparent bars indicate the trend is stagnating and decaying back toward equilibrium.

Chrono-Decay Velocity (White Line): The raw, smoothed derivative mapping the physical acceleration of the decay.

The Structural Fan (Ribbons): 24 individual time-decay cycles. These are dynamically capped in height relative to the histogram to prevent visual clutter while showing the internal agreement of the institutional cluster.

Tactical Trade Execution:

Spot the Leading Divergence: Watch for price to make a new high, but for the Signal Histogram to turn dark and crash toward the Zero Line. This indicates the trend is rapidly taking too long to maintain its trajectory. Do not enter yet.

Wait for the Machine Learning Confirmation: Wait for the background to flash Lime (Bullish Potential) or Red (Bearish Potential) with a printed percentage (e.g., 80%). This means the KNN algorithm has verified that identical historical stagnation setups successfully reversed price.

The Trigger: Look for the Exhaustion Star (✧) on the Chrono-Decay Velocity line, or wait for the white line to roll over and re-envelop the histogram cluster. This confirms the mechanical transition from "Stagnation" into an active mean-reversion pull.[/i]

but i'm not sure how to use it lol

screenshot.1642.jpg


Jeff
Could be ok............ looks noisy af but
Official Forex-station GIF animator at your service 👨‍⚖️
The best divergence indicator in the world.

Re: Something interesting please post here (Metatrader)

4347
In the Lord of the Rings, there was a Ring that was more important than Sauron's Ring.

The Ring of Omnipotence is the main artifact of the Lord of the Rings. Through him, the Dark Lord Sauron subdued the minds of those who wore the rest of the Rings of Power. To mortals-Isildur, Bilbo, and Frodo Baggins-it granted invisibility. And the Ring was also a source of monstrous temptation: it penetrated the thoughts of others, groped their innermost desires and through them pushed to evil.

But the main thing is that the Ring was directly related to the power of Sauron. He had put some of his immortal spirit into it, and as long as the Ring existed, it was impossible to completely defeat Sauron. His physical shell was destroyed more than once, but each time Sauron acquired a new body and continued his conquests.

At the Council of Elrond, it was decided that the Ring must be destroyed, because this is the only way to put an end to Sauron's rule. Thanks to the efforts of the Brotherhood and other free peoples of Middle-earth - as well as the unwitting sacrifice of Gollum - the Ring of Omnipotence was melted in the fire of Mount Doom, and the Dark Lord lost his powers.

The ring has long been an icon of pop culture - especially in the form in which it was shown by Peter Jackson in the film adaptations of "The Lord of the Rings" and "The Hobbit". But in the depths of Tolkien's legendarium lies another, much more powerful "Ring". It did not belong to Sauron, but to his lord, Morgoth, the first Dark Lord.

Throughout the 1980s and 1990s, Tolkien's son Christopher compiled his father's unpublished texts about Middle-Earth into a series of twelve volumes collectively titled The History of Middle-Earth. The tenth volume was called The Ring of Morgoth. The book touched on several topics, but the one that gave it its name revealed the dark truth about the world of the Lord of the Rings.

Morgoth had no magic ring-the Rings of Power were entirely Sauron's invention, and he had forged them long after his master's defeat in the War of Wrath. Christopher borrowed the title from a metaphor his father used in the essay "Notes on Motifs in the Silmarillion."

In it, Tolkien wrote: "The whole of Middle-earth was the Ring of Morgoth."

Morgoth ruined the world of the Lord of the Rings forever

The idea of Middle-earth as the Ring of Morgoth goes back to the very foundations of Tolkien's world, described in The Silmarillion. The supreme being in this myth was Eru Iluvatar, the omniscient and omnipotent creator. To create the universe, he gave birth to the Ainur, divine spirits who participated in this plan through Great Music. Morgoth, originally named Melkor, was one of them.

But Melkor was driven by pride and a thirst for power. Instead of following Iluvatar's plan, he sought to remake the world according to his own will, distorting it to suit himself. He put some of his essence into Arda, the world of which Middle-earth was a part. Just as Sauron would later imbue the One Ring with his own malice, Morgoth would imbue the entire world with it.

Through this image, Tolkien answers one of the oldest questions in his own way: if the world was created by a good Creator, where does evil come from? In his legendarium, Morgoth becomes the source of this evil. It is his malice that defiles the originally perfect world.

Among the creatures of Morgoth were monsters that inhabited the dark corners of Middle-earth, devastating frosts, storms and other disasters that ravaged the earth. But perhaps his most terrifying act was something else: he instilled in mortals the fear of death. Iluvatar called death the Gift of men, because the opportunity to leave Arda was conceived as a special privilege not available to elves. However, Morgoth perverted her very nature, turning her into a source of terror.

It was the fear of death that caused some of the greatest catastrophes in Tolkien's world. The most famous example is the campaign of the Numenorians to the Immortal Lands in search of eternal life, which eventually led to the Fall of Numenor.

Because of the corruption of Morgoth, the elves called the world Arda the Distorted One. Beauty still had a place in it, but with it, evil lived in the very fabric of the world, surviving even the fall of Morgoth.

Morgoth was alive during the events of The Lord of the Rings

Just as Sauron could not be completely destroyed as long as the One Ring existed, Morgoth could not be destroyed as long as the world itself existed. In the War of Wrath, he lost and received many wounds, but did not die. The Valar bound him with a chain made from the fragments of his own Iron Crown, and banished him far beyond the borders of Arda.

In the Silmarillion, in the chapter "On the Voyage of Earendil and the War of Wrath," Tolkien writes:

"[Morgoth] was cast beyond the Gates of Night, beyond the Walls of the World, into a timeless Void; and guards stand forever on those walls, and Earendil keeps watch on the ramparts of heaven. But the lies that Melkor, the mighty and cursed, Morgoth Bauglir, the power of Terror and Hatred, sowed in the hearts of elves and men, is a seed that does not die and cannot be destroyed; over and over again it sprouts and will bear dark fruits until the very last days."
Morgoth remained in the Void for countless ages. During the time of The Hobbit, The Lord of the Rings, and for a long time after that, he continued to exist - in rage, in hatred, waiting for the opportunity to escape and return to Middle-earth.

According to the prophecies, he was supposed to have such a chance in the distant future of Tolkien's world. The Silmarillion and some other texts mention Dagor Dagorath, the Last Battle, or the Battle of All Battles. It was believed that on this day Morgoth would break out of the Void. Many great heroes will return from the dead to fight against him or on his side. And in the end, Morgoth will fall by the hand of a man named Turin Turambar.

This time, his defeat was to be final: Iluvatar would destroy the "Ring of Morgoth" itself-that is, the world in its distorted, defiled form.

The demise of the "Lord of the Rings" world was predicted

After Dagor Dagorath, according to the prophecy, Iluvatar will lead the Ainur again in the great song-and this time they will be joined by mortal men. Their common singing will create a new world. No longer affected by the taint of Morgoth, he will become perfect. The old Arda will come to an end, and Morgoth himself will disappear with it.

The elves did not call this future world Arda the Distorted, but Arda the Healed. Within Tolkien's world itself, of course, no one could know for sure whether Dagor Dagorath and the new creation of Arda would come true. But the belief in it was widespread. Even Thorin Oakenshield talks about it before he dies in the book "The Hobbit". He addresses Bilbo with the words: "I am now going to the waiting halls to sit next to the fathers until the world is renewed."

Although the Lord of the Rings does not explicitly state that Arda is Morgoth's Ring, this idea is very important for understanding the plot. The corruption of Morgoth originally distorted the very nature of the world, and therefore evil has always had a foothold in it. In this sense, it was as if the world itself had helped Sauron during the War of the Ring. Even episodes such as the blizzard that stopped the Brotherhood at the Karadras Pass can be seen as an echo of the will of Morgoth, spilled into the very fabric of Arda.

In addition, Sauron inherited many of his master's creations, most notably the orcs, which became the basis of his vast army. Under Aragorn's rule, the Fourth Age became a time of peace and prosperity, and the free peoples of Middle-earth had a chance to recover from the War of the Ring. But in a world where Arda remains Morgoth's Ring, such peace cannot be eternal.

As long as he retains even a fraction of Morgoth's spirit, Tolkien's universe is doomed to face darkness, turmoil, and destruction over and over again.
These users thanked the author andrei-1 for the post:
ashdays

Re: Something interesting please post here (Metatrader)

4350
talaate wrote: Sun Mar 29, 2026 5:38 pm it is really very good one, would you add the set of alerts, thanks
i dont see the point in adding alerts because the indicator works from bars close so because the bar is still forming it could change from positive to negative or negative to positive 🤷‍♂️, but anyway i added ex4 instead of source/mq4 here it is feel free to do it if you like 👌🏽
These users thanked the author almostprofitable101 for the post (total 2):
talaate, FXchaos