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)
@cory: I am afraid that this does not work. Below attached is a chart with your indicator (red) compared to a gapless SMA. However, checking your code has led me to discover a potential bug in my own approach to coding gapless indicators, so it has been pretty useful.
Below attached is a gapless SMA, which has passed my testing.
The problem that I have had with the SMA occurred when the period of the SMA covered more than two sessions. In this case the gap logic needs to be applied twice for the value that drops out of the SMA. This can best be achieved by creating a new gap-adjusted input series, and applying the indicator logic to that series.
Unlike for the backadjusted charts which need to adjust all prior values, after a gap the new internal input series only needs to be adapted for the N prior values, which are used for computing the SMA.
For the gapless EMA no such gap-adjusted input series was needed, because it only calls the prior value of itself.
However, if I look at the SuperSmoother, the indicator values are calculated by using a chain of prior indicator values. I therefore need to create a gap-adjusted value series, which can be used for computing the current values. The gap-adjusted input series is not needed, as the current indicator value does not use prior input values.
For oscillators, the logic is again different.
As a result I need to review the gapless SuperSmoother and the gapless RoofingFilter to make them fit for periods that cover three sessions or more.
Do you know if there is a way with Ninjatrader to compare two charts of the same symbol where one would use as policy for the rollover merge back adjusted while the other chart would use merge non back adjusted. In other words, i'd like to see the GAP on a chart that occurs at the rollover time period and the effect of the merge policy on the other chart. Is that possible? Thanks.
(1) Set your merge policy to "MergeBackAdjusted".
(2) Open a new chart, it should be backadjusted.
(3) Now change the merge policy to "MergeNonBackAdjusted".
(4) Open another chart, it should be non-backadjusted.
(5) Compare the two charts.