mod note:
Hello All -
The below TOS indicator attempts to determine likelihood of an upcoming reversal, pullback, or scalp opportunity from a 1 min chart. Could be used for .20 cent moves or potential full reversal points for a hold and run.
The indicator finds opportunities by candle formation, VWAP, and Intraday Momentum.
Yellow arrows = bounce in a up/down trend towards the current trend. If above VWAP and sharp pull back towards VWAP, it will look to find a location where it might bounce and continue higher/lower. These usually happen closer to VWAP.
Blue arrows = bounce from a low or high point in a up/downtrend back towards VWAP.
These point can also be used as points of trade failure to change from long to short or vise-versa.
This main has shown promise on the 1min charts.
Includes alerts as well.
aggregate min alerts on a lower min chart:
It should be noted, that members on this thread have commented that the indicator is "broken" because they don't get signals. It is not broken. However, the candle pattern / vwap confluence is not common.
While signals from this indicator are infrequent; when triggers do occur they are worth reviewing.
As they mean:
Something Interesting This Way Comes!
Hello All -
The below TOS indicator attempts to determine likelihood of an upcoming reversal, pullback, or scalp opportunity from a 1 min chart. Could be used for .20 cent moves or potential full reversal points for a hold and run.
The indicator finds opportunities by candle formation, VWAP, and Intraday Momentum.
Yellow arrows = bounce in a up/down trend towards the current trend. If above VWAP and sharp pull back towards VWAP, it will look to find a location where it might bounce and continue higher/lower. These usually happen closer to VWAP.
Blue arrows = bounce from a low or high point in a up/downtrend back towards VWAP.
These point can also be used as points of trade failure to change from long to short or vise-versa.
This main has shown promise on the 1min charts.
Includes alerts as well.
Code:
#RCONNER7 - 4/2020
#VWAP REVERSAL/BOUNCE - CANDLE FORMATION
#v1
# Length of the candle's wick
def UpperWick = high - Max(open, close);
def LowerWick = Min(open, close) - low;
def FullLength = AbsValue(high - low);
# Length of the candle's body
def CandleBody = AbsValue(open - close);
def AvgBodyFull = Round((CandleBody / FullLength) * 100, 1);
def smallbody = if AvgBodyFull < 10 then 1 else 0;
#VWAP
input numDevDn = -2.0;
input numDevUp = 2.0;
input timeFrame = {default DAY, WEEK, MONTH};
def cap = getAggregationPeriod();
def errorInAggregation =
timeFrame == timeFrame.DAY and cap >= AggregationPeriod.WEEK or
timeFrame == timeFrame.WEEK and cap >= AggregationPeriod.MONTH;
assert(!errorInAggregation, "timeFrame should be not less than current chart aggregation period");
def yyyyMmDd = getYyyyMmDd();
def periodIndx;
switch (timeFrame) {
case DAY:
periodIndx = yyyyMmDd;
case WEEK:
periodIndx = Floor((daysFromDate(first(yyyyMmDd)) + getDayOfWeek(first(yyyyMmDd))) / 7);
case MONTH:
periodIndx = roundDown(yyyyMmDd / 100, 0);
}
def isPeriodRolled = compoundValue(1, periodIndx != periodIndx[1], yes);
def volumeSum;
def volumeVwapSum;
def volumeVwap2Sum;
if (isPeriodRolled) {
volumeSum = volume;
volumeVwapSum = volume * vwap;
volumeVwap2Sum = volume * Sqr(vwap);
} else {
volumeSum = compoundValue(1, volumeSum[1] + volume, volume);
volumeVwapSum = compoundValue(1, volumeVwapSum[1] + volume * vwap, volume * vwap);
volumeVwap2Sum = compoundValue(1, volumeVwap2Sum[1] + volume * Sqr(vwap), volume * Sqr(vwap));
}
def price = volumeVwapSum / volumeSum;
def deviation = Sqrt(Max(volumeVwap2Sum / volumeSum - Sqr(price), 0));
def VWAP = price;
def UpperBand = price + numDevUp * deviation;
def LowerBand = price + numDevDn * deviation;
##True Range
input RangeGreater = .01;
def Range = TrueRangeindicator();
def OK_Range = if Range > RangeGreater then 1 else 0;
#IMI
input length = 21;
input smooth_length = 1;
def CloseOpenDiff = if close > open then close - open else 0;
def OpenCloseDiff = if close < open then open - close else 0;
def avgCloseOpen = Average(CloseOpenDiff, length);
def avgOpenClose = Average(OpenCloseDiff, length);
def IMI = avgCloseOpen / (avgCloseOpen + avgOpenClose) * 100;
#IMI.SetDefaultColor(GetColor(8));
def avgIMI = Average(IMI, smooth_length);
def IMI_VWAPLower = if low < LowerBand and avgIMI < 30 then 1 else 0;
def IMI_VWAPHigher = if high > UpperBand and avgIMI > 70 then 1 else 0;
def IMI_Low = if avgIMI < 30 then 1 else 0;
def IMI_High = if avgIMI > 70 then 1 else 0;
# Compare body to wicks
input CandleWickVar = 1.75;
def Hammer = (lowerWick / CandleBody >= CandleWickVar) and if smallbody then lowerwick > upperWick * candleWickVar else upperWick / CandleBody <= 1.33;
def STAR = (UpperWick / CandleBody >= CandleWickVar) and if smallbody then LowerWick * candleWickVar < UpperWick else (LowerWick / CandleBody <= 1.33);
#trend
input trendlookback = 10;
def uptrend = isAscending(open, trendlookback)[1];
def downtrend = isdescending(open, trendlookback)[1];
#lowest/Highest within
input HiLowLookback = 10;
def hh = high == Highest(high, HiLowLookback);
def ll = low == Lowest(low, HiLowLookback);
def bullVWAP = if open >= reference VWAP()."VWAP" and close >= reference VWAP()."VWAP" then 1 else 0;
def bearVWAP = if open <= reference VWAP()."VWAP" and close <= reference VWAP()."VWAP" then 1 else 0;
plot Hammer_Signal_IMI = Hammer and ll and bullVWAP and IMI_Low and OK_Range;
plot STAR_Signal_IMI = STAR and hh and bearVWAP and IMI_High and OK_Range;
#plot Hammer_Signal = Hammer and ll and bullVWAP and OK_Range and !Hammer_Signal_IMI and downtrend;
#plot STAR_Signal = STAR and hh and bearVWAP and OK_Range and !STAR_Signal_IMI and uptrend;
plot BullRev = Hammer and ll and IMI_VWAPLower and OK_Range;
plot BearRev = STAR and hh and IMI_VWAPHigher and OK_Range;
#Hammer_Signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#Hammer_Signal.AssignValueColor(Color.GREEN );
Hammer_Signal_IMI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Hammer_Signal_IMI.AssignValueColor(Color.YELLOW);
BullRev.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BullRev.AssignValueColor(Color.BLUE );
#STAR_Signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#STAR_Signal.AssignValueColor(Color.GREEN );
STAR_Signal_IMI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
STAR_Signal_IMI.AssignValueColor(Color.YELLOW);
BearRev.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
BearRev.AssignValueColor(Color.BLUE );
alert(Hammer_Signal_IMI or BullRev, "BUY BUY BUY", Alert.Bar, Sound.Bell);
alert(STAR_Signal_IMI or BearRev, "SELL SELL SELL", Alert.Bar, Sound.Ring);
aggregate min alerts on a lower min chart:
Code:
#RCONNER7 - 5/2020
#VWAP REVERSAL/BOUNCE - Priace Action Candles
#v2 - input forced aggregation - example -- set to 3min for alerts when viewing 1min chart
# agg total arrows should show. Proper entry to should done after low or high of those agg candles.
# Length of the candle's wick
input agg = aggregationPeriod.THREE_MIN;
def UpperWick = high(period = agg) - Max(open(period = agg), close(period = agg));
def LowerWick = Min(open(period = agg), close(period = agg)) - low(period = agg);
def FullLength = AbsValue(high(period = agg) - low(period = agg));
# Length of the candle's body
def CandleBody = AbsValue(open(period = agg) - close(period = agg));
def AvgBodyFull = Round((CandleBody / FullLength) * 100, 1);
def smallbody = if AvgBodyFull < 10 then 1 else 0;
#VWAP
def VWAP = reference VWAP()."VWAP";
def UpperBand = reference VWAP()."UpperBand";
def LowerBand = reference VWAP()."LowerBand";
##True Range
input RangeGreater = .02;
def Range = TrueRangeindicator();
def OK_Range = if Range > RangeGreater then 1 else 0;
#IMI
input length = 21;
#input smooth_length = 1;
def CloseOpenDiff = if close(period = agg) > open(period = agg) then close(period = agg) - open(period = agg) else 0;
def OpenCloseDiff = if close(period = agg) < open(period = agg) then open(period = agg) - close(period = agg) else 0;
def avgCloseOpen = Average(CloseOpenDiff, length);
def avgOpenClose = Average(OpenCloseDiff, length);
def IMI = avgCloseOpen / (avgCloseOpen + avgOpenClose) * 100;
#IMI.SetDefaultColor(GetColor(8));
#def avgIMI = Average(IMI, smooth_length);
def IMI_VWAPLower = if low(period = agg) < LowerBand and IMI < 30 then 1 else 0;
def IMI_VWAPHigher = if high(period = agg) > UpperBand and IMI > 70 then 1 else 0;
def IMI_Low = if IMI < 30 then 1 else 0;
def IMI_High = if IMI > 70 then 1 else 0;
# Compare body to wicks
input CandleWickVar = 1.76;
def Hammer = (lowerWick / CandleBody >= CandleWickVar) and if smallbody then lowerwick > upperWick * candleWickVar else upperWick / CandleBody <= 1.33;
def STAR = (UpperWick / CandleBody >= CandleWickVar) and if smallbody then LowerWick * candleWickVar < UpperWick else (LowerWick / CandleBody <= 1.33);
#trend
#input trendlookback = 10;
#def uptrend = isAscending(open, trendlookback)[1];
#def downtrend = isdescending(open, trendlookback)[1];
#lowest/Highest within
input HiLowLookback = 10;
def hh = high(period = agg) == Highest(high(period = agg), HiLowLookback);
def ll = low(period = agg) == Lowest(low(period = agg), HiLowLookback);
def bullVWAP = if open(period = agg) >= VWAP and close(period = agg) >= VWAP then 1 else 0;
def bearVWAP = if open(period = agg) <= VWAP and close(period = agg) <= VWAP then 1 else 0;
plot Hammer_Signal_IMI = Hammer and ll and bullVWAP and IMI_Low and OK_Range;
plot STAR_Signal_IMI = STAR and hh and bearVWAP and IMI_High and OK_Range;
#plot Hammer_Signal = Hammer and ll and bullVWAP and OK_Range and !Hammer_Signal_IMI and downtrend;
#plot STAR_Signal = STAR and hh and bearVWAP and OK_Range and !STAR_Signal_IMI and uptrend;
plot BullRev = Hammer and ll and IMI_VWAPLower and OK_Range;
plot BearRev = STAR and hh and IMI_VWAPHigher and OK_Range;
#Hammer_Signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#Hammer_Signal.AssignValueColor(Color.GREEN );
Hammer_Signal_IMI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#Hammer_Signal_IMI.AssignValueColor(Color.YELLOW);
BullRev.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#BullRev.AssignValueColor(Color.BLUE );
#STAR_Signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#STAR_Signal.AssignValueColor(Color.GREEN );
STAR_Signal_IMI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#STAR_Signal_IMI.AssignValueColor(Color.YELLOW);
BearRev.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#BearRev.AssignValueColor(Color.BLUE );
alert(Hammer_Signal_IMI or BullRev, "3MIN BUY BUY BUY", Alert.Bar, Sound.Bell);
alert(STAR_Signal_IMI or BearRev, "3MIN SELL SELL SELL", Alert.Bar, Sound.Ring);
Last edited by a moderator: