Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
First off thanks to all who have contributed to this topic. I also have been following along with this. The ability to turn off certain signals already exists in the edit studies section. If there is a certain signal you do not wish to observe go to edit studies, click on the signal you have in question, scroll down and just uncheck the show plot icon. Thanks again to all.
Good point. That should take care of the extra "noise". I'm still interested in the "sensitivity" concept though. I've haven't heard of that before. Also maybe others who are silently reading this thread can contribute some input for snowcloud on his project.
I though that I'd change the chart labels for me to be able to understand them better. Let me know if I read your abreviated labels correctly. I'm also thinking of having the trend labels to have an up color and a down color. I see the code for the short, middle and long term calculations, but its still not clear to me what the lengths of these time periods are by looking at the formulae.
The only thing that stands out to me is that the Close Bar labels should say "UpCloseBar", etc. An UpBar is not necessarily an UpCloseBar, etc.
I shortened the original labels so that I could see more of the Description text without having to extend the chart across the entire screen. If you want to see the original labels, load one of cbritton's earlier versions from near the beginning of this thread. All of the originals are still there.
the Close Bar labels should say "UpCloseBar", etc. An UpBar is not necessarily an UpCloseBar, etc.
I don't understand. Your label says "Close". Every bar has a close; so what do you mean by a "Close Bar"? Do you mean "BarCloseUp", "BarCloseMiddle" or "BarCloseDown"?
I don't understand. Your label says "Close". Every bar has a close; so what do you mean by a "Close Bar"? Do you mean "BarCloseUp", "BarCloseMiddle" or "BarCloseDown"?
You're right. Sorry, I answered in haste and erred. Here are the trend text defs from the original file:
# Trend Text Definitions
AddChartLabel(trendText, concat("Vol: ", if volume > sAvgVolume[0] + 2.0 * sAvgVolumeSTD then "Very High"
else if Volume[0] > (sAvgVolume[0] + 1.0 * sAvgVolumeSTD) then "High"
else if (Volume[0] > sAvgVolume[0]) then "Above Average"
else if (Volume[0] < sAvgVolume[0] && Volume[0] > (sAvgVolume[0] - 1.0 * sAvgVolumeSTD)) then "Less Than Average"
else if (Volume[0] < (sAvgVolume[0] - 1.0 * sAvgVolumeSTD)) then "Low"
else ""), Color.white);
AddChartLabel(trendText, concat("Spread: ", if (spread > (avgSpread * 2.0)) then "Wide"
else if (spread > avgSpread) then "Above Average"
else "Narrow"), Color.white);
AddChartLabel(trendText, concat("Close: ", if (isVeryHighCloseBar) then "Very High"
else if (isUpCloseBar) then "High"
else if (isMidCloseBar) then "Mid"
else if (isDownCloseBar) then "Down"
else "Very Low"), Color.white);
AddChartLabel(trendText, concat("Trend: ", concat("Short Term ", if (ShortTermTrendSlope > 0) then "Up"
else "Down")), Color.white);
AddChartLabel(trendText, concat("Mid Term ", if (MiddleTermTrendSlope > 0) then "Up" else "Down"), Color.white);
AddChartLabel(trendText, concat("Long Term ", if (LongTermTrendSlope > 0) then "Up" else "Down"), Color.white);
Thanks for your reply. Sometimes abreviations get me confused until I learn them well. Anyway, I thought that I'd see what it looks like to have the trend labels change colors for their ups and downs.
AddChartLabel(trendText, concat("Trend: ", concat("Short Term ", if (ShortTermTrendSlope > 0) then "Up" else "Down")), if (ShortTermTrendSlope > 0) then Color.green else Color.red);
AddChartLabel(trendText, concat("Mid Term ", if (MiddleTermTrendSlope > 0) then "Up" else "Down"), if (MiddleTermTrendSlope > 0) then Color.green else Color.red);
AddChartLabel(trendText, concat("Long Term ", if (LongTermTrendSlope > 0) then "Up" else "Down"), if (LongTermTrendSlope > 0) then Color.green else Color.red);
Also, I thought I'd test a differrent color for the lime green price bars, because to me lime green is too close in color to green. This way I'd add a little contrast to the price bar colors.
AssignPriceColor( if colorBars and shortTermTrendSlope > 0 and MiddleTermTrendSlope > 0 and longtermtrendslope > 0 then CreateColor(0, 255, 0)
else if colorBars and shortTermTrendSlope > 0 and MiddleTermTrendSlope > 0 and longtermtrendslope < 0 then Color.green else if
colorBars and shortTermTrendSlope > 0 and MiddleTermTrendSlope < 0 and longtermtrendslope < 0 then CreateColor(124, 116, 228) else if
colorBars and shortTermTrendSlope < 0 and MiddleTermTrendSlope < 0 and longtermtrendslope < 0 then Color.red else if
colorBars and shortTermTrendSlope < 0 and MiddleTermTrendSlope > 0 and longtermtrendslope > 0 then CreateColor(0, 255, 255) else if
colorBars and shortTermTrendSlope < 0 and MiddleTermTrendSlope < 0 and longtermtrendslope > 0 then color.orange
else if colorBars then Color.yellow else GetColor(7));
I though it would be good to have chart labels for the color codes of the price bars, so I made some code for it. Unfortunaltely, the labels are kind of wide. Any suggestions on what to do to get these labels to fit the screen would be helpful.
# SJ_PlotVolumeLabels
plot Shares = Volume;
Shares.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
# Shares.HideTitle();
# Trend Definitions
rec fiveDaysSma = compoundValue(5, Average(close, 5)[0], Double.NaN);
def LongTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = 40)[0];
def MiddleTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = 15)[0];
def ShortTermTrendSlope = LinearRegressionSlope(price = fiveDaysSma, length = 5)[0];
######
# Candle definitions
Shares.AssignValueColor( if shortTermTrendSlope > 0 and MiddleTermTrendSlope > 0 and longtermtrendslope > 0 then CreateColor(0, 255, 0)
else if shortTermTrendSlope > 0 and MiddleTermTrendSlope > 0 and longtermtrendslope < 0 then Color.green else if
shortTermTrendSlope > 0 and MiddleTermTrendSlope < 0 and longtermtrendslope < 0 then CreateColor(124, 116, 228) else if
shortTermTrendSlope < 0 and MiddleTermTrendSlope < 0 and longtermtrendslope < 0 then Color.red else if
shortTermTrendSlope < 0 and MiddleTermTrendSlope > 0 and longtermtrendslope > 0 then CreateColor(0, 255, 255) else if
shortTermTrendSlope < 0 and MiddleTermTrendSlope < 0 and longtermtrendslope > 0 then color.orange
else GetColor(7));
AddChartLabel(Yes, "green - short term up, mid term up, long term up", color.green);
AddChartLabel(Yes, "light green - short term up, mid term up, long term down", color.light_green);
AddChartLabel(Yes, "lime green bar - short term up, mid term down, long term down", color.lime);
AddChartLabel(Yes, "red bar - short term down, mid term down, long term down", color.red);
AddChartLabel(Yes, "lime green bar - short term down, mid term up, long term up", color.lime);
AddChartLabel(Yes, "orange bar - short term down, mid term down, log term up", color.orange);
AddChartLabel(Yes, "yellow bar - anything not matching the above", color.yellow);