Indicators: NonLagMA_v5

 

NonLagMA_v5:

This is a moving where effect of retardation is lessened by means of damped cosinusoid defining coefficients' ratios in equation of the linearly weighted average (LWMA).

Fig.1. NonLagMA_v5 Indicator

Author: Nikolay Kositsin

 

Spent the day updating an old MQL4 version of the nonLagMA and then translating it to MQL5 - and found this more concise MQL5 version here: "https://www.mql5.com/en/code/7022".

I have a question about Copy Buffer - in the MQL5 version attached, this line:

   if(CopyBuffer(RawImahandle,             0,                     0,                   to_copy,   indiStruct[RAW_IMA_IDX].indiBuff)<0)

//int CopyBuffer( int indicator_handle, int buffer_num, int start_pos, int count, double buffer[] );

What does the buffer_num parameter refer to?  I see in all code examples that I looked at today, it is always zero, and it does not work to put the destination buffer number (buffer index for the double buffer[] parameter) in it...

--- double buffer[] is described as "target array to copy", but seems to always be used as "target array for copying to" - is that correct (it is not the array being copied from)? 

NonLagMA_v5
NonLagMA_v5
  • www.mql5.com
Simple dollar index indicator Special aspects: "holidays problem" is solved (problems arising due to absence of ticks). Mass_Index The Mass Index is intended for detection of trend turns based on changes in the bandwidth between the highest and the lowest prices. NonLagMA_v5_HTF The NonLagMA_v5 indicator with the timeframe selection...
Files:
nonLagMA.mq5  31 kb
NonLagMA.mq4  26 kb
 
LukeB:


Do not double post.

Your other topic has been removed.

 
Keith Watford:

Do not double post.

Your other topic has been removed.

I did press delete, and it didn't delete, so I edited that post to refer to here (the edit seemed to take just fine) - didn't know what else to do.

Still, no answer on what that zero means in CopyBuffer....

Reason: