| Current location | Thread information | |
OmniTrader Professional Forum
![]()
OmniLanguage Discussion![]()
DMI Oscillator and DMI Stochastic
|
Last Activity 11/4/2025 1:00 PM 7 replies, 805 viewings |
|
|
| Printer friendly version |
| ^ Top | |||
| Lou Venezia Member ![]() Posts: 29 Joined: 7/22/2022 User Profile |
I've recently read an article by Barbara Star, PhD regarding the DMI Oscillator and DMI Stochastic. These are indicators that she uses mainly to identify potential entries into an existing trend. These are two indicators that capture trend, momentum and support/resistance. They seem pretty interesting and I was wondering if anyone has used/tested these indicators and the results achieved. Also, has anyone developed OmniLanguage code for these indicators that are shareable or for sale. Thanks. | ||
| ^ Top | |||
| Frank Birch Veteran ![]() ![]() ![]() ![]() Posts: 181 Joined: 3/25/2006 Location: UK User Profile |
Hey Lou! ๐ Well, we did it! You asked about Barbara Star's DMI Oscillator and DMI Stochastic indicators, and we put together the OmniLanguage code you needed. Here's a quick rundown of what you've got now... ๐ฆ What's in the Package We built 3 components based on Barbara Star's methodology: 1. DMIOscillator.txt Your trend direction filter. Shows values from -100 to +100 with a zero line in the middle. Above 0 = uptrend bias Below 0 = downtrend bias Crossing zero = potential trend change 2. DMIStochastic.txt The timing indicator. Takes the DMI Oscillator and runs a stochastic calculation on it (not on price). Gives you K and D lines between 0-100 with levels at 10 and 90. In uptrends, watch for K bouncing off 10 In downtrends, watch for K bouncing off 90 3. DMIStochEntry.txt The complete system that combines both. It: Generates Long signals when DMIOsc > 0 AND K crosses up through 10 Generates Short signals when DMIOsc < 0 AND K crosses down through 90 Plots the stochastic pane right in the system so you can see what's happening Has two exit modes you can toggle with the UseZeroExit parameter (0 or 1) ๐ฏ The Basic Concept Barbara Star's idea is pretty clever - instead of trying to catch reversals, you're timing entries with the trend: Wait for the trend to be established (DMIOsc filter) Wait for a pullback to an extreme (K hits 10 or 90) Enter when it bounces back (K crosses back) You're essentially buying dips in uptrends and selling rallies in downtrends. ๐ Bonus: Scan Conditions We put together two scans you can run in OmniScan to find setups: Long Scan: DMIOscillator(14) > 0 AND DMIStochastic(14,14,3,3) > 10 AND DMIStochastic(14,14,3,3) < 20 ``` **Short Scan:** ``` DMIOscillator(14) < 0 AND DMIStochastic(14,14,3,3) < 90 AND DMIStochastic(14,14,3,3) > 80 โ๏ธ The Parameters All three use default settings based on Barbara Star's work: DMIPeriod = 14 (standard DMI calculation) KLen = 14 (stochastic lookback) Smooth1 = 3 (first K smoothing) Smooth2 = 3 (second smoothing for D line) UseZeroExit = 0 (system exits: 0=50-line, 1=zero-line) You can tweak these to see what works best for your style and timeframes. ๐งช Now It's Your Turn - Testing Time! Here's the thing, Lou... we built this code but haven't tested it in live markets. The logic follows Barbara Star's article, the code compiles clean, and it plots nicely - but we need real-world feedback! Can you help us out? Try it on Daily charts first (her recommended timeframe) Test it on 60-minute if you're more active Run it on some stocks you know well See how the signals look Questions we'd love feedback on: Does it generate too many signals or too few? Are the entry points making sense when you look at the charts? Which exit mode (0 or 1) feels better to you? Does it work better on trending stocks vs choppy ones? ๐ญ Some Ideas to Explore If you want to enhance it down the road, here are some thoughts (just brainstorming!): Maybe add a trend strength filter? Could add ADX requirement (ADX > 25 = only trade strong trends) Or maybe DMIOsc needs to be stronger than just >0 or <0 (maybe >20 or <-20?) Volume confirmation? Some folks like to see volume spike on the entry bar Could add that as an optional filter Multiple timeframe check? Check that both Daily and 60-min are aligned before entry That's more advanced but could reduce whipsaws Different stop/target exits? Maybe fixed % stops or ATR-based stops Profit targets at certain levels But honestly? Test what we built first before adding complexity. Sometimes simple is better! ๐ข Share Your Results! Lou, if you test this out and find it useful (or find issues!), definitely share on the forum. Other traders would benefit from knowing: What timeframes worked best What parameter tweaks helped What market conditions it struggles with Any improvements you made That's how we all get better - by sharing what works and what doesn't. ๐ค Thanks for Asking Appreciate you bringing Barbara Star's work to our attention - it's a solid approach and was fun to code up. We gave you the tools... now go see if they're any good! ๐ No pressure - just test it when you have time and let us know what you discover. Good luck with the testing! Frank Birch Attached file : DMIOscillator.txt (0KB - 103 downloads) Attached file : DMIStochastic.txt (0KB - 89 downloads) Attached file : DMIStochEntry.txt (2KB - 98 downloads) | ||
| ^ Top | |||
| Frank Birch Veteran ![]() ![]() ![]() ![]() Posts: 181 Joined: 3/25/2006 Location: UK User Profile |
Hey Lou! ๐ Quick note on the second system we built for you... What's Different? DMIStochEntry = Barbara Star's original methodology (pure) DMIStochEntryADX = Same thing + ADX trend strength filter (enhanced) The ADX Concept (Simple Version) ADX (Average Directional Index) measures how strong a trend is, not which direction. ADX above 25 = Strong trend happening (good environment for this system) ADX below 25 = Weak/choppy market (system might get whipsawed) We added ADX as a gatekeeper. The system still looks for the same Barbara Star signals, but now it says: "Only take the trade if ADX confirms we're in a real trend." How It Works Original Logic (Barbara Star): Long when DMIOsc > 0 AND K crosses up through 10 Short when DMIOsc < 0 AND K crosses down through 90 Enhanced Logic (Our Addition): Long when DMIOsc > 0 AND K crosses up through 10 AND ADX > 25 Short when DMIOsc < 0 AND K crosses down through 90 AND ADX > 25 Everything else is identical - same exits, same parameters, same visual pane. The Parameters Two new settings you can adjust: ADXPeriod (default 14) Standard ADX lookback period. Leave at 14 unless you want smoother (20) or faster (10) readings. ADXThreshold (default 25) The cutoff level. Raise it to 30 or 35 if you want ONLY super-strong trends. Lower to 20 if you want more signals. ShowADX (default 1 = ON) Toggle to show/hide the ADX lines in the pane. When ON, you'll see: The ADX line (current trend strength) The threshold line (your cutoff setting) When the ADX line is above the threshold line = filter is passing signals through When it's below = filter is blocking signals Why We Built This Barbara Star's system is solid, but it can get chopped up in sideways markets. The ADX filter should (in theory) skip those trades and only fire when there's a genuine trend to ride. Will it perform better? ๐คท That's what testing is for! Your Testing Mission Run both systems and compare: DMIStochEntry (no filter) - see how many signals you get DMIStochEntryADX (with filter) - probably fewer signals, but maybe cleaner? Check which one: Generates better quality setups Avoids more junk trades Fits your trading style better Then report back on the forum what you found! Other traders would love to know. Bottom Line This is our idea, not Barbara Star's. We're testing whether adding ADX improves her methodology. It might... or it might filter out some good trades too. Only one way to find out! Good luck testing! Frank "Same great system, now with a trend strength bouncer at the door." P.S. - If the ADX filter feels too restrictive (not enough signals), try lowering the threshold to 20. If it's still letting through choppy trades, raise it to 30. Play with it and see what works! Attached file : DMIStochEntryADX.txt (2KB - 91 downloads) | ||
| ^ Top | |||
| Lou Venezia Member ![]() Posts: 29 Joined: 7/22/2022 User Profile |
WOW! Thanks Frank. It's amazing that you did all of this in such a short period of time - I'm duly impressed. I've been away from my computer for a few days so I will download your programs and begin the testing process. I will keep you informed as to how I'm getting along. It will be interesting to se if this approach has some merit. Thanks again - much appreciated. | ||
| ^ Top | |||
| Lou Venezia Member ![]() Posts: 29 Joined: 7/22/2022 User Profile |
I went back and reviewed the parameter settings from the Star article and noticed that she used the 10,3,3 settings for the DMI Oscillator, DMI Stochastic and DMI Entry programs. Your programs have it set at the 14 default for the look back period. I changed it in your programs and it makes a significant difference in identifying entry points. Right now, before starting testing, I'm reviewing parameter settings as per the article and just eyeballing some symbols to check for reasonableness. | ||
| ^ Top | |||
| Frank Birch Veteran ![]() ![]() ![]() ![]() Posts: 181 Joined: 3/25/2006 Location: UK User Profile |
Hi Lou, ive just told my cheif engineer his mistake on the default settings! Taylor said sorry! Taylor mentioned there vague on the exit cretria??? even a good entry needs a great exit method? food for thought? Also take into consideration that every stock, future and forex symbol has a different setting and for Long/Short and time frame so dont take settings as gold?? so stratgey wizard would help you so much! Regards Frank [Edited by Frank Birch on 10/15/2025 12:19 PM] | ||
| ^ Top | |||
| Lou Venezia Member ![]() Posts: 29 Joined: 7/22/2022 User Profile |
Frank - just providing an update. Been testing the DMI Stochastic and found that there are a lot of quality trades. However there are a number of unprofitable trades that would seem to wash the good trades if one were to execute all of the triggered trades. I'm spending time now looking at the unprofitable trades to see how they differ from the profitable trades. perhaps there is another qualifier that would negate the unprofitable trades either through programming or more intelligent scans. Overall there seems to be enough positives, at least at this point, to keep pushing forward with my testing/research. | ||
| ^ Top | |||
| Frank Birch Veteran ![]() ![]() ![]() ![]() Posts: 181 Joined: 3/25/2006 Location: UK User Profile |
Hi Lou and all, Are you using the orignal concept or the ADX version Lou? In the article like every article in stocks and comms they give awesome entry signals and always avoid exit management? what exit management have you in place? Regards Frank | ||
|
|
| Legend | Action | Notification | |||
|
Administrator
Forum Moderator |
Registered User
Unregistered User |
E-Mail this thread to a friend |
Toggle e-mail notification | ||

DMI Oscillator and DMI Stochastic


E-Mail this thread to a friend