Some interesting reading https://ml-site.cdn-apple.com/papers/the-illusion-of-thinking.pdf
Mr. Tomasz and all, just sharing my experience.
The Paradigmatic Integration of Artificial Intelligence in Technical Analysis
Breakouts: The Quest for Optimal Ranking Methodologies
Technical analysts perpetually pursue breakouts with unwavering dedication. While the fundamental definition remains elegantly simple—a security's price movement beyond significant support or resistance levels accompanied by amplified volume, signifying a potential paradigm shift in market sentiment and the inception of a nascent price trajectory—the practical application proves considerably more intricate.
The ostensible simplicity of technical analysis and breakout identification belies the complexities inherent in real-world market dynamics.
When juxtaposing two equities under identical conditions, I encountered a compelling dilemma: Stock A successively surmounted its 5, 20, 50, and 100-day pinnacles in rapid succession, while Stock B breached its quinquennial apex. This scenario precipitated a profound analytical conundrum regarding which security demonstrated superior strength based solely on this singular parameter.
Conventional wisdom would intuitively suggest that the security transcending its five-year zenith would exhibit greater robustness and constitute the superior investment choice. However, the cacophonous digital landscape—encompassing Twitter, Facebook, and Telegram—remains saturated with theoretical frameworks for breakout identification and speculative chart analyses, yet conspicuously lacks comprehensive guidance for developing sophisticated scanning mechanisms and establishing hierarchical rankings to discern optimal opportunities.
Through my proprietary scanning system, I serendipitously identified NACLIND on March 17th, 2025, where it achieved the paramount ranking. My subsequent market entry at approximately ₹100 the following day resulted in one of the year's most spectacular returns. Similarly, SML Isuzu materialized in my scanner, though I was unable to capitalize on that particular opportunity.
These instances became invaluable case studies for further exploration and systematic development, enabling me to identify the subtle nuances characterizing the genesis of significant market movements.
My perpetual objective involves establishing quantitative rankings and scoring methodologies to construct a robust trading framework. My system elucidates the temporal periods during which securities achieve breakout status.
In NACLIND's remarkable trajectory:
- March 11th: Surpassed its single-day high
- March 12th: Breached its annual peak
- March 13th: Transcended its 1.7-year apex
- March 17th: Obliterated its 7.9-year high, ascending from ₹67 to ₹110
My preliminary scoring algorithm was admittedly rudimentary:
- Breakouts exceeding five years: 100 points
- Breakouts spanning 3-5 years: 75 points
- Breakouts covering 2-3 years: 50 points
- Breakouts encompassing 1-2 years: 25 points
- All others: 0 points
This methodology felt fundamentally flawed, prompting me to consult artificial intelligence for enhanced perspective.
The AI's response proved remarkably insightful, identifying this phenomenon as a Multi-Timeframe Breakout —an extraordinarily potent technical analysis concept. The sequential breach of progressively extended temporal highs indicates exceptional momentum and complete absence of overhead supply resistance.
However, one particular calculation in the proposed AmiBroker code intrigued me:
PointsAwarded = sqrt(HighestPeriodBrokenThisBar) * 2;
This square root implementation prompted my subsequent inquiry regarding its mathematical rationale and underlying significance in the scoring methodology.
AI’s Reply to the square root implementation:
Excellent question. This is the most critical part of designing a scoring system: how to weight different events .
Using the square root (sqrt) is a specific, and very common, technique in quantitative analysis. Here’s the breakdown of why it's used here instead of a linear function.
The Problem with Linear Weighting
A linear scoring system would be something like:
PointsAwarded = HighestPeriodBrokenThisBar * 2;
This seems logical at first glance: breaking a 252-day high gives you 252 points, and breaking a 5-day high gives you 5 points.
However, this has a massive problem: it's unfairly biased towards longer timeframes.
The difference between a 1000-day high and a 1500-day high is not the same as the difference between a 5-day high and a 505-day high. The significance of a new high doesn't scale linearly. A 1500-day high is not 300 times more important than a 5-day high. A linear system would completely drown out any signal from shorter-term breakouts, making the score dominated by a single recent event.
The Psychology and Mathematics of the Square Root
The square root function (sqrt(x)) is a powerful tool to create a diminishing returns effect.
- It acknowledges that longer periods are more significant, but in a balanced way.
- It prevents the very long periods from completely dominating the score.
Let's look at the points awarded for key levels using sqrt (Period) * 2:
| Period Broken | Interpretation | Points Awarded (sqrt (Period)*2) |
|---|---|---|
| 1 | 1-Day High | sqrt (1)*2 = 2 |
| 5 | 1-Week High | ~2.23*2 ≈ 4.5 |
| 20 | 1-Month High | ~4.47*2 ≈ 8.9 |
| 50 | ~2-Month High | ~7.07*2 ≈ 14.1 |
| 100 | ~6-Month High | 10*2 = 20 |
| 252 | 1-Year High | ~15.87*2 ≈ 31.8 |
| 500 | ~2-Year High | ~22.36*2 ≈ 44.7 |
| 1000 | ~4-Year High | ~31.62*2 ≈ 63.2 |
| 2000 | ~8-Year High | ~44.72*2 ≈ 89.4 |
Why This is a Brilliant Solution for Your Strategy
- It Values the Sequence: The system now highly rewards a stock that chains together several breakouts.
- Example: A stock that breaks its 5, 20, 50, and 100-day highs in quick succession would score: 4.5 + 8.9 + 14.1 + 20 = 47.5
- This score of 47.5 is significant. It's higher than a stock that only breaks a 500-day high (44.7) and then does nothing else. This correctly identifies the stock with accelerating, sequential momentum (like NACL) as more interesting than a stock that just had a one-off spike.
- It Balances Significance: The difference between a 1000-day high (63 pts) and a 2000-day high (89 pts) is about 26 points. This is a meaningful jump that reflects the major significance of a new all-time high, but it doesn't make the 1000-day high seem irrelevant by comparison.
- It Creates a Actionable Gradient: The scores will range from single digits (just small breakouts) to ~90 (breaking multi-decade highs). This gives you a beautiful gradient to sort on. You can set filters like:
- Score > 20: Showing stocks breaking at least 100-day highs. Interesting.
- Score > 50: Showing stocks breaking into ~2-4-year highs. Very interesting.
- `Score > 75**: Showing stocks making near-all-time-high breakouts with momentum. Extremely interesting.
In short, the square root transforms the raw lookback period into a measure of "significance" or "impact" rather than just "time." It perfectly captures the market psychology that each new level of breakout is a bigger deal than the last, but the relative difference between higher levels gets smaller.
You can experiment with other functions (like log(Period) or Period^0.4), but sqrt is a great, standard starting point for this kind of non-linear weighting.
The Compelling Case for AI-Enhanced Technical Analysis:
This exploration culminates in a profound recognition of the transformative potential inherent in harmonizing artificial intelligence with traditional technical analysis methodologies. The symbiotic relationship between human analytical intuition and AI's computational prowess represents a revolutionary paradigm shift in market analysis. As we advance into an increasingly data-driven financial landscape, the convergence of artificial intelligence with technical analysis represents not merely an enhancement of existing methodologies, but a fundamental reimagining of how we approach market intelligence. The practitioner who embraces this technological symphony positions themselves at the vanguard of analytical sophistication, capable of identifying opportunities with unprecedented precision and efficiency.
The marriage of human intuition with artificial intelligence doesn't replace the trader's judgment—it amplifies it exponentially, creating a formidable analytical arsenal that transforms market analysis from art to science.
It would be easier to search the posts on this forum, if ChatGTP was trained on it. TJ, is this possible?
Forum does not always provide accurate answer. It is better to search the user guide and or knowledge base. You can upload documents to ChatGPT or Gemini and it will use those to provide answer. See my previous response how to do that.
Thanks for your response. I was looking for your post " [ Efficient design of AmiBroker data structures]. It took me a while to find it, hence my question above.
Oh, OK so you would rather have semantic search not really GPT. GPT doesn’t search, GPT generates text. Search is based on different technology, namely paragraph/sentence embedding and it is used to calculate semantic “distance” between paragraph of text and query. It is doable, ut would require writing dedicated specific plug-in for discourse forum. I don’t think it is worthwhile because Google search can search the forum even better (use +site:forum.amibroker.com to limit search to forum only)
you are right, I forgot to google search the forum. Thank for reminding me.
Now this is something nice. I am super enthusiastic about the perspective to improve AmiBroker documentation with the help of AI, especially with regards to graphics.
Take a look, don't you like it?
This is great. I have long looked for the apple core version of most information. Often you get a book but what is really needed is the core of the information. This seems like the apple core version, everything you need without all the extra. Don't get me wrong the extras are important but you need to start somewhere and this looks good to me.
Presentation looks good. Simple enough for new users to understand, but specific enough to spell out some of the features / advantages.
Have you checked RAM prices lately? They are up 180% in three months.
Apparently OpenAI wants to buy 40% of global DRAM output
Plus Micron decided to stop selling DRAM at all to consumers (shutting down "Crucial" brand).
Things are getting ugly for buyers of new hardware. Are we approaching new era of "Hardware as a Service"
and zero privacy (so you can't even own the hardware to run your stuff without 3rd party eyes looking)?
It is looking really bad. The price for "free AI chat" will be our privacy and our intellectual property.



















