Coloring an IndicatorLine by Slope: Questions for Optimal Coding

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:

We work extremely hard to keep things positive on our forums.

We do not tolerate rude behavior, trolling, or vendor advertising in posts.

We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.

We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.

If you want to support our community, become an Elite Member.

The following user says Thank You to Big Mike for this post:

The last version of the indicators had not called the Butterworth, Gauss and Supersmoother filters in a proper way.
All other moving averages were not affected.

Therefore I had to update the indicators again. The indicators can be found here:

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.

If you want to support our community, become an Elite Member.

The following user says Thank You to Big Mike for this post:

Update Bollinger Universal and Keltner Universal Channels

Have updated the two indicators today.

Have added paint bars to the Bollinger Universal indicator. Both indicators now use updated indicators for the Ehlers and Gauss filters. The mode is removed and no longer available. The indicator can now be displaced and will correctly align the plot colors and paint bars to the displacement.

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.

If you want to support our community, become an Elite Member.

The following 2 users say Thank You to Big Mike for this post:

@Fat Tails, I may not have grasped all of your post several post ago, but if I could simplify what I read in terms for people like myself, if I used change of price over change of time, it would pass the C-2 test. Then 45 deg doesn't really mean anything because when a person running - velocity (mile/hour) or in trading (price changed/hour) would be the velocity. To know a flat period of time that price would be a low number under some arbitrary threshold. All that to say if I want to look at a chop filter, I could check velocity and if it's under x then its basically flat and not trending above my desired value.

If all that's valid, I could extend that by thinking, change in price/time would give me the acceleration (1st derivative of velocity) and I could use those values to indicate what some might call momentum.

When charts were printed, angles were used as a proxy for momentum. A steep angle indicated high momentum, a flat angle low momentum. As the x-axis and y-axis of modern charting applications are scalable, this approximation does not make any sense today.

Momentum is in fact comparable to velocity, as momentum is price change over a time period. We cannot talk of a 1st derivative because the trades are discrete events and the discontinuous price function is not differentiable, but you may consider momentum as somewhat equivalent to the first derivative of price.

Angles could be used as tool to determine whether prices were rising, falling or flat, where "flat" was the equivalent of all smaller angles, for example all angles between -5° and + 5°. To find a similar threshold for momentum, we need to normalize momentum. The only possible input value to normalize momentum is the average bar size. Consider

-> bar size or range = 1-bar volatility (non-directional)
-> momentum(n) = n-bar volatility (directional)

By dividing momentum through the average range or average true range and the number of bars, you get a normalized value of momentum, which tells you whether a price move over n bars was steep or flat relative to intra-bar volatility. One possible formula would be

normalized momentum (n) = momentum(n) / ( n * SMA (true range (n)))

After applying such a normalization, you will also get reasonable results across different instrument and different timeframes. Such a normalized momentum will have a value between -100 and + 100 and you can define an upper and lower threshold such that all values contained between the threshold values can be considered as flat.

The following 3 users say Thank You to Fat Tails for this post:

Thanks for the well thought out response. After reading it, the question it raised is won't the formula above be recursive since the result is part of the equations input? I did understand the point you were making and agree with what you were saying.

I'm not sure you answered another question that I had about the possibility of using change of price over change of time to determine slope and use that slope as a value to set a threshold. Thinking about it as I type this, it would limit your chart to a time based chart, but used with that limitation it seems like it would still be a valid indication of momentum (slope) . What are your thoughts about this?

Change of price over change of time is the definition of momentum. If you want to compare momentum to a threshold value, you first have to normalize it. Normalization allows you to use the same threshold value for different instruments, chart types and time frames. Without normalization you need a different threshold value for each instrument, each chart type and each time frame. Normalization typically uses volatility as I have explained in my last post.

Sir, I was wondering do you have a combo indicator with the bollinger and keltner channels together? , Ive seen one months back that colors candles up or down based off bands and squeeze of both bollinger/keltner. Sorry no picture at this time but Im 100% sure you know what Im referring too

thx in advance for your reply
R

Last edited by Rad4633; August 26th, 2013 at 03:24 AM.