Forum

Need help understanding the loop inside OnCalculate()

Hi guys: standard question about how the loop works. first time i know prev_calculated= 0 and limit = 0, Let's say in the first loop rates_total = 3 ;So in the first loop [i=0,1,2] so after first loop prev_calculated=3 now limit = 3-1=2 and rate_total should equal to 4. so in the second loop

Need help with standard MACD indicators..

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

Need some help with indicators

Hi guys: I just used EA for 1 day.. And I am totally confused with some functions . In the included standard "MACD" library , i thought PlotIndexSetInteger (1,..) just ignore several values at the beginning.. But what's the use of paramerater 1,sometimes it's 0.. help plz... void OnInit () { //---