Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 19:18:56 +0000



[User Discussion] - Offering To The Community: Brett Johnson's Standard Tool Kit

View Count: 16041

[2016-02-07 03:54:58]
bjohnson777 (Brett Johnson) - Posts: 284
If there are any questions about the Tool Kit DLL, post them here. If there are questions about one of the studies/programs, please post them using the appropriate link. The support board will flag me about a new post. If you post to the main forum, I may or may not see it.

While I am actively maintaining all the programs on this page, please do NOT private message me for general programming help, new projects, or new features. With my health problems, I'm already years behind schedule and do not have the ability to take anything more on. The SC dev's have set up this support board to help you connect to others who might be able to assist you.

Note: Every time you upgrade SC, you should also recompile the source code to a new DLL. While it may seem that everything is working fine (and it might be for now), the SC dev's often make internal changes that are not apparent to the end user. This can cause strange bugs that will go away with a fresh compile. Recompile instructions are in post #11 down the page.

This is a collection of studies and trading programs I've put together for chart analysis, trading, and educational reference. My ACS_Source and Data directories got a little crowded, so I merged them all into a single CPP/DLL for ease of management and distribution. I'll still post new programs to separate messages. When those programs become stable, they will be added to this consolidation CPP/DLL. Follow this post if you're interested in updates. Non-DLL capable programs will be listed after.

The full CPP/DLL list:

Adaptive ERI Moving Average With Filters
Offering To The Community: Adaptive ERI Moving Average With Filters

Adaptive IIO Moving Average With Filters (and By Tick)
Offering To The Community: Adaptive IIO Moving Average With Filters (and By Tick)

Adaptive MFI Moving Average With Filters
Offering To The Community: Adaptive MFI Moving Average With Filters

Adaptive OBV RSI Moving Average By Tick With Filters
Offering To The Community: Adaptive OBV RSI Moving Average By Tick With Filters

Enhanced Adaptive RSI Moving Average (ARSI) With Filters
Offering To The Community: Enhanced Adaptive RSI Moving Average (ARSI) With Filters

Adaptive Stochastic Moving Average With Filters
Offering To The Community: Adaptive Stochastic Moving Average With Filters

Adaptive Volume Ratio Moving Average By Tick With Filters
Offering To The Community: Adaptive Volume Ratio Moving Average By Tick With Filters

Custom Stock Index Creator
Offering To The Community: Custom Stock Index Creator

Ease Of Movement With Filters
Offering To The Community: Ease Of Movement With Filters

Efficiency Ratio Indicator With Filters
Offering To The Community: Efficiency Ratio Indicator With Filters

Forex: Currency Decorrelation
Offering To The Community: Forex: Currency Decorrelation (and Currency Strength)

Forex: Currency Strength
Offering To The Community: Forex: Currency Strength

Intraday Intensity Oscillator With Filters (and By Tick)
Offering To The Community: Intraday Intensity Oscillator With Filters (and By Tick)

Klinger Volume Oscillator With Filters
Offering To The Community: Klinger Volume Oscillator With Filters

Money Flow Index With Filters
Offering To The Community: Money Flow Index With Filters

On Balance Volume By Bar With Filters
Offering To The Community: On Balance Volume By Bar With Filters

On Balance Volume By Percent Bar With Filters
Offering To The Community: On Balance Volume By Percent Bar With Filters

On Balance Volume By Tick With Filters
Offering To The Community: On Balance Volume By Tick With Filters

On Balance Volume By Tick MACD With Filters
Offering To The Community: On Balance Volume By Tick MACD With Filters

On Balance Volume By Tick RSI With Filters
Offering To The Community: On Balance Volume By Tick RSI With Filters

On Balance Volume Price Movement With Filters (also By Tick)
Offering To The Community: On Balance Volume Price Movement With Filters (also By Tick)

Tool: Bollinger Band Ribbon
Offering To The Community: Bollinger Band Ribbon

Tool: Lines 5
Offering To The Community: Lines 5

Tool: Moving Average Ribbon
Offering To The Community: Moving Average Ribbon

Tool: Scale Study to 100 Graph By Zero Line
Offering To The Community: Scale Study to 100 Graph By Zero Line

Trade: Brett Johnson's Multi-Function Trailing Stop
Offering To The Community: Brett's Multi-Function Trailing Stop

Trade: Status Report (starting point for external trade program ctrl)
Offering To The Community: Trade Status Report (starting point for external trade program ctrl)

Trade Testing: Constant Entry For An Exit Management Program
Offering To The Community: Brett's Multi-Function Trailing Stop | Post: 71624

Up/Down Volume Difference By Tick With Filters
Offering To The Community: Up/Down Volume Difference By Tick With Filters

Up/Down Volume Ratio With Limiter By Tick With Filters
Offering To The Community: Up/Down Volume Ratio With Limiter By Tick With Filters

Volume Bars Stacked By Tick
Offering To The Community: Volume Bars Stacked By Tick


-----
Stand Alone Programs (not in the CPP/DLL):

Enhanced Intraday Data File Compression with Large Speedups
Offering To The Community: Enhanced Intraday Data File Compression with Large Speedups
* This probably won't work anymore with the date format change in SC v2150.

-----
Update: 2022-07-10. Minor fixes to compile with SC 2411.
Recompile instructions are in post #11 down the page.
If the recompile fails due to an SC upgrade, post a message to flag me and I'll take care of it. I'm usually working on multiple projects at once and don't always see the new problems.
Date Time Of Last Edit: 2022-07-10 07:35:42
attachmentBrettJohnsonsStandardToolKit.cpp - Attached On 2022-07-10 07:35:35 UTC - Size: 626.49 KB - 187 views
[2016-03-21 20:22:10]
bjohnson777 (Brett Johnson) - Posts: 284
Added:

Custom Stock Index Creator
Offering To The Community: Custom Stock Index Creator
[2016-04-25 09:39:00]
bjohnson777 (Brett Johnson) - Posts: 284
Update:

Bollinger Band Ribbon
Custom Stock Index Creator
[2016-06-10 19:08:36]
bjohnson777 (Brett Johnson) - Posts: 284
Added:

Forex: Currency Decorrelation
Offering To The Community: Forex: Currency Decorrelation (and Currency Strength)

Still looking for ACS and RCS calculations.

My main hard disk died last month. It had been giving me problems off and on before that, so I had it backed up. I was thankfully able to mount it read-only and back up the final minor changes. Since it seems all new drives are designed to fail early, my project for the past month was to write a more advanced disk test. I've found some interesting things... that have irritated me to no end. :-/ This isn't a SC related project, but some might find the performance graphs and lecture at the mid point interesting.

http://www.brettcave.net/howto/computer/DiskBurnInTest.html

This script requires knowledge of command line linux and isn't for the common user. If you are a common user and want a more in depth disk test, scroll down to where I talk about UBCD and HDAT2.
[2016-07-20 09:21:25]
bjohnson777 (Brett Johnson) - Posts: 284
Update:

Updated "Custom Stock Index Creator" to take out a couple stocks that would hang the intraday charts.

Updated "Forex: Currency Decorrelation" to make it easier to work with "Forex: Currency Strength".

Added "Forex: Currency Strength".
[2016-10-15 06:16:44]
bjohnson777 (Brett Johnson) - Posts: 284
Today's DLL was compiled with the M$VC++ change over.
You may need to update your SC version.
Keep your previous DLL version until you've tested the new compile.
Most changes were made to shut up useless M$VC++ warnings when compiling.
There are a few compile warnings left about "argument" that can be ignored.
No real functionality changes have been made.

Note my trailing stop was renamed for consistency. You'll need to re-add it if you're using it.
[2016-11-12 20:25:05]
bjohnson777 (Brett Johnson) - Posts: 284
Updated "Custom Stock Index Creator" and "Forex: Currency Decorrelation".
[2016-11-19 01:25:53]
bjohnson777 (Brett Johnson) - Posts: 284
Updated "Brett Johnson's Multi-Function Trailing Stop". This includes a major rewrite of the Exit Trend Line so it can be saved with the chart. Also includes significant updates to Price Target and some code readablity changes. Click it's link in the first post to see more.

I changed all the sc.StudyVersion numbers to a date stamp that will fit in a uint32 as YYYYMMDDxx. I find this is easier to keep track of the last source code change. Most of the individual programs in the links above will still show v3 or v4, but their source code is the same as this DLL. The individual links will be updated and re-uploaded when their source code has a real change.
[2016-11-22 22:36:11]
bjohnson777 (Brett Johnson) - Posts: 284
Some small changes to my Multi-Function Trailing Stop:

In doing overnight trade tests, sometimes I've run into an odd intermittent bug that will exit the position when the chart is recalculated. It's been hard to trace down, but I think I've fixed it.

I also changed the default setting for "Price Input Bias" to "No". This only works well on low volatility symbols. For regular volatility, "HLC Avg" seems to work well. For high volatility, choose "Last" to get non-averaged data. As always, give the settings a test with your preferred trading style.
[2016-12-07 06:03:20]
bjohnson777 (Brett Johnson) - Posts: 284
Update:

Minor updates to Custom Stock Index Creator and Forex: Currency Strength adding the minimize window function now available in ACSIL.

Minor code update to the Multi-Function Trailing Stop to allow it to compile easier in the DLL. No function change.

Added a throttle to Trade Testing to give it a little extra time when starting a new order.

Added: Trade: Status Report (starting point for external trade program ctrl)
[2017-04-10 04:55:56]
bjohnson777 (Brett Johnson) - Posts: 284
I recompiled the main DLL with every upgrade because of some recent updates that broke older compatibility or because of some updates that are internal and not visible but can still cause erratic behavior or study failure. This happens from time to time as the SC dev's add new functions and is normal.

If anyone runs into strange problems, it's usually fixed by a quick and easy recompile:

* Download and save the .cpp file in your ACS_Source directory.

* Run SC but don't open any chart windows yet. If you have auto-load running, try closing them out. The source will recompile, but it will complain about the DLL being loaded in the background.

* Go to Analysis >> Build Custom Studies DLL.

* Hit "Select File(s)". In the ACS_Source directory, look for the .cpp file you just saved. Select it and hit Open. If you don't know where your ACS_Source directory is located, look at the top of the "Select" window for the full path.

* Hit the "Build >> Remote Build" from the menu. This will take a minute to do. It may return some warnings. So long as they're not fatal, it's fine. If you've already opened chart windows, there will be an error about the DLL already being loaded. We'll fix that in the next step.

* If you haven't loaded any chart windows yet, you can do so now. The programs in the DLL should run normally again. If you've had some chart windows open and got the DLL error above, exit and run SC again.

* You can import the custom study from Analysis / Studies / Add Custom Study, then scroll through the list and select what you want.

These steps should get you running again. They're also pretty universal and should work with other people's .cpp files, too. If you get stuck, the SC dev's have a compile instruction page in the documentation that can help.

Question: Should I recompile on a regular basis?
Answer: Yes, go ahead and do a recompile every new SC release version you install. I try to keep all my source code in the DLL to make this a single and simple operation. If you're running code from other people who also have a lot of chart studies/programs, encourage them to build a single DLL like I did. My code and the examples in the ACS_Source directory can be used as a template.
Date Time Of Last Edit: 2021-06-15 16:29:59
[2017-12-13 06:28:40]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2018-01-31 07:32:24]
bjohnson777 (Brett Johnson) - Posts: 284
Updated the "by tick" versions to cleanly compile with version 1689.

Updated the Index Creator to include volume.
[2018-03-29 10:55:39]
bjohnson777 (Brett Johnson) - Posts: 284
Update to Trade: Status Report: Had to remove fsync() because of windoze issues. fflush() is still there and will immediately write out the file to the file system (almost a bit redundant with fclose() following it). fsync() was used to tell the file system to immediately write to disk. Not a major loss, but it was nice to have in case of a crash or power outage. In most probabilities, closing the file will cause the file system to write to disk within several seconds, anyway.

Also Note: The compiled DLL is 64bit now. Running SC 32bit for the remote build of a 32bit DLL didn't work. My initial tests don't show any problems with the 64bit DLL. My heavier charts load like normal.
[2018-08-08 00:09:00]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to my Trailing Stop to compile with the new SC version.
[2018-10-02 20:11:14]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to my Multi-Function Trailing Stop to compile with the new SC version.
[2018-10-15 13:38:31]
bjohnson777 (Brett Johnson) - Posts: 284
Fixed source code of KVO to cleanly compile with 1820. No functionality change.
[2018-10-23 01:04:37]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to my Multi-Function Trailing Stop to compile with the new SC version.
[2018-10-24 16:42:37]
Xfanman1 - Posts: 320
Brett, I'm sure I speak for many other also, but I appreciate your generosity sharing your hard work and talent with the SC User Base.

Thanks so much...Scott
[2018-10-24 22:28:34]
bjohnson777 (Brett Johnson) - Posts: 284
Thanks :-)
[2019-02-03 21:13:38]
ARDAN - Posts: 66
First of all, Thank you for all the great contribution. Appreciated!
Do you have a kind of study to do coloring on the single cell of the summary window with different colors?
Inputs might be alert studies and then coloring study might and/or them to output color to a study summary cell?
Thanks again for the generosity.
[2019-02-04 11:39:02]
bjohnson777 (Brett Johnson) - Posts: 284
Thanks. I don't use the summary window so I don't have anything for it. Sorry.
[2019-02-04 13:44:47]
ARDAN - Posts: 66
How do you monitor the market then?
What is your use case/best practice for that?
[2019-02-04 14:51:23]
bjohnson777 (Brett Johnson) - Posts: 284
I'm waiting to get in to some general market ETF's for my IRA's. These will be longer term trades. I watch those ETF's (with some of my tools above), my Custom Stock Index Creator, and the general financial news.

I'm still working on some medical projects for my bad health problems right now. Since I don't have the time nor energy to watch the smaller market moves, I figure it's better for me to step back and catch the bigger trend.
[2019-02-12 05:55:38]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to Forex Currency Decorrelation and Currency Strength to compile with the new SC version.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account