MACHINE period with minus value - page 16

 
alsu:
What difference does it make at all to the waving machine where it is drawn, if the calculation algorithm is the same? It is possible not to draw at all, but to calculate and write down the numbers on a piece of paper, this will not change anything.

at this point i think our last posts are not about that, i'm waiting for a response to the first post from the last page (
 
alsu:

Well so for the third time - you have to know the FUTURE for that. There are no other variants (although, I lie: you can also calculate the market's COMULA and calculate the FUTURE).

You can modify Yusuf indicator to draw future bars. For example, if the forecast period is 20 bars, in the current time it draws -20th bar, on the first bar -19th, on the second -18th, etc.

I.e. it is drawn by the tip of the forecast line which constantly moves.

If the price on the zero bar is moving up and down or drawing the horns, then the price of the -20th bar will be set to the close -19th bar (bar size =0).

 
david2

Thank you, it made me laugh DDD
 
alsu:

Thank you, it's funny DDD

Still, it would be interesting to see what happens.

Happy New Year.

 
Avals:

Here you go

:)



no, not that...(( , But the code is approximately close..........The code given by AM, does not work mirror to MA, i.e. there is no mirroring and hence something is wrong......(( AM does not release the same price when MA does, i.e. there is no synchronicity and the same effect as MA.....

Waiting for your response to my comment
 
MA(1) is not so smooth, mirroring MA(P) through it will give accordingly not smooth curve called here AM(P). The only solution is to make a spline for bar points (only at Close or at all OHLC) and mirror MA(P) vertically through this smooth curve. Would anyone be willing to do that?
 
yuripk:
MA(1) is not so smooth, by mirroring MA(P) through it you get a correspondingly non-smooth curve called AM(P). The only solution is to make a spline for bar points (only at Close or at all OHLC) and mirror MA(P) vertically through this smooth curve. Would anyone be willing to do that?



What if we use a regular waveform, with a shift of 20 bars...

Conditions...

a) The tip must be extended to the last bar (its size will be about 20-40 bars)

b) Every 1st bar, of each section of one or two bars, should be drawn on the last bar of the mask itself.... thus, the tip will have something to be drawn from (of course, the tip should then be without redrawing, if it is drawn from the last bar of the waveform itself)

P/S maybe silly, but if there is such a possibility. why not try writing such code and see what happens...

 
Caesar34:



What if you use a conventional wizard, with a shift of 20 bars...

Conditions...

a) The tip must be extended to the last bar (its size will be about 20-40 bars)

b) Every 1st bar, of each section of one or two bars, should be drawn from the last bar of the mask itself.... this way, the tip will have something to draw from

P/S maybe silly, but if there is such a possibility. why not try writing such code and see what happens...

It's not the first time I've been asked to extrapolate MAs and reconstruct future bars using extrapolated values of MAs. I tried it myself long and hard. It does not work. If you run such a predictor through history, the accuracy of the predictions will be 50% regardless of the extrapolation method (polynomial of degree 2 or 3, trigonometric series, etc.). If we calculate the average deviation of the extrapolated MA values from their real values on historical data for various extrapolation methods, the smallest error will be for the extrapolation method based on calculation of MA future values in the usual way (SMA, EMA, LWMA), but taking the missing future price values equal to the last known price. That is, the best predictions into the future are all predicted prices equal to the last known price. The same result can be found in many scientific articles. This is my New Year's gift to you. You can believe and save yourself years of fruitless search in a dead-end nba, or throw away the present in a garbage bin and go it yourself. It's up to you.

 
Caesar34:



What if you use a normal waving, with a shift of 20 bars...

Conditions...

a) The tip must be extended to the last bar (its size will be about 20-40 bars)

b) Every 1st bar, of each section of one or two bars, should be drawn from the last bar of the mask itself.... this way, the tip will have something to draw from

P/S maybe stupid, but if you can, why not try writing such code and see what happens...



Here)))

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int       Len=20;
extern int       sm=-20;
double ExtMapBuffer1[];
int init()
  {

   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   return(0);
  }
int deinit()
  {
//---- 
//----
   return(0);
  }
int start()
  {
   int    counted_bars=IndicatorCounted();
   for (int i=Bars-counted_bars;i>=-sm;i--){
     ExtMapBuffer1[i]=iMA(NULL,0,Len,sm,MODE_EMA,PRICE_CLOSE,i);  
   }//for
 
   for (i=-sm-1;i>=0;i--){
     ExtMapBuffer1[i]=(Close[0]+(Len-1)*ExtMapBuffer1[i+1])/Len;  
   }//for
   
   return(0);
  }
 

I have read the whole thread.

I still don't understand what TC wants (I think he doesn't understand it himself), but I think today's post by gpwr is the most adequate answer