SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : Buy and Sell Signals, and Other Market Perspectives -- Ignore unavailable to you. Want to Upgrade?


To: mark2market who wrote (93707)6/23/2017 10:33:54 AM
From: Wayners  Respond to of 223379
 
This will show you when the HA candles will flip color. It extrapolates out one bar to give a best estimate of where the cloud will be on the next candle. It assumes where the cloud would be if the current candle closed right now and a new candle began at the current price.

input agg = AggregationPeriod.DAY;

def haclose = (open(period = agg) + high(period = agg) + low(period = agg) + close(period = agg)) / 4;
def haopen = CompoundValue(1, (haopen[1] + haclose[1]) / 2, (open(period = agg)[1] + close(period = agg)[1]) / 2);
def haproject = (haopen[1] + haclose[1]) / 4 + (open(period = agg) + high(period = agg) + low(period = agg) + close(period = agg)) / 8;
def currentbarnumber = HighestAll(If(IsNaN(close), 0, barNumber()));
#in the following, the forecast is the then statement and the else statement is all other bars
plot flip = if BarNumber() <= currentbarnumber
then
8 * haproject[1] - 2 * (haopen[1] + haclose[1]) - open(period = agg) - high(period = agg) - low(period = agg)
else
8 * haproject[1] - 2 * (haopen[1] + haclose[1]) - 3 * close(period = agg)[1] ;
def zero = 0;
flip.SetLineWeight(3);
flip.SetDefaultColor(Color.VIOLET);
AddCloud(flip, zero, Color.PINK, Color.PINK);



To: mark2market who wrote (93707)6/23/2017 10:36:39 AM
From: Wayners  Respond to of 223379
 
This will draw a pivot line through the HA candles. Prices going below the pivot will tend to flip the next candle but it really shows you the center of mass. Its usefull as a crossover system against your favorite moving average or price level.

input agg = AggregationPeriod.DAY;

def haclose = (open(period = agg) + high(period = agg) + low(period = agg) + close(period = agg)) / 4;
def haopen = CompoundValue(1, (haopen[1] + haclose[1]) / 2, (open(period = agg)[1] + close(period = agg)[1]) / 2);
plot haproject = (haopen[1] + haclose[1]) / 4 + (open(period = agg) + high(period = agg) + low(period = agg) + close(period = agg)) / 8;
haproject.setlineweight(3);
haproject.setdefaultcolor(color.white);



To: mark2market who wrote (93707)6/23/2017 10:38:07 AM
From: Wayners  Read Replies (1) | Respond to of 223379
 
This is the bollinger band cloud I use to estimate targets. When something goes into or out of the pink cloud while also going into or out of the blue bollinger cloud...I buy or sell.

input agg=aggregationperiod.day;
def price = close(period=agg);
input displace = 0;
input length = 33;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input averageType = AverageType.Simple;

def sDev = stdev(data = price[-displace], length);

plot MidLine = MovingAverage(averageType, data = price[-displace], length = length);
def LowerBand = MidLine + num_Dev_Dn * sDev;
def UpperBand = MidLine + num_Dev_Up * sDev;

MidLine.SetDefaultColor(Color.Orange);
midline.setlineweight(3);

input agg2=aggregationperiod.day;
def price2 = close(period=agg);
input displace2 = 0;
input length2 = 66;
input Num_Dev_Dn2 = -2.0;
input Num_Dev_up2 = 2.0;
input averageType2 = AverageType.Simple;

def sDev2 = stdev(data = price2[-displace2], length = length2);

def MidLine2 = MovingAverage(averageType2, data = price2[-displace2], length = length2);
def LowerBand2 = MidLine2 + num_Dev_Dn2 * sDev2;
def UpperBand2 = MidLine2 + num_Dev_Up2 * sDev2;

addcloud(upperband,upperband2,color.cyan,color.cyan);
addcloud(lowerband,lowerband2,color.cyan,color.cyan);

def slope = (midline - midline[2])/2;
def projslope = if !isNan(close(period=agg)) then slope else projslope[1];
def projline = if !isNan(close(period=agg)) then midline else projline[1] + projslope;
plot line2 = projline;
line2.setlineweight(3);
line2.setdefaultcolor(color.orange);