Merry Christmas. A holiday contribution since it is so colorful with the red and green of the season. Developed by C-Deck with some instructions for use in the header of the code. All the combo and dot lovers rejoice.
Code:
# MyCollection
#
# Developed by C-Deck
#
# All indicators (green = Buy) .. (Red = Sell)
# except ADX blue means trending .. white means range-bound
# Last three are my entry signals.
declare lower;
input MA_Price = Close;
input MA1Length = 3;
input MA2Length = 5;
input MA3Length = 8;
input MA4Length = 13;
input MA5Length = 21;
input MA6Length = 34;
def ma1 = Average(MA_Price, MA1Length);
def MA2 = Average(MA_Price, MA2Length);
def ma3 = Average(MA_Price, MA3Length);
def ma4 = Average(MA_Price, MA4Length);
def ma5 = Average(MA_Price, MA5Length);
def ma6 = Average(MA_Price, MA6Length);
Plot topline = 1.13;
topline.HideBubble();
#topline.Hide();
topline.AssignValueColor( Color.black);
Plot MA1S = if !IsNaN(close) then 1.1 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 1.1, concat( "MA-" , MA1Length), color.White, yes);
MA1S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
MA1S.AssignValueColor(
if close > MA1 then Color.Green
else Color.Red);
MA1S.HideBubble();
Plot MA2S = if !IsNaN(close) then 1.05 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 1.05, concat( "MA-" , MA2Length), color.White, yes);
MA2S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
MA2S.AssignValueColor(
if close > MA2 then Color.Green
else Color.Red);
MA2S.HideBubble();
Plot MA3S = if !IsNaN(close) then 1 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close ,1, concat( "MA-" , MA3Length), color.White, yes);
MA3S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
MA3S.AssignValueColor(
if close > MA3 then Color.Green
else Color.Red);
MA3S.HideBubble();
Plot MA4S = if !IsNaN(close) then 0.95 else double.Nan;
MA4S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
AddChartBubble(IsNaN(MA1[-1]) && close , 0.95, concat( "MA-" , MA4Length), color.White, yes);
MA4S.AssignValueColor(
if close > MA4 then Color.Green
else Color.Red);
MA4S.HideBubble();
Plot MA5S = if !IsNaN(close) then 0.90 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close ,0.9, concat( "MA-" , MA5Length), color.White, yes);
MA5S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
MA5S.AssignValueColor(
if close > MA5 then Color.Green
else Color.Red);
MA5S.HideBubble();
Plot MA6S = if !IsNaN(close) then 0.85 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.85, concat( "MA-" , MA6Length), color.White, yes);
MA6S.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
MA6S.AssignValueColor(
if close > MA6 then Color.Green
else Color.Red);
MA6S.HideBubble();
###########################################################
input TS_price = close;
input TS_length = 9;
input bar_plus = 4;
def TSF = Inertia(TS_price, TS_length) - LinearRegressionSlope(TS_price, TS_length) * bar_plus;
plot TSFvalue = if !IsNaN(close) then 0.8 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.8, concat( "TimeSeries" , ""), color.White, yes);
TSFvalue.SetPaintingStrategy(paintingStrategy.liNE_VS_TRIANGLES);
TSFvalue.AssignValueColor(
if close > TSF then Color.Green
else Color.Red);
TSFvalue.HideBubble();
########################################################
input ADXlength = 8;
def ADX = DMI(ADXlength).ADX;
plot ADXCross = if !IsNaN(close) then 0.75 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.73, "ADX-DMI" , color.White, yes);
ADXCross.SetPaintingStrategy(paintingStrategy.line);
ADXCross.AssignValueColor(
if ADX > 25 then Color.Blue
else Color.White);
ADXCross.SetLineWeight(4);
ADXCross.HideBubble();
########################################################
input DMIlength = 13;
def hiDiff = high - high[1];
def loDiff = low[1] - low;
def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0;
def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0;
def ATR = WildersAverage(TrueRange(high, close, low), DMIlength);
Def DIPlus = 100 * WildersAverage(plusDM, DMIlength) / ATR;
Def DIMinus = 100 * WildersAverage(minusDM, DMIlength) / ATR;
Plot dmiSignal = if !IsNaN(close) then 0.73 else double.Nan;
dmiSignal.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
dmiSignal.AssignValueColor(
if DIPlus > DIMinus then Color.Green
else if DIMinus > DIPlus then Color.Red
else Color.White);
dmiSignal.HideBubble();
##############################################
input Fishlength = 7;
def maxHigh = Highest(high, FISHlength);
def minLow = Lowest(low, FISHlength);
rec value = if maxHigh - minLow == 0 then 0 else 0.66 * ((HL2 - minLow) / (maxHigh - minLow) - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
rec fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);
plot FT = if !IsNaN(close) then 0.65 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.65, "Fisher" , color.White, yes);
FT.SetPaintingStrategy(paintingStrategy.liNE_VS_TRIANGLES);
FT.AssignValueColor(
if fish > fish[1] then Color.Green
else Color.Red);
FT.HideBubble();
#################################################
input averageType = {Simple, Exponential, default Weighted, Wilders, Hull, Disabled};
input BoPlength = 16;
def rawBMP = if high != low then (close - open) / (high - low) else 1;
def BMP;
switch (averageType) {
case Simple:
BMP = Average(rawBMP, BoPlength);
case Exponential:
BMP = ExpAverage(rawBMP, BoPlength);
case Weighted:
BMP = wma(rawBMP, BoPlength);
case Wilders:
BMP = WildersAverage(rawBMP, BoPlength);
case Hull:
BMP = HullMovingAvg(rawBMP, BoPlength);
case Disabled:
BMP = rawBMP;
}
plot BoP = if !IsNaN(close) then 0.6 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.6, "BoP" , color.White, yes);
BoP.SetPaintingStrategy(paintingStrategy.liNE_VS_SQUARES);
BoP.AssignValueColor(
if BMP > 0 then Color.Green
else Color.Red);
BoP.HideBubble();
########################################################
input percentDLength = 3;
input percentKLength = 5;
def min_low = Lowest(low, percentKLength);
def max_high = Highest(high, percentKLength);
def rel_diff = close - (max_high + min_low) / 2;
def diff = max_high - min_low;
def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength);
def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength);
def SMI = avgrel / (avgdiff / 2) * 100;
def AvgSMI = ExpAverage(smi, percentDLength);
#def diffr = smi - avgsmi;
plot SM = if !IsNaN(close) then 0.55 else double.Nan;
AddChartBubble(IsNaN(MA1[-1]) && close , 0.55, "Stoc-Mom" , color.White, yes);
SM.SetPaintingStrategy(paintingStrategy.liNE_VS_TRIANGLES);
SM.AssignValueColor(
if smi > avgsmi then Color.Green
else Color.Red);
SM.HideBubble();