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)
He designed it as a trailing stop, but I've found that it's very close to Step MA and that it might be helpful as a trend indicator.
Long story short, I'd like to backtest this indicator against my /ES tick data and see how it does. I want to recreate the indicator in NinjaTrader.
The logic is pretty simple.
# Calculate average range for volatility:
#
def atr = expaverage(high-low,length);
#
# Calculate initial short and long volatility stop values:
#
def svs =low+ceil(mult*atr/ticksize())*ticksize();
def lvs =high-ceil(mult*atr/ticksize())*ticksize();
To complete the first part, I basically need the EMA of the (high - low) price.
So what's the best way to calc the EMA for something that's not a price or a dataset? In this case the difference is just a floating point number. Should I set that into a new dataset? Should I use an array?
Any help is appreciated. Thanks in advance.
Can you help answer these questions from other members on NexusFi?