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)
Hello everyone,
I understand the EMAs are 'working as intended' and so is the 'right side margin'; however my goal here is to get the EMAs to work like the IchimokuSignalB02 indicator. I would like them to not be cut off from display by the right side margin.
In picture 1, you can see that the IchimokuCloud is not affected by the right side margin. The display of it is not cut off.
However, if you look at the EMAs, they are cut off straight down the right side margin. The right side margin is highlighted on the Y axis in pink.
Now, if I drag the chart to the left, you will notice that the EMAs are actually displaced to the right. You will notice that the right side margin, where the pink bar is, actually cuts off the visual effect of anything to the right of it.
How do we get indicators to display to the right of the margin like the Ichimoku cloud has?
I've attached the indicator of the ichimoku cloud and the two pictures.
Can you help answer these questions from other members on NexusFi?
I believe the question is how to make the EMA's print to the right of what is normally the right margin of the chart -- in other words, to print in the area to the right of the price bars, which would be in the future in terms of the current price. This is not the same as setting the right margin. If you set the right margin, the EMA's will still print to the left of it.
Ichimoku is meant to be displayed out to the right, in the chart's future, because it is thought to be predictive. Getting it out there has been an issue with NT for some time, as NT does not natively allow posting to the right of the chart margin. It has been solved by some clever coding that does custom plotting that does not use the native NT plotting. Ichimoku is not a native NT indicator; I don't know who did the one that is referenced here, but I have seen it done by @Fat Tails.
To do the same for EMA's or any other indicator would also involve custom programming and would not necessarily be trivial to do. You could make a request in the free indicator thread for someone to code it for you:
Hey guys, I thought many of you would enjoy and benefit from this thread. My intention is to have each poster reply and describe in as much detail as possible an indicator they want created for NinjaTrader.
The programmers on the forum (there are many), …
Generally, to capture someone's interest for an unusual job, you would have to explain why it would be useful. In other words, explaining what would be the purpose of projecting EMA lines out into the future region of the chart.
It is possible to set the right side margin via NinjaScript. This requires coding a custom OnRender() section.
However, there is a catch. When the right side margin is set via OnRender() there may be a conflict between two indicators. Imagine that one of those indicators sets the right side margin to 100 while the other one sets it to 300 pixels. The result will be a chart that jumps from the left to the right and back again with a frequency set by the display interval used by OnRender(). This is funny, but not really useful.
Therefore when using NinjaScript you should only set the right side margin in a way that it is increased from the current value to a larger value. In that case when two indicators are competing for setting the right side margin, you will obtain the larger of the two values set by the two indicators. This will avoid a chart that jumps all the time.
Also there should be an option to deactivate the setting of the right side margin via the indicator dialogue box (deactivate this by default to avoid confusion).
The rightside margin can be set via ChartControl.Properties.BarMarginRight.
You may for example have a look at the amaMultiMACross (see download section). When you displace this indicator, the moving averages are plotted ahead the way you want to do it. You would just need to set the right bar margin as you need it.
Actually, you may use this indicator to plot all your EMAs, as it can be set to plot over 30 different moving averages.
Things are getting more interesting, when you try to plot ahead indicators with non-equidistant bar spacing activated on multi bar series chart. :-)
Please find below chart attached with the Multi MA Cross indicator showing two EMAs. The chart shows the very last bar and has not been manually displaced.
Version 2.2 March 8, 2020
The Multiple MA Cross indicator plots a fast and a slow moving average and colors the area between the two moving averages. Both the fast and the slow moving average may be selected from a collection of over 30 different moving …