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)
Measure the distance between any two moving averages
Good day,
I am looking for something similar to measure the distance between any two moving averages.
In the example, the distance is 15 ticks. It is preferable if it would calculate as the bar is building. The opposite is true if it were to the down side,-15 ticks. The opacity is nice, but can be an option to turn off. I really desire the output to be text in the corner of the chart. Is there such an indicator for NT8?
Thank you, Ky
Can you help answer these questions from other members on NexusFi?
I was trying to think of a way to do this w/o building an indie, I.e., using an off the shelf indie to get the value you want, and I can't think of anything off-the-shelf. There may be, and I'm just not thinking of it?
If nobody comes up with an off-the-shelf solution, you can always ask in the "Want your ninjatrader indicator created for free?" in the elite sections, as this would be easy to do.
Just post an image(can be scribbled in MS paint) of what you'd want to see, and someone will take it up.
If what you want is a plot of the difference over time, this is what the standard MACD indicator does. It typically only uses EMA's, but there are implementations where you can choose the MA type.
You can simply choose the two EMA lengths and you have it. It doesn't print the value as text on the main chart, and it also gives you another line to be looking at, so it's not exactly what you are asking for. But you can set the value to be shown on the lower panel where the indicator plot is (which is the default anyway). You don't have to show the MACD indicator's MA nor the difference bars if you don't want them, and you just have the plain MA difference over time. To calculate as the bar is building, set Calculate on Bar Close to false.
If this works for what you want, it's an out-of-the-box solution. Otherwise, as suggested, if you ask in the free indicator thread someone may be willing to do the minor changes necessary.
Bob.
When one door closes, another opens.
-- Cervantes, Don Quixote
Hello Bob,
Thank you for replying. I'm seek the value of the MA spread, in +/-ticks, at the moment. I do not code, but gave the thought of MACD as the basis. I think the MACD uses the same MA type for all lines when calculating. Where as, I would have a couple different configurations (EMA/SMA, Double EMA/WMA...). The output can be in simple text in the corners of the charts. Graphing the chart is ok too, but the main objective to quickly see the numeric value. I did post this in the Free Indicator section as suggested.
This was quickly put together from NinjaTrader's script wizard. Takes two SMA's and plots the difference along with a message in upper right corner. I hope it helps.
There is below indi available that lets you enter formula and operands can be most widely used NT8 indicators. I suppose you sould be able to calculate and plot difference between MA using this indi.
Formula indicator which allows you to generate new series on the fly by formula
Simple formula examples:
CLOSE(0) / CLOSE(1)
(HIGH(0) - LOW(0)) / 2
MATH-LOG10(CLOSE(0))
CLOSE(0) / VALUE(SMA(14), 0)
(CLOSE(0) / CLOSE(1)) * 14
VALUE(SMA(BARS-ARRAY(0),14), …