Re: TradingView Indicators to MT5 Indicators

11
ionone wrote: Wed Jun 17, 2026 9:14 pm Default.
Ultimate Stochastic ADX Exhaustion

The Stochastic ADX Exhaustion is not your typical "tops and bottoms" arrows indicator but a trend exhaustion and momentum recovery tool.

The indicator first waits for the selected Stochastic to reach an extreme level (20/80 by default, or 10/90 when "Tight Levels" are enabled). While the Stochastic is in this extreme zone, it monitors the ADX and records whether trend strength exceeds the specified ADX threshold of 25 by default.

Once a strong trend has been established, the indicator then looks for ADX to begin "falling". After this, it waits for the Stochastic to cross back through the 50 level, indicating that momentum has shifted back toward the opposite side of the market.



Finally found the mistake I made (some variables were global, and I had them local so it couldn't work properly and remember its status from bar to bar)
it's a good indicator visually, might be of some help to you
EDIT : I didn't use AI to convert it !

PS: New, fixed version here

https://www.tradingview.com/script/P7ru ... stion-V17/

These users thanked the author ionone for the post (total 14):
Jimmy, chris006, TransparentTrader, Dimkin, mazibee, ashdays, ManilaSpurs, RodrigoRT7, LIKE, TECHHDATE07, Abdi, JohnL33, saugio15, Chickenspicy
Scalping the Century TimeFrame since 1999

Re: TradingView Indicators to MT5 Indicators

12
ionone wrote: Wed Jun 17, 2026 9:37 pm Ultimate Stochastic ADX Exhaustion
Jeff, what can I say brother. Another career high for you.

This is a very clever indicator. Actually been observing it for a few hours and digging through the code and what a fine code (without AI) you've made, I had to add a bit of info to your post about it due to it being such a good concept (hope you don't mind). I might have a crack at making it for MT4 on the weekend.
These users thanked the author Jimmy for the post (total 7):
Dimkin, ManilaSpurs, ionone, LIKE, RodrigoRT7, JohnL33, Chickenspicy
List of our most powerful reversal indicators | Guide to the "All Averages" Filters (ADXvma, Laguerre etc.)
Using Fibonacci "numbers" for indicator settings 💡
How to draw Fibonacci Extensions easily | The best way to draw Support & Resistance

Re: TradingView Indicators to MT5 Indicators

13
ionone wrote: Wed Jun 17, 2026 9:37 pm Ultimate Stochastic ADX Exhaustion
Hey Jimmy and ionone

I'm not a coder myself, but Claude is convinced there are several bugs in the code that need fixing. Hopefully this makes sense to you.

**Summary of findings:**
- Reviewed the entire MQL5 file and compared it against the embedded Pine Script logic.
- Identified multiple critical bugs, including:
- Look-ahead repainting caused by incorrect `ArrayMinimum` / `ArrayMaximum` logic
- Global scope state corruption on new ticks
- Stochastic buffer index mismatch

Re: TradingView Indicators to MT5 Indicators

14
TECHHDATE07 wrote: Fri Jun 19, 2026 2:14 am Hey Jimmy and ionone

I'm not a coder myself, but Claude is convinced there are several bugs in the code that need fixing. Hopefully this makes sense to you.

**Summary of findings:**
- Reviewed the entire MQL5 file and compared it against the embedded Pine Script logic.
- Identified multiple critical bugs, including:
- Look-ahead repainting caused by incorrect `ArrayMinimum` / `ArrayMaximum` logic
- Global scope state corruption on new ticks
- Stochastic buffer index mismatch
Good pick up, seems to be a bug where Structure filter isn't working.

Code: Select all

visitedOversold
visitedOverbought
adxExceededThreshold
They are Global and not arrays which means they exist during the whole calculation loop.

Look at the Pinescript it used:

Code: Select all

var bool
Which is different.

Interesting and I know Jeff will be onto it this weekend 🙂
List of our most powerful reversal indicators | Guide to the "All Averages" Filters (ADXvma, Laguerre etc.)
Using Fibonacci "numbers" for indicator settings 💡
How to draw Fibonacci Extensions easily | The best way to draw Support & Resistance

Re: TradingView Indicators to MT5 Indicators

15
Jimmy wrote: Sat Jun 20, 2026 12:14 am
They are Global and not arrays which means they exist during the whole calculation loop.
yes they NEED to be global. they need to retain their value from bar to bar, otherwise it isn't working (this was my original bug)

Also I fixed the Structure filter it was a rookie move. and no, there wasn't any lookahead (ChatGPT still thinks MT5 is Series by default lol) the code was just plain wrong.

here is the fix, let me know if other things aren't working
These users thanked the author ionone for the post (total 4):
Jimmy, TECHHDATE07, thomdel, saugio15
Scalping the Century TimeFrame since 1999

Re: TradingView Indicators to MT5 Indicators

16
ionone wrote: Sat Jun 20, 2026 2:13 am yes they NEED to be global. they need to retain their value from bar to bar, otherwise it isn't working (this was my original bug)

Also I fixed the Structure filter it was a rookie move. and no, there wasn't any lookahead (ChatGPT still thinks MT5 is Series by default lol) the code was just plain wrong.

here is the fix, let me know if other things aren't working
There were still a few errors for me so it failed the compiling, if anybody else is having the same issue here is the fixed version.
These users thanked the author Mescalito for the post (total 2):
thomdel, saugio15

Re: TradingView Indicators to MT5 Indicators

17
Jimmy wrote: Thu Jun 18, 2026 7:37 pm Jeff, what can I say brother. Another career high for you.

This is a very clever indicator. Actually been observing it for a few hours and digging through the code and what a fine code (without AI) you've made, I had to add a bit of info to your post about it due to it being such a good concept (hope you don't mind). I might have a crack at making it for MT4 on the weekend.
Will there be a MT4 version?

Re: TradingView Indicators to MT5 Indicators

18
euro_rapp wrote: Sat Jun 20, 2026 1:06 pm Will there be a MT4 version?
Depends. What do you think of the latest version Jef posted? Have you tried it?

Help us with your thoughts/feedback!
List of our most powerful reversal indicators | Guide to the "All Averages" Filters (ADXvma, Laguerre etc.)
Using Fibonacci "numbers" for indicator settings 💡
How to draw Fibonacci Extensions easily | The best way to draw Support & Resistance

Re: TradingView Indicators to MT5 Indicators

19
Mescalito wrote: Sat Jun 20, 2026 3:14 am There were still a few errors for me so it failed the compiling, if anybody else is having the same issue here is the fixed version.
oh my bad. I just forgot semicolons at the end of two lines.
darn i'm bad...
These users thanked the author ionone for the post (total 3):
Jimmy, ashdays, Abdi
Scalping the Century TimeFrame since 1999