Seemingly unsolvable error messages in ThinkorSwim Alerts - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

Seemingly unsolvable error messages in ThinkorSwim Alerts
Updated: Views / Replies:2,074 / 1
Created: by Txurruka Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

Seemingly unsolvable error messages in ThinkorSwim Alerts

  #1 (permalink)
Just starting out...
Cocoa, Florida, United States
Trading Experience: Beginner
Platform: Think or Swim AND Street Smart Pro
Favorite Futures: ES
Posts: 1 since Oct 2010
Thanks: 0 given, 0 received

Seemingly unsolvable error messages in ThinkorSwim Alerts

I am new to programming, and I think I understand the code below, I just can't understand why the editor won't accept it.

I copy/pasted the code for MA_Crossover_w_Alerts released by think or swim into the complex alert compiler. Everything is functioning except the alerts portion at the bottom. The following is written:

#Trigger alerts
alert(crossover[1], "Crossover", Alert.Bar, Sound.Ding);
alert(crossunder[1], "Crossunder", Alert.Bar, Sound.Ding);

Every time I paste that in, the scripter creates the error "No such constant: Sound.Ding" I know for a fact that Sound.Ding is a valid constant (it is in the thinkscript manual), I just don't know why it won't acknowedge it. Further, the compiler rejects all “Sound._” constants that are in the manual. I tried to just leave out the sound parameter altogether, since the manual indicates that it will default in that instance to Sound.NoSound, but then it gives me this error: "No default value for parameter 'parameter3' on alert". I talked to someone else that tried the same code in their own TOS program, and he didn't have any of the issues I'm having. He didn't tell me anything beyond that, though, so I'm kind of stuck.

To be clear, the whole script released from Think or Swim is as follows:

input EMAPeriod = 10;
input SMAPeriod = 20;
input price = close;
def na = double.nan;

plot fastema = ExpAverage(price, EMAPeriod);
plot slowema = Average(price, SMAPeriod);
def crossover = if fastema > slowema AND fastema[1] <= slowema[1] then 1 else 0;
def crossunder = if fastema < slowema AND fastema[1] >= slowema[1] then 1 else 0;

#Plot arrows
Plot up = if crossover then low - tickSize() else na;
Plot down = if crossunder then high + tickSize() else na;

#Trigger alerts
alert(crossover[1], "Crossover", Alert.Bar, Sound.Ding);
alert(crossunder[1], "Crossunder", Alert.Bar, Sound.Ding);

Thank you for any help you can provide!

Reply With Quote
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


futures io > > > > > Seemingly unsolvable error messages in ThinkorSwim Alerts

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Order Flow Patterns and Set-ups w/Anthony Drager @ Verbal Journal

Apr 18

Don’t Let One Bad Trade Wipe Out Your Entire Account w/GFF Brokers

Apr 23

New CME Micro Indices: New Trading Opportunities w/FuturesTrader71

Elite only

Benefits of Trading the Micro E-Minis w/Stage 5 & CME Group

Apr 30

Similar Threads
Thread Thread Starter Forum Replies Last Post
VSA for ThinkorSwim cbritton ThinkOrSwim Programming 430 December 11th, 2018 02:50 AM
DeltaVolume, OrderFlow ThinkOrSwim franjah64 ThinkOrSwim Programming 1 June 17th, 2011 05:03 PM
BMTF private messages. Please help tickvix Beginners and Introductions 2 January 12th, 2011 05:33 PM
Level 1 and 2 from Zen Fire dropping messages Xeno Reviews of Brokers and Data Feeds 7 November 18th, 2010 11:14 AM

alerts, code, crossovers, dow, error, es, information, programming, think or swim, thinkorswim, thinkscript, tos

All times are GMT -4. The time now is 05:49 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432 WhatsApp Business,
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.
no new posts
Page generated 2019-04-19 in 0.17 seconds with 14 queries on phoenix