ShtickHustle Gaps indicator, BETA

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
A forum member asked me to create a Gaps study modeled after the TradingView 'Gaps' indicator, and suggested I release it here to 'User Contributed Studies'.

This is the 1st public release. It's a BETA (meaning please try it out and report any problems, inconsistencies). I'll also take suggestions for minor tweaks, but it's mostly finished.

It can emit signals you can trade off of, but it's a study, not a strategy, so doesn't initiate any trades itself.

Here are some screenshots for full gaps, partial gaps, partial gaps with label, and full gaps with surrounding gap bars painted magenta (added for debugging purposes).

(see next post for remainder).

01 gaps, full.png02 gaps, partial.png
03 gaps, partial, with labels.jpg04 gaps, full, with gap pairs highlighted.png
 
Last edited:

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
And here are the settings. All should be self-explanatory, other than 'Debug'.
Debug has two options:

- Enable Debugging: if enabled, will send output to the MW log.
- Highlight gap bars: will paint bars that make up a gap, a bright magenta color. This is used as a double-check to make sure gap boxes appear where they're supposed to. If you see bars highlighted, and no gap box, check the settings and make sure 'Min deviation %' is low enough to display the gap, and that 'Max # of gaps' is large enough to cover the period in question.

05 gaps, general settings.png06 gaps, display options.png07 gaps, debugging options.png08 gaps, signals.png

See next post for actual study download...
 
Last edited:

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
One more screenshot, for display pref 'quick settings'

.09 quick settings.jpg

And here's the indicator for download:
<see below for latest version GapsBETA_1.13.jar>

MotiveWaveUCS

This is a 'fat jar' with all needed libraries embedded. I may also post a 'lean' jar that will contain only my code, with links to manually dl the well-known open-source libs and insert them into your 'MotiveWave Extensions/ext' folder.

The link above is good for 7 days, but I'll post updates with new links when needed.

Happy Holidays all 🎅

(the above is not an accurate representation of my face--I don't have that much hair ;) )
 
Last edited:

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
And here is the 'lean' version of Gaps.

Place just the 'GapsBETA_1.12_lean jar' file into the MW extensions folder.

In addition to the GapsBETA_1.12_lean jar study jar, you'll also need these 3 open-source libraries from the Maven repository.

To download
- follow each link below
- find the 'Files' row
- click on the 'jar' link, and download

kotlin-stdlib
kotlin-reflect
kotlinx-datetime

To install these libs:
- if you don't already have an 'ext' folder within your 'MotiveWave Extensions' folder, create it
- place the 3 libs above into 'ext'
- restart MotiveWave

On a side note, if you code yourself and want to start playing with using the Kotlin language instead of Java, you'll find these libs useful for your own development.

<see below for latest version: GapsBETA_1.13.jar>
 
Last edited:

Donovan2580

Well-known member
Joined
Sep 13, 2020
Posts
433
Likes
237
And here is the 'lean' version of Gaps.

Place just the 'GapsBETA_1.12_lean jar' file into the MW extensions folder.

In addition to the GapsBETA_1.12_lean jar study jar, you'll also need these 3 open-source libraries from the Maven repository.

To download
- follow each link below
- find the 'Files' row
- click on the 'jar' link, and download

kotlin-stdlib
kotlin-reflect
kotlinx-datetime

To install these libs:
- if you don't already have an 'ext' folder within your 'MotiveWave Extensions' folder, create it
- place the 3 libs above into 'ext'
- restart MotiveWave

On a side note, if you code yourself and want to start playing with using the Kotlin language instead of Java, you'll find these libs useful for your own development.

I really appreciate the work on this and also the willingness to share - Much appreciated! 🙏
 

angoodwi

Active member
Joined
Mar 25, 2020
Posts
31
Likes
13
Thank you for your contribution, having a play with it.
I tried to set-up a scan for say AAPL or all stocks in DIA ETF watchlist and when I'm in the Study Criteria there is no response when clicking the + to create an eval condition/criteria. So unable to proceed to Finish and test a scan.
Again, appreciate the contribution. :)

1702240728541.png

1702240834744.png




1702240857779.png

1702240902740.png
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
I tried to set-up a scan for say AAPL or all stocks in DIA ETF watchlist and when I'm in the Study Criteria there is no response when clicking the + to create an eval condition/criteria. So unable to proceed to Finish and test a scan.

I've been exclusively an equity futures trader, generally just S&P and DOW--I've never used a scanner.

But, I'm looking into this. If it's possible to do, I'll get it working.
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Great job @Shtick Hustler !!!

Looks really neat 👌
And good info about Kotlin too (I suppose you're the only one on here not using Ant or Maven :LOL:)


On a sidenote: I think for the scanner to work you need to 'ExportValues' in the RuntimeDescriptor:
1702381847765.png
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
I think for the scanner to work you need to 'ExportValues' in the RuntimeDescriptor:
Thanks Spin, but I had figured that part out.

I'm working on another issue that came up when running a gajillion versions of the study during scanning: the java.util.ConcurrentModificationException.

Apparently I need to be sure my list modifications are thread-safe to avoid this. Working on it now...🔨🔨🔨
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Ouch.

That one bit me a couple of times as well already.
Nasty beast ! 😖
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
Ouch.

That one bit me a couple of times as well already.

Problem solved. That was the easy part.

I was tearing my hair out trying to get the scanner to recognize alert signals. Then I discovered the answer, looking at the MW StochasticRSI study...

I'm not going to clutter up this thread with the solution; look for a future post in the SDK forum for that.
 
Last edited:

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
Gaps update: BETA_1.13


download fat jar (complete): GapsBETA_1.13

MotiveWaveUCS

download lean jar: (attachment below)
see previous post of lean jar for installation instructions​

Fix
- scanner now works as expected with default signals

New
  • added Indicator, configured via 'Display' tab.
    it will chase the latest gap open, or full gap close
    I'd suggested selecting the 'line' checkbox if you want to use this
  • added option to enable/disable display of up/down gaps, configured in 'Display' tab
    also available via QuickSettings. This can reduce visual clutter with a lot of gaps on the chart.
Using scanner
To use the scanner select one or more of the signal options in the 'Criteria' tab (see screenshot)​
Though it's also available here, I'd avoid using the 'Gap open/close' option, which is tied to the Indicator values.​
When selecting more than one criteria, be sure the 'One or more' option is selected from the 'Criteria->Eval Method' popup.​
As for the Gaps study settings within the scanner--to prevent unnecessary processing, I'd recommend the following"​
Keep 'Max # of gaps' as low as possible​
Uncheck both​
- Limit max gap trail length​
- Close gaps partially​
02 gaps, new display options.png03 gaps, new quicksettings options.png01 gaps, indicator line example.png04 gaps, scanner criteria options.png
 

Attachments

  • GapsBETA_1.13_lean.zip
    42.1 KB · Views: 36
Last edited:

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
Glad to see someone else won the wrestling match against the scanner / watchlist ! 😆


Nice updates !!
(y)
(y)
 

angoodwi

Active member
Joined
Mar 25, 2020
Posts
31
Likes
13
Well we got the IWM gap in the scan :)
Only tested the 1 instrument for now since I knew the criteria would be met. Will try on a basket of stocks say 100 then 500 :)

Good job!

1702667569728.png

1702667511612.png
 

Airmon

New member
Joined
Oct 28, 2023
Posts
4
Likes
0
Gaps update: BETA_1.13


download fat jar (complete): GapsBETA_1.13

MotiveWaveUCS

download lean jar: (attachment below)
see previous post of lean jar for installation instructions​

Fix
- scanner now works as expected with default signals

New
  • added Indicator, configured via 'Display' tab.
    it will chase the latest gap open, or full gap close
    I'd suggested selecting the 'line' checkbox if you want to use this
  • added option to enable/disable display of up/down gaps, configured in 'Display' tab
    also available via QuickSettings. This can reduce visual clutter with a lot of gaps on the chart.
Using scanner
To use the scanner select one or more of the signal options in the 'Criteria' tab (see screenshot)​
Though it's also available here, I'd avoid using the 'Gap open/close' option, which is tied to the Indicator values.​
When selecting more than one criteria, be sure the 'One or more' option is selected from the 'Criteria->Eval Method' popup.​
As for the Gaps study settings within the scanner--to prevent unnecessary processing, I'd recommend the following"​
Keep 'Max # of gaps' as low as possible​
Uncheck both​
- Limit max gap trail length​
- Close gaps partially​
View attachment 2148View attachment 2149View attachment 2147View attachment 2152
Thank you

Shtick Hustler

I tried this update but it doesn't open. I don't know what the problem is
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
Thank you

Shtick Hustler

I tried this update but it doesn't open. I don't know what the problem is

Please define 'doesn't open'.

Were you able to download it and install it ok? What's your MW version and OS?
 
Top