MACHINE period with minus value - page 5

 
Give me five more minutes
 
tara:
Give me five more minutes
OKAY. Well, I've already added 10.
 
Caesar34:


but how??? where to fix it??

Here, you can edit it.


/---- main calculation loop
   while(pos>=0)
     {
      sum+=Close[pos];
      ExtMapBuffer[pos]=sum/MA_Period;
	   sum-=Close[pos+MA_Period-1];
 	   pos--;
     }
 
Mathemat:
OK. Well, I've already added ten.


What's so funny? People are solving a problem, and you're threatening to close the topic in a hurry.
 
Caesar34: What's all this shenanigans? People are solving a problem and you're threatening to rush to close the thread for no reason.

Stop trolling. I'm not an idiot, I can see that. There is constructive feedback, but no thanks to you.

And yet: where is the answer to my question!

 
paukas:

Edit here


Sorry, but I don't know much about code... Is it a ready-made solution to be found in the MA code and replaced with what you've tweaked?
 
Caesar34:
Sorry, but I don't know much about code... Is it a ready-made solution to be found in the MA code and replaced with what you have tweaked?


No. It's a piece of code that you have to correct.
 
paukas:

It can. To do this, you do not need to take past bars, but future ones.

This way you can get e.g. a MA with a period of minus 20 everywhere except for the last 20 bars.





I.e. it is the same as shifting -20 in МА settings?
 
Mathemat:

Stop trolling. I'm not an idiot, I can see everything. There's constructive feedback, but no thanks to you.

And yet: where is the answer to my question?!



I was just able to say thank you.
 
paukas:

Edit here

No. The restriction on the negative period should be removed.