Questions About Alerts In ThinkOrSwim

Brady0524

New member
The thinkscript study I created and shared yesterday, I try to use it in setting alert. But was unable to do it. The "OK" button stayed grayed out and was not available for me to continue to the alert. Then I saw the following message: "rec usage is not allowed in this context"

I'm looking to set up Conditional Study Alerts found under MarketWatch tab. In particular I wish to use the Languerre RSI, along with a few other conditions, to trigger alert to phone. The problem is the Rec Coding. If you enter this L-RSI into the study alert tab you get the statement found in the title. I was wondering if there was a work around. Thanks.
 
Ideally I would like the label to change color every second
Color changes are based on conditions that are triggered on the 18 pre-defined aggregation periods. The ToS platform does not support color changes in 1 second intervals.

When I use alerts and the message pops up, there is too much writing on it
When setting up your alerts, scroll down and you can choose what 'writing' you want on it.

The main problem is that the alert message doesn't stay up long enough.
Detach the message center, you will see your alerts all day.

There are two alert sounds that are the same sounds you hear when your entry or exit orders go through.
When setting up your alerts. Scroll down and choose from the standard FOUR ToS alerts or set up your custom alert.

Read more:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58010
https://usethinkscript.com/threads/tos-internal-audio-files.4689/
 
Last edited:
Color changes are based on conditions that are triggered on the 18 pre-defined aggregation periods. The ToS platform does not support color changes in 1 second intervals.


When setting up your alerts, scroll down and you can choose what 'writing' you want on it.


Detach the message center, you will see your alerts all day.


When setting up your alerts. Scroll down and choose from the standard FOUR ToS alerts or set up your custom alert.

Read more:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-58010
https://usethinkscript.com/threads/tos-internal-audio-files.4689/
Yea, I understand all of that, but it never occurred to me to detach the message center. Thank you so much for the tip. However, I don't have very much screen real estate to dedicate to a detached message center and if I did I'd probably put a chart there.

I have loaded custom alerts into TOS. I wish we could use them with our indicators. That would be so sweet. Right now we sort of can. We can't code the alert into our scripts but we can go to the alerts page and click on study alerts and create one based on an indicator but only for a certain symbol.

As far as there being too much 'writing' (should have typed text instead), I meant that when the blue box pops up in the top left corner of the screen it has a bunch of text on it and it's hard to get to the message part of the popup, the text that you typed into the "notes" section when setting up the alert. I actually chatted with a rep the other day about this and he suggested that I right click on the message popup. Doing this makes the popup stay up for a little longer to give you a chance to read it. Good enough for me.

But getting to the main question about color changing labels... I understand that the color of the label is conditional. I was wondering if maybe there was a condition that someone has thought of that you could base a color on to make it change, maybe not every second but make it change rapidly. I look at the "Last" column of my watch list and see the prices flashing red and green and wonder if we could make our labels do the same or something similar. I think that the only way to do this is to write a bunch of lines of conditions and give them different colors. But that is too cumbersome and quite lame. My ultimate conclusion is that it can't be done and was probably a lame question to begin with and a waste of time. But was a cool thought imo. IDK shrug
 
https://ibb.co/LkZR80w

I have this script that paints an arrow whenever it's condition is true.
I added it to a scan.
The scan alert should only alert me when its within 1 bars (like it shows in the picture) however it'll still alert me
when its IDK? up to 7 bars back?
What did I do wrong?
I think its a problem within the script itself? thanks

Code:
def price = close;
input length = 3;
def displace = 0;
#input showBreakoutSignalss = no;

def AvgExp = ExpAverage(price[-displace], length);
#def UpSignal = price crosses above AvgExp;
#def DownSignal = price crosses below AvgExp;

def price2 = close;
input length2 = 9;
def displace2 = 0;
#input showBreakoutSignalss2 = no;

def AvgExp2 = ExpAverage(price2[-displace2], length2);
#def UpSignal2 = price2 crosses above AvgExp2;
#def DownSignal2 = price2 crosses below AvgExp2;

def price3 = close;
input length3 = 20;
def displace3 = 0;
#input showBreakoutSignalss3 = no;

def AvgExp3 = ExpAverage(price3[-displace3], length3);
#def UpSignal3 = price3 crosses above AvgExp3;
#def DownSignal3 = price3 crosses below AvgExp3;

def price4 = close;
input length4 = 30;
def displace4 = 0;
#input showBreakoutSignalss4 = no;

def AvgExp4 = ExpAverage(price4[-displace4], length4);
#def UpSignal4 = price4 crosses above AvgExp4;
#def DownSignal4 = price4 crosses below AvgExp4;

#input over_bought = 80;
#input over_sold = 20;
input KPeriod = 5;
input DPeriod = 3;
def priceH = high;
def priceL = low;
def priceC = close;
input slowing_period = 3;
def beyondType = AverageType.SIMPLE;
input showBreak = {default "No", "On FullK", "On FullD", "On FullK & FullD"};

def lowest_k = Lowest(priceL, KPeriod);
def c1 = priceC - lowest_k;
def c2 = Highest(priceH, KPeriod) - lowest_k;
def FastK = if c2 != 0 then c1 / c2 * 100 else 0;

def FullK = MovingAverage(beyondType, FastK, slowing_period);
def FullD = MovingAverage(beyondType, FullK, DPeriod);

#def OverBought = over_bought;
#def OverSold = over_sold;

#input over_bought2 = 80;
#input over_sold2 = 20;
#input KPeriod2 = 12;
#input DPeriod2 = 3;
#input priceH2 = high;
#input priceL2 = low;
#input priceC2 = close;
#input slowing_period2 = 6;
#input beyondType2 = AverageType.SIMPLE;
#input showBreak2 = {default "No", "On FullK2", "On FullD2", "On FullK2 & FullD2"};

#def lowest_k2 = Lowest(priceL2, KPeriod2);
#def c12 = priceC2 - lowest_k2;
#def c22 = Highest(priceH2, KPeriod2) - lowest_k2;
#def FastK2 = if c22 != 0 then c12 / c22 * 100 else 0;

#def FullK2 = MovingAverage(beyondType2, FastK2, slowing_period2);
#def FullD2 = MovingAverage(beyondType2, FullK2, DPeriod2);

#def OverBought2 = over_bought2;
#def OverSold2 = over_sold2;

input fastLength = 3;
input slowLength = 21;
input MACDLength = 5;
input averageType = AverageType.EXPONENTIAL;
#input showBreakoutSignals = no;

def Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
def Avg = MovingAverage(averageType, Value, MACDLength);
#def Diff = Value - Avg;
#def ZeroLine = 0;

# AvgExp [1] < AvgExp2 [1] and AvgExp > AvgExp2 and Value > Avg and FullK > FullD and AvgExp2 > AvgExp3 or
plot Bullish =  AvgExp [1] < AvgExp4 [1] and AvgExp > AvgExp4 and Value > Avg;

plot sellBullish = AvgExp [1] > AvgExp2 [1] and AvgExp < AvgExp2 and Value < Avg and FullK < FullD and AvgExp2 < AvgExp3 or AvgExp [1] > AvgExp4 [1] and AvgExp < AvgExp4 and Value < Avg;

Bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
sellBullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Alert(Bullish, "paintingStrategy.BOOLEAN_ARROW_UP", Alert.BAR, Sound.Bell);
Alert(sellBullish,"paintingStrategy.BOOLEAN_Arrow_Down", Alert.BAR, Sound.Bell);

Bullish.SetLineWeight(5);
sellBullish.SetLineWeight(5);

Bullish.SetDefaultColor(GetColor(6));
sellBullish.SetDefaultColor(GetColor(5));

Heres an example of some code that gives me a late alert on the scans
 
Hello!
I'd really like to get some help with the following endeavor:
I have my scanner set up in a way that once EMA10 crosses above VWAP the rightmost column shows "Above" label. Is there a way to have the background for the said column to blink/flash for a bit once the set criterion is met?
P.S.> I am trying to attach an image of my scanner, but I get the message that the imgur's link can't be used.

Sorry, the ToS platform does not provide any "blink/flash" capability.
The only customization allowed is to change the background of the cell.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Look---Feel/AssignBackgroundColor
Code:
AssignBackgroundColor(if whateveryourfilterIS then color.cyan else color.black);

I had the feeling my desire was over the ToS limits but had to ask.
The background changed already. I was trying to get the pulse effect so it would catch my attention, thus I won't miss a breakout. Any ideas how to customize my scan watchlist to get my attention once a ticker meets the ema10 over vwap criterion?
 
Last edited:
Hello!
I'd really like to get some help with the following endeavor:
I have my scanner set up in a way that once EMA10 crosses above VWAP the rightmost column shows "Above" label. Is there a way to have the background for the said column to blink/flash for a bit once the set criterion is met?
P.S.> I am trying to attach an image of my scanner, but I get the message that the imgur's link can't be used.
Sorry, the ToS platform does not provide any "blink/flash" capability.
The only customization allowed is to change the background of the cell.
https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Look---Feel/AssignBackgroundColor
Code:
AssignBackgroundColor(if whateveryourfilterIS then color.cyan else color.black);
 
Last edited:
Yes, you need to use one of the many free online text-to-speech sites to create your alerts... You can use either MP3 or WAV files... I use them at times for scan results but not for individual symbols due to the limited number of available custom sounds...
Can you share the code to use text-to-speech ?
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
414 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top