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)
Here is my version of a TradeStation/MultiCharts EasyLanguage SuperTrend indicator.
I made it a function so it could be called easily from a strategy.
Function:
Please note, on my version I use personally, the line "avg = (XAverage(high, Strength) + XAverage(low, Strength))/2;" from above function uses a Jurik-like phased moving average, not XAverage(EMA). But I haven't posted that yet, so I just made this use XAverage instead. Replace with your favorite MA.
Indicator:
To get the desired Indicator effect and control over plot colors that I wanted, I made Plot1 and Plot2 a real plot so you could precisely control the RGB color. You need to mark these plots as invisible once you setup the indicator! I will provide a screen shot below as an example.
Plot3 is the real plot, and it will be colored based on if trend is up or down.
In OEC we have to combine functions and indicator code into the same file and call the functions manually. Can't get her to compile using SuperTrend as the function name.... is this correct?
I'm not sure about OEC sorry. If you have to combine them, try taking the function code but using the indicator inputs, then add the plots.. more or less.
Attached is a MultiCharts pla which includes the SuperTrend function, SuperTrend indicator, at the Hull Moving Average I was using. You can replace the Mov Avg (jtHMA) with whatever floats your boat.