MACHINE period with minus value - page 13

 
Grandmother selves are not childish.
 
tara:
Grandmother selves are not childish.

The answer is -2 apples. Grandma's from the anti-world.

 
:) Happy New Year
 
gpwr:

Grandma went to the shop and bought minus 10 apples. When she returned home, she gave 3 apples to her grandson Vova and 5 apples to her granddaughter Masha. How many apples did the grandmother have left?

Bought minus 10 apples = sold 10 apples. All in all, the grandmother lost 10 apples + 3 + 5 = 18. How many remained is unknown.
 
sultonov:
Bought minus 10 apples = sold 10 apples. The grandmother lost 10+3+5 = 18 apples. How many remain is unknown.

Yusuf, 18 again, slow down.

 

Here you go

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int       Len=14;
extern int       Len2=5;
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>=0;i--){
     ExtMapBuffer1[i]=2*iMA(NULL,0,Len2,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,Len,0,MODE_EMA,PRICE_CLOSE,i);  
   }//for
   return(0);
  }

:)

 
tara:

Yusuf, 18 again, slow down.

Honestly, I didn't notice about 18, otherwise I wouldn't have answered so as not to annoy you. Happy New Year!
 
I was fooling around with the fractional. Thought it was a joke. Turns out, some people are better altogether gifted.
 
Peter_Zabriski:
I was fooling around with the fractional. Thought it was a bitch. Turns out that nectr. are better altogether gifted.

An incomplete indicator.

We should also make the averaging method and price type fractional. The chicest would be if all parameters were strings. Convert them into fractional numbers using some secret algorithm. At every indicator call or at every tick the encryption method would be changed. Great!

 
Peter_Zabriski:
I was fooling around with the fractional. Thought it was a joke. Turns out, some people are better altogether gifted.

Well, it's not for nothing that a complex one was mentioned here as well)) True, this only works for EMA - then the real part of the period will determine the damping and the imaginary part will determine the oscillatory component. But it works in principle.