Find Jobs
Hire Freelancers

Ameritrade ThinkorSwim ThinkScript Study Modification

$250-750 USD

In Progress
Posted almost 8 years ago

$250-750 USD

Paid on delivery
I have a study created in ThinkorSwim (Ameritrade) and would like to modify the study so it alerts once and resets. Currently the study sends and audible alert as well as a visual alert in the message center, continuously, until the condition is no longer valid. I'd also like the alert to activate the SMS/Email in the Application Settings somehow, to alert once as well. You must have or download the ThinkorSwim platform in order to test. Testing will not be available on my platform for security reasons. Below is the current script. _________________________________________________________ input over_bought = 40.0; input over_sold = -40.0; input percentDLength = 5; input percentKLength = 13; input trailType = {default modified, unmodified}; input ATRPeriod = 144; input ATRFactor = 7; input firstTrade = {default long, short}; input averageType = [login to view URL]; Assert(ATRFactor > 0, "'atr factor' must be positive: " + ATRFactor); def HiLo = Min(high - low, 1.5 * Average(high - low, ATRPeriod)); def HRef = if low <= high[1] then high - close[1] else (high - close[1]) - 0.5 * (low - high[1]); def LRef = if high >= low[1] then close[1] - low else (close[1] - low) - 0.5 * (low[1] - high); def trueRange; switch (trailType) { case modified: trueRange = Max(HiLo, Max(HRef, LRef)); case unmodified: trueRange = TrueRange(high, close, low); } def loss = ATRFactor * MovingAverage(averageType, trueRange, ATRPeriod); def state = {default init, long, short}; def trail; switch (state[1]) { case init: if (!IsNaN(loss)) { switch (firstTrade) { case long: state = [login to view URL]; trail = close - loss; case short: state = [login to view URL]; trail = close + loss; } } else { state = [login to view URL]; trail = [login to view URL]; } case long: if (close > trail[1]) { state = [login to view URL]; trail = Max(trail[1], close - loss); } else { state = [login to view URL]; trail = close + loss; } case short: if (close < trail[1]) { state = [login to view URL]; trail = Min(trail[1], close + loss); } else { state = [login to view URL]; trail = close - loss; } } def BuySignal = Crosses(state == [login to view URL], 0, [login to view URL]); def SellSignal = Crosses(state == [login to view URL], 0, [login to view URL]); def TrailingStop = trail; def min_low = Lowest(low, percentKLength); def max_high = Highest(high, percentKLength); def rel_diff = close - (max_high + min_low) / 2; def diff = max_high - min_low; def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength); def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength); def atrTrailingStop = atrTrailingStop; def SMI = if avgdiff != 0 then avgrel / (avgdiff / 2) * 100 else 0; def AvgSMI = expaverage(smi, percentDLength); def SELL = ((avgsmi > over_bought) and state == [login to view URL]); def BUY = ((avgsmi < over_sold) and state == [login to view URL]); Alert(SELL, "SELL", [login to view URL], [login to view URL]); Alert(BUY, "BUY", [login to view URL], [login to view URL]);
Project ID: 10672808

About the project

4 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
i can do it
$300 USD in 2 days
0.0 (0 reviews)
0.0
0.0
4 freelancers are bidding on average $796 USD for this job
User Avatar
I have read the details of your project. I will do the work the way you want it. I am expert for this project because I have worked on many same as this project. I got enough skill to maintain it. You do not need to be worried about the project. I am 100% good fit for this and I will complete it as the way you expect it..
$555 USD in 10 days
5.0 (1 review)
0.0
0.0
User Avatar
My name is Mike and I’m from UK. I work with individual clients and also provide outsourcing services for a number of UK and USA based agencies. Your project description sounds interesting to me and I do have skills & experience that is required to complete this project. I can show you some examples of my work. Please contact me to discuss your project.
$555 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello Sir, We are an Indian development company here. we have checked your posted details here and want more clarification in it, so message us to discuss on it more then we will able to move on it. Thanks
$470 USD in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Apopka, United States
0.0
0
Payment method verified
Member since Sep 27, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.