satyarishi
New member
@Ben - I have this alert set. Wondering how this scanner missed KODK ticker symbol today. I checked my message center and I don't see any alert getting generated for KODK.
No I didn't load@satyarishi Did you have KODK loaded on your chart during the time?
def VWAP = vwap(); # Changed this from plot to def and commented out bearish plot at the end as well as the scanner can only have one plot for creating watch list
#plot UpperBand = price + numDevUp * deviation;
#plot LowerBand = price + numDevDn * deviation;
#VWAP.setDefaultColor(getColor(0));
# Start Volume
input length = 20;
def Vol = volume;
def VolAvg = Average(volume, length);
def above_volume = Vol crosses above VolAvg;
def bullish_vwap = close crosses above VWAP;
plot bull = above_volume and bullish_vwap;
bull.AssignValueColor(Color.CYAN);
bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#def bearish_vwap = close crosses below VWAP;
#plot bear = above_volume and bearish_vwap;
#bear.AssignValueColor(Color.CYAN);
#bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
def above_volume = Vol crosses above VolAvg;
def above_volume = Vol > VolAvg;
# VWAP Breakout Above Average Volume
# Assembled by BenTen at useThinkScript.com
input price_EMA = close;
input length_EMA = 200;
input displace_EMA = 0;
def AvgExp = ExpAverage(price_EMA[-displace_EMA], length_EMA);
def condition_ema = close > AvgExp;
# Start 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));
plot VWAP = price;
#plot UpperBand = price + numDevUp * deviation;
#plot LowerBand = price + numDevDn * deviation;
VWAP.setDefaultColor(getColor(0));
# Start Volume
input length = 20;
def Vol = volume;
def VolAvg = Average(volume, length);
def above_volume = Vol > VolAvg;
def bullish_vwap = close crosses above VWAP;
plot bull = above_volume and bullish_vwap and condition_ema;
bull.AssignValueColor(Color.CYAN);
bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
def bearish_vwap = close crosses below VWAP;
plot bear = above_volume and bearish_vwap;
bear.AssignValueColor(Color.CYAN);
bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
How do you disable extended hours on the scanner?@vmseller Did you select the correct timeframe? Do you have pre-market enabled on your chart? If not, you would have to disable extended hours for your scanner as well.
oh just seeing this--I do not know how to disable it on the scanner, I even called TD and they said it was not an option to do so but I know you said it was and you know more than they do-lol. Also, what time frame should we use for this? I read somewhere on here that you said it works with what ever time frame you want, did I read that wrong?How do you disable extended hours on the scanner?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
RSI (or MACD) with VWAP & MA & div for ThinkOrSwim | Indicators | 11 | ||
J | High/Low Anchored VWAP For ThinkOrSwim | Indicators | 16 | |
Opening Range Indicator with Measured Moves and VWAP For ThinkOrSwim | Indicators | 44 | ||
RSI-VWAP Indicator for ThinkorSwim | Indicators | 68 | ||
Squeeze Clouds based on SMA and VWAP | Indicators | 7 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.