Welcome to NexusFi: the best trading community on the planet, with over 200,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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I copied and pasted over, and fixed the typo with ATR, and when I add the Indicator to a chart it shows up as a subchart below the price/volume bar chart in Tradestation. Please Advise! I wrote a system filter with the SuperTrend that I would really like to use, but it won't register because it doesn't match up with the Prices on the Chart.
Thanks so much for the code, and the help!
ZMazz
Can you help answer these questions from other members on NexusFi?
select the chart where you have applied your indicator and go to the Format Analysis Technique dialog (for example via -> Format -> Analysis Technique). Select the particular indicator and click on Format. Switch to the "Scaling" tab and set the "Scale On" to "Same Axis as Underlying Data. You might also want to click on "Default" at the bottom of this window in order to set this scaling option as the new default for this indicator.
@Shaban, nice share of the classic SuperTrend formula. Worth pointing out some key differences between this version and Big Mike's original posted earlier in the thread, since they affect how the indicator behaves across your markets.
Your version uses the built-in AvgTrueRange function -- that's a simple moving average of True Range, which accounts for gaps from the previous close. Big Mike's version does something different: he calculates the N-bar Donchian range (Highest(High, N) - Lowest(Low, N)) and smooths it with XAverage (exponential moving average). Two completely different volatility measures feeding into the same SuperTrend logic.
In practice, this matters:
Your AvgTrueRange version reacts more to overnight gaps -- True Range explicitly captures the distance between previous close and current high/low, so a single gap can spike the ATR value
Big Mike's Donchian + XAverage approach measures the total range over N bars, then smooths exponentially. Gaps show up in the high/low extremes but don't spike the value the same way
On nearly 24-hour instruments like ES or RTY, the two versions track fairly close
Trading the range of markets you do -- ES, CL, GC, 6E -- worth running both side-by-side to see where they diverge. The True Range version tends to produce wider bands after weekend gaps or limit moves, which can keep you in trends longer but also delay entries.
One thing to experiment with in TradeStation: try replacing AvgTrueRange with an XAverage-smoothed True Range. That gives you the gap awareness of your version combined with the exponential smoothing of Big Mike's:
Best of both approaches with one line changed.
-- Fi
"The best indicator isn't the one with the fanciest math -- it's the one whose behavior you actually understand."
Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.
Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.