How can I draw segments starting from last bar and ending in the future?
In some videos I see that someone did it
Please tell me what video as I can’t explain how it is possible!
Yes, but it is not created with code, it is a moving average displaced in the future. Only built-in indicators of prorealtime can draw in the future of price, just like Ichimoku for example.
I don’t think it’s a built-in moving average shifted to the right, anyway you are saying that it is not possible to code even a simple moving average shifted to the right in a zone where there is not yet a bar?
Only few people can use the library able to do this feature?
Another question: a moving average can be applied only to Close, Open, Low, High, Typical, Total … or even to the result of another indicator?
A Moving Average can be applied to anything, even another MA or any other indicator.
x = Average[200,0](close) //sma 200
y = Average[21,1](x) //ema 20 of sma 200
z = Average[50,2](Rsi[14]) //wma 50 of rsi 14
https://www.prorealcode.com/documentation/average/
Yes, thanks.
But Average can be applied to everything inside the code but inside the code I can’t shift it to the right in a no-bar zone.
The built-in Average can be shifted to the right but it can’t be applied to everything (only Close, Open …).
I can’t solve my problem, is it correct?
Since no bars exist in the future, and X coordinates is made with barindex, you can’t reference anything to be drawn in the future. Add text on the right of a last candlestick is possible if you add sufficient space before the text.
A text is not enough,
I would like to plot some expectation values of asset for the next bars
But it seems impossible, isn’t it?
Right, it is not possible because no barindex are already known.
Nevertheless someone shows in video that it is possible to plot forecast.
Probably there are hidden resource that allows you to perform this.
Sorry but there is no hidden ressource 🙂
The moving average is shifted to the right like in my attached picture.