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)
What would the logic be to create a dataseries where the close of the current bar is estimated as the current price and the close of the next bar is estimated as the current price for purposes of projecting a moving average one bar forward?
For example, if selecting a moving average period of 4, the dataseries would be represented by close[2], close[1], close[0], close[0].
Or if you can refer me to an indicator where this has been done that would also help. It seems like it should be simple, but I can't wrap my head around this. I found this for MC, which seems like what I am trying to do, but it's not helping me do it in c
Don't know if this will work to just post the text of the file in the description box here. Copy all code below here for indicator or text file attached. Pictures should explain. Indicator works fine.
////////////////////////////////
// Displaced …
That is the same. Shifting the plot allows you to calculate future indicator values from current input values. If you wish to calculate futures indicator values without without using current input values, you can always use one of the Draw() methods to fill that empty space on the right side of the current bar....
Here is a little indicator that adds a linear forecast to any indicator plot that is selected as input series. The chart below shows the LinearForecast indicator applied to each of the 3 MACD Plots.
Of course it is possible to recode any indicator to include this little feature. You can also modify the linear forecast indicator to allow for different algorithms to extrapolate the plot values.
So you are saying the projected value (next bar or whatever) would simply be stored under the current bar index [0], but simply offset on the chart? Is there a parameter that can be loaded in the Init to set the offset?