Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
could anyone help me convert this thinkorswim ATR study into easy-language please? ive gotten sorta close (see screenshot) but i think im getting hung up on defining the init/long/short "state" and "trail" portion.
Can you help answer these questions from other members on NexusFi?
I don't want to come across as a naysayer, but I can see why this one would be a little tricky unless someone is intimately familiar with the source codes of ToS as well.
If you want someone to be able to help you, I'd recommend posting the source codes of all the functions involved as well. There are many things in this code that need to be expanded on in order to reproduce your ToS results more closely.
Another concern is - if you're looking for precisely the same results, that's going to be about 6-8 hours of debugging work for a professional, in my estimation. At least that's how long it would take me to dig in and debug stuff on a trade-by-trade basis.
a.) Although people here seem to be fairly generous with their time, I'm not sure whether it's reasonable to expect for a random person to just to do that on a thread like this,
b.) Do you really need this and is it really worth it? There are many ways you can come up with similar strategies in TS/MC without having to translate something like this over very precisely.
hey Ben... thanks for your reply and feedback. im going to reply in 2 parts
unfortunately thinkorswim doesn't have source codes for their functions. but in converting other codes i have learned that Max = MaxList and Min = MinList in EL. since EL also has its own functions for AverageTrueRange and TrueRange im not 100% sure if its the same as what is written in the TOS script.
below is my current EL script converted if anyone is curious. i have the "hangup section" part marked, as well as my "work around" section marked where i tried bypassing the switch altogether. i comment out one or the other sections to see how it plots as i con't working on it:
to me yes i feel its worth my time because when i played with the TOS script a little more i found some interesting relations when i would have two aggregations match (both were state = long or both were state = short). even the single aggregation results i thought were interesting. so its worth it to myself to con't working on in hopes to eventually make an EL strategy out of it and backtest in tradestation to see what results i get as a simple trend following approach.
below are some screenshots in TOS of CL and ES with the bars colored when 2 aggregations matched or when using just a single aggregation which is what peaked my interest:
I understand what you're saying and it looks interesting. But I'd still recommend hiring an outsourcer for this or something - if you want to do it properly, it's going to be a lot of work, and without ToS function sources it might actually not be possible that it's never going to be replicated accurately.
i was able to figure it out on my own... apparently tradestation's ATR is defaulted for the simple avg. so to find the wilders smoothed avg (to match TOS) i had to replace my EL ATR definition with this below: