Hi guys:I am the standard MACD.mq5
Based on the documentation, the copybuffer funcition (int a , int b,......) and b is said to be "indicator buffer number", Here in the codes below i don't know why the b are all 0 ..
I thought it should be 2 for ExtFastMaBuffer and 3 for ExtSlowMaBuffer..
I misunderstood sth?
if(CopyBuffer(ExtAlliHandle,0,0,to_copy,ExtJawsBuffer)<=0) if(CopyBuffer(ExtAlliHandle,1,0,to_copy,ExtTeethBuffer)<=0) if(CopyBuffer(ExtAlliHandle,2,0,to_copy,ExtLipsBuffer)<=0)
- www.mql5.com
With that 0 you are getting the first buffer of the indicator related to the handle. When you are using indicators with more than one buffer, you can select them here. For example the alligator. See https://www.mql5.com/en/docs/constants/indicatorconstants/lines
I thought i know what u means the number will correspond to the buffer, here in the example 0-->ExtJawsBuffer and 1-->ExtTeethBuffer and 2-->ExtLipsBuffer;
But in the macd.mq5 the 0-->ExtFastMaBuffer and 0-->ExtSlowMaBuffer which is contradictory...
- www.mql5.com
With that 0 you are getting the first buffer of the indicator related to the handle. When you are using indicators with more than one buffer, you can select them here. For example the alligator. See https://www.mql5.com/en/docs/constants/indicatorconstants/lines
I thought i know what u means the number will correspond to the buffer, here in the example 0-->ExtJawsBuffer and 1-->ExtTeethBuffer and 2-->ExtLipsBuffer;
But in the macd.mq5 the 0-->ExtFastMaBuffer and 0-->ExtSlowMaBuffer which is contradictory...
There is nothing contradictory. ExtFastMaBuffer is to get value of iMA fast, iMA has ony 1 buffer. ExtSlowMaBuffer is to get value of iMA slow.
This is 2 different indicators (MA but with different settings).
//--- get MA handles ExtFastMaHandle=iMA(NULL,0,InpFastEMA,0,MODE_EMA,InpAppliedPrice); ExtSlowMaHandle=iMA(NULL,0,InpSlowEMA,0,MODE_EMA,InpAppliedPrice);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys:I am the standard MACD.mq5
Based on the documentation, the copybuffer funcition (int a , int b,......) and b is said to be "indicator buffer number", Here in the codes below i don't know why the b are all 0 ..
I thought it should be 2 for ExtFastMaBuffer and 3 for ExtSlowMaBuffer..
I misunderstood sth?