| Technical Analysis The technical discussion forum for traders. |
![]() | | Tweet | |
| | #1 | ||
![]() | Smoothing Color Change in MA Signal Line ? I am sure inevitably someone is going to come on here and say that further smoothing of an MA will lessen false signals but delay entry, and I don't disagree. BUT due to the standard way of coding a color alternating signal line being an either or approach, minuet changes in the direction are approached as veritable True or False in nature. All of this ultimately allowing for what I personally refer to as micro chop or false signals. ![]() I have had some success in limiting the issue by replacing the standard price input with (High + Low)/2 as opposed to Close, as well as changing the number of look back bars from 1 to 2. Code: { Color criteria }
if (Value1 > Value1[2]) then
SetPlotColor[colourDeltaBar](1, upColour)
else if (Value1 < Value1[2]) then
SetPlotColor[colourDeltaBar](1, downColour); Any suggestions would be much appreciated. | ||
| |
|
| | #2 | ||
![]() | Re: Smoothing Color Change in MA Signal Line ? Quote:
eg. use medianprice instead of close
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #3 | ||
![]() | Smoothing the color VS smoothing the central tendency Preface: For real life, though, you said it just right with Quote:
[pseudocode] Code: inputs:
…
nSdevLen(200),
…
nBrktMlt1(.6), { manually tweak this input and your value1’s length parameter to get goldilock’s settings }
…
// also add a flatColor(neutralcolor) input...
;
vars:
…
degree(0),
sdev(0),
colorThreshold(0),
…
;
//////////////////
{Color criteria}
degree = absvalue(arctangent(nlAvg- nlAvg[1]));
sdev = stddev(degree, sdevLen);
colorThreshold = sdev * nBrktMlt1;
{
notes:
> [2] changed to [1] throughout this example - why wait? ;) .
> nlAvg equivalent to your Value1…
}
if (degree <= colorThreshold) then begin
SetPlotColor(1, flatColor);
end else begin
if (nlAvg > nlAvg [1]) then
SetPlotColor(1, upColor)
else
SetPlotColor(1, dnColor;
end; // if (degree > colorThreshold) This concept could also be modified to keep the dnColour during your red circle (because angles haven’t changed sufficiently to up ) You could also get more fuzzy using GradientColor reserved word, etc. hth | ||
| |
|
| | #4 | ||
![]() ![]() | Re: Smoothing Color Change in MA Signal Line ? Quote:
I have been using a heat-map approach to determining support and resistance for my grid trading application. This technique could be adapted to MAs, Please see my last blog post here and then PM me if you are interested in pursuing. Best John | ||
| |
|
| | #5 | ||
![]() | Re: Smoothing Color Change in MA Signal Line ? John - Interesting idea ..I'll have to do some more reading on it | ||
| |
|
| | #6 | ||
![]() | Re: Smoothing Color Change in MA Signal Line ? NewMA=jthma(yourMA,3); to get it super smooth run it through the formula one more time. NewMA1=jthma(NewMA,3); | ||
| |
|
| The Following User Says Thank You to estate1997 For This Useful Post: | ||
JohnTaylorHK (12-18-2011) | ||
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Holt Winter's Double Exponential Smoothing. | r4bb1t | Trading Indicators | 7 | 09-11-2011 12:23 PM |
| Does Anyone Know How to Get Indicator ADX W/ Smoothing Please? | whirl | Technical Analysis | 3 | 08-19-2010 02:26 PM |
| Smoothing out price | feb2865 | Technical Analysis | 34 | 08-07-2010 09:21 PM |
| Set Background Color | aaa | Coding Forum | 2 | 05-29-2010 09:56 AM |
| [Smoothing Out The TRIN & TRINQ] | Soultrader | Trading Videos | 2 | 04-22-2007 03:33 PM |