NexusFi: Find Your Edge


Home Menu

 





Trigger alert when large increase in volume on 1 min timeframe


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,778 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Trigger alert when large increase in volume on 1 min timeframe

  #1 (permalink)
asianraisin
houston tx
 
Posts: 1 since Nov 2019
Thanks Given: 0
Thanks Received: 0

Hello,

I am trying to find a way to create an alert for when there is a large spike in volume, like 10x more than average.
While researching this, I actually came across another post (from about 5 years ago) that is exactly like what I'm looking for.

I'm not able to post links due to my account being new, however if you search for "Trigger Alert when %age in Volume Changes Within Timeframe" the post should come up.

A user (@staspo) replied to this post from 2014 with what looks like a promising code, but for the life of me, I can not get it figured out.
Here is the post he provided:

Quoting 
I had exactly the same question and eventually I found the solution - please see below:

def afterStart = secondsfromtime(1000)>0;
def beforeEnd = secondstilltime(1530)>0;
def conditionTrue = volume > 10*average(volume, 390);
plot alert = afterStart and beforeEnd and conditionTrue;

This alert will pop up when there is a volume spike in the stock. Please note - when you set the alert you should choose your aggregation period. I have chosen 5 min as I work with 5 min candles. You asked about 1 or 2 min, so you will have to set it to 1 or 2 min. The following values are used in this particular example:

1. afterStart is set to 1000 - meaning 10:00am, i.e. the alert will ignore any volume spikes in the first 30 minutes of trading because based on my experience, most of the stocks have increased volume during the first 30 minutes of trading, so if you dont ignore, you will have a lot of alerts (depending on how many stocks you are watching).

2. beforeEnd is set to 1530 - meaning 15:30 (3:30pm) same logic as above, but for the end of the trading day.

3. volume > 10 - meaning the volume of the current bar/candle is higher 10 times than the average for the last 390 bars/candles.

4. 390 - I set it to 390 because I'm using the aggregation period of 5 min, so for the whole trading day it's 5min x 390 = 6 hours and 30 min which is the length of the trading day.

So you will have to play with the values to fit them to your needs. I believe same logic will work for the price.

I am pretty new to thinkscript, but just to confirm that I'm entering this code in the correct place, I go to MarketWatch > Study Alert and enter the code in the Thinkscript editor and press Create Alert. When I do this, the alert is immediately triggered and no longer active. Can someone please help me? I'm trying to get this alert to stay active and simply alert me each time there is a large spike in volume but am having some difficulty. And what do I need to do to have this on the 1 minute aggregation. The goal is to catch large moves as soon as they're happening, like with Disney yesterday.

Thanks for taking time to read my post. Any help is greatly appreciated!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #2 (permalink)
GreegT
Fernley NV/USA
 
Posts: 7 since Nov 2019
Thanks Given: 3
Thanks Received: 3

You could duplicate a volume study and add something like:

input volumeinputname = 100000;
Alert(volume >= volumeinputname, GetSymbol() + " " + GetSymbol() + " " + GetSymbol() + " " + high, Alert.BAR, Sound.Ding);

Reply With Quote




Last Updated on December 13, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts