Trying to update the Candle Pattern presented by JT_479 (really like this for Price Action)....
Trying to eliminate a plot (extended lines) before the condition is met. If you run a fit studies, there is always a bunch of garbage on the zero line until a condition it met.
I've ran out of ideas, Ignorance meter is pegged, and deferring to the Wizards.... This should be coding 101.
Here is a snippet of code I'm working with, I figure this out I can fix the rest.
This code will plot a Bull support on a Bullish Engulfing pattern.
Problem is it plots at Zero Line before a Bull Support is defined
Trying to eliminate a plot (extended lines) before the condition is met. If you run a fit studies, there is always a bunch of garbage on the zero line until a condition it met.
I've ran out of ideas, Ignorance meter is pegged, and deferring to the Wizards.... This should be coding 101.
Here is a snippet of code I'm working with, I figure this out I can fix the rest.
This code will plot a Bull support on a Bullish Engulfing pattern.
Problem is it plots at Zero Line before a Bull Support is defined
Code:
#----------------------------------------------------------
#Bullish Engulfing - A Bottom Reversal. The bullish candle wraps around the entire body of the previous candle in a downtrend. Lowest low of the two sessions is Support.
#----------------------------------------------------------
#def Supportcount = 0;
def IsUp = close > open;
def IsDown = close < open;
def BullEngulf =
IsDescending(close, 3)[2] and
IsDown[1] and
IsUp[0] and
open[1] < close[0] and
close[1] >= open[0];
def barNumber = BarNumber();
plot BullSupport = if BullEngulf and low > low [1] then low[1] else if BullEngulf and low <= low[1] then low else Double.NaN;
def Supportcount = if (BullSupport) then 1 else 0;
BullSupport.SetPaintingStrategy(PaintingStrategy.DASHES);
BullSupport.SetDefaultColor(Color.DARK_ORANGE);
BullSupport.SetLineWeight(2);
def Bullext = if IsNaN(BullSupport)then Bullext[1] else BullSupport;
#Problem Child inhibit plot before BullSuppot defined
plot Bullextline = Bullext;
Bullextline.SetPaintingStrategy(PaintingStrategy.DASHES);
Bullextline.SetDefaultColor(Color.DARK_ORANGE);
#----------------------------------------------------------------------------------------------
#----------------------------------------
AssignPriceColor(if BullEngulf then Color.YELLOW else Color.CURRENT);
Last edited: