Set alerts for custom indicators


0
0

Thank you so much Pete for sharing your knowledge I have made a contribution and I’ll continue sending contributions as you help me with my many questions!

I asked this question yesterday “How do I add my custom indicators to the MarketWatch/StudyAlert/thinkscript editor, not seting alerts on the indicator itself. My custom indicators show up under the condition wizard but then it popes up error (rec usage is not allowed in this context) or (Error processing referenced script XXX: No such function: XXX at 1:1 Expected double at 1:14)” and I had a follow up question but I could not figure out to add t under the same question when I added it to a comment it only showed some of the text.

The info you provided me was great, now that I know I need to paste the entire custom indicators into the MarketWatch/StudyAlert/thinkscript editor, I can’t seem to set any alerts on the indicator, I need this indicator

“plot MYBUYSIG= close>close[1] and close[1]<close[2] and close[2]<close[3] and close[3]<close[4]and close[4]<close[5] and close[5]<close[6]and close[6]<close[7] and close[7]<close[8] and close[8]<close[9];

MYBUYSIG.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); MYBUYSIG.SetDefaultColor(GetColor(10)); MYBUYSIG.SetLineWeight(1);”

to make an alert every time “MYBUYSIG” is true, typically I would just use something like this “ADXCrossover() is true”  since I can’t use custom indicators in this MarketWatch/StudyAlert/thinkscript editor, I don’t know how to change my code around to do this

PS: The reason I need this to work in MarketWatch/StudyAlert/thinkscript editor, I need to alerts to send me an email/text, the alert under the study indicators do not send emails/texts

Thank you so much for your time and help!

RESOLVED
Marked as spam
Posted by (Questions: 7, Answers: 13)
Asked on December 29, 2018 12:33 pm
528 views
1
Private answer

You don’t need to do anything at all. Just make sure the “Trigger if:” input is set to true. See screenshot below for details. The spike in the lower subgraph shows one of your signals.

Regarding text/email alerts. There is an alternative to the Study Alert. You can build and save a custom scan and create a dynamic alert from that. In this case recursion will be permitted in your code. I demonstrate how to do this at the 29:50 mark of the following video: https://www.hahn-tech.com/thinkorswim-overnight-range-scan-alert/

Attachments:
Marked as spam
Posted by (Questions: 39, Answers: 3751)
Answered on December 29, 2018 12:41 pm
For some reason I cant get that trigger if true to show that white line at the bottom, but either way that was just my first problem and still need to add more conditions to this alert which is why I was needed to rewrite the code. BUT! I had no idea about this scan/ alert tool, I cant fully test it out due to markets closed atm. So ffar adding custom indicators and more conditions than ever with no restrictions like I’ve been having with MarketWatch/StudyAlert/thinkscript editor, is such a relieve! Once I have time to test this to make sure it does what I need Ill be more than happy to show you my contribution! If not Ill be asking some more questions. Thank you so much for your time and help and sharing your knowledge!
( at December 29, 2018 2:15 pm)