HI All, Any idea why my bubble for SignalDLBN isn't plotting? The bar with the pink circle is the one I want. Thanks as always!
AddChartBubble( bn == SignalDLBN, low, "The One I Want", Color.white,no);
AddChartBubble( bn == SignalDLBN, low, "The One I Want", Color.white,no);
Code:
#######################################################################################################
#PIVOT SECTION
input LBPeriod = 10;
def bn = barnumber();
def agg15 = getaggregationperiod();
def HH15 = Highest(high(Period = agg15), LBPeriod);
def marketHigh15 = if HH15 > HH15[-LBPeriod] then HH15 else HH15[-LBPeriod];
def markedHigh15 = high(Period = agg15) == marketHigh15;
def PivotHigh15 = CompoundValue(1, if IsNaN( markedHigh15) then PivotHigh15[1] else if markedHigh15 then high(Period = agg15) else PivotHigh15[1], high(Period = agg15));
def LastPivotHigh15 = if PivotHigh15 != PivotHigh15[1] then PivotHigh15[1] else LastPivotHigh15[1];
#-------------------------------------------------------------
plot PH = PivotHigh15;
#--------------------------------------------------------------
def LL15 = Lowest(low(Period = agg15), LBPeriod);
#--------------------------------------------------------------
def marketLow15 = if LL15 < LL15[-LBPeriod] then LL15 else LL15[-LBPeriod];
def markedLow15 = low(Period = agg15) == marketLow15;
def PivotLow15 = CompoundValue(1, if IsNaN(markedLow15) then PivotLow15[1] else if markedLow15 then low(Period = agg15) else PivotLow15[1], low(Period = agg15));
#-------------------------------------------------------------
plot PL = PivotLow15 ;
#-------------------------------------------------------------
#--------------------------------------------------------------
PH.SetPaintingStrategy(PaintingStrategy.POINTS);
PH.SetDefaultColor(Color.Light_GREEN);
PH.Setlineweight(3);
#--------------------------------------------------------------
PL.SetPaintingStrategy(PaintingStrategy.POINTS);
PL.SetDefaultColor(Color.PINK);
PL.Setlineweight(3);
##SHORT
def PHCount = if bn == 1 then 0 else if high == ph then PHCount[1] + 1 else PHCount[1];
def PHCountMax = HighestAll(PHCount);
def PHRevCount = PHCountMax - PHCount + 1;
def LastPHBN = if PHRevCount == 2 and PHRevCount[1] == 3 then bn else LastPHBN[1];
def LastPHPrice = if bn == LastPHBN then high else LastPHPrice[1];
def LastPHCross = if high crosses above LastPHPrice then bn else LastPHCross[1];
def HighestCross = highestall(LastPHCross);
def BnPastCross = bn >= HighestCross;
def highesthi = if BnPastCross and high == highest(high) then bn else highesthi[1];
def Hightsthibn = highestall(highesthi);
AddChartBubble( bn==Hightsthibn, high, "HH", Color.yellow);
def DispLowbn = if low < low[1] and low < low[-1] then bn else 0 ;
def HighestDispLowBn = highestall(DispLowbn);
def SignalDLBN = if bn > Hightsthibn then 0 else HighestDispLowBn;
AddChartBubble( bn == DispLowbn, low, "All DL BN's", Color.RED,no);
AddChartBubble( bn == SignalDLBN, low, "The One I Want", Color.white,no);