- Guppy Multiple Moving Average
- colored MA Indicator- req some correction
- Help With Pivot Point Moving Average Indicator
From here....
for (int i = Bars - barsshu - 1; i >= 0; i--) { a1 = iMA(NULL, 0, period1, 0, mod, PRICE_CLOSE, i); a2 = iMA(NULL, 0, period1, 0, mod, PRICE_LOW, i); a3 = iMA(NULL, 0, period1, 0, mod, PRICE_OPEN, i); a4 = iMA(NULL, 0, period1, 0, mod, PRICE_HIGH, i); c1 = (shuzu3[i + 1] + (shuzu4[i + 1])) / 2.0; in front of here,shuzuj3[i+1] value is what // Alert("shuzu3[i + 1="+shuzu3[i + 1]); // Alert("shuzu4[i + 1="+shuzu4[i + 1]); c4 = (a1 + a4 + a3 + a2) / 4.0; c2 = MathMax(a4, MathMax(c1, c4)); c3 = MathMin(a3, MathMin(c1, c4)); if (c1 < c4) { shuzu1[i] = c3; shuzu2[i] = c2; } else { shuzu1[i] = c2; shuzu2[i] = c3; } shuzu3[i] = c1; shuzu4[i] = c4; }
shuzu4 is (average high + average low +average close +average open) / 4
c1 = (shuzu3[i + 1] + (shuzu4[i + 1])) / 2.0;
c1 gets his value because (shuzu4[i + 1]) will get a value so that way shuzu3[i] = c1; will get also his value
Next posting of you Please use SRC button for source code
thank your reply.
ok
shuzu4 is (average high + average low +average close +average open) / 4 but shuzu4[i+1] is what? no media cal the value
shuzu3[i] = c1 ? c1 value is what? in front of cal c1,c1 value is?
thank your reply.
ok
shuzu4 is (average high + average low +average close +average open) / 4 but shuzu4[i+1] is what? no media cal the value
shuzu3[i] = c1 ? c1 value is what? in front of cal c1,c1 value is?
for (int i = Bars - barsshu - 1; i >= 0; i--) //What no media call the value ??? Learn the working of loops to calculate
Read the Book
Ever tried ???
Print(" shuzu4[i+1] = " ,shuzu4[i+1])
very helpfull....
thank you deVries
i can't understand you mean
examp bars=100 barshu=1
then for (int i = Bars - barsshu - 1; i >= 0; i--) = =for(i=98;i>=0;i++).....................
sorry,i really can't understand the loop
shuzu4[i+1] is what, i+1 have exceed the calculate range
for (int i = Bars - barsshu - 1; i >= 0; i--) { a1 = iMA(NULL, 0, period1, 0, mod, PRICE_CLOSE, i); a2 = iMA(NULL, 0, period1, 0, mod, PRICE_LOW, i); a3 = iMA(NULL, 0, period1, 0, mod, PRICE_OPEN, i); a4 = iMA(NULL, 0, period1, 0, mod, PRICE_HIGH, i); c1 = (shuzu3[i + 1] + (shuzu4[i + 1])) / 2.0; in front of here,shuzuj3[i+1] value is what // Alert("shuzu3[i + 1="+shuzu3[i + 1]); // Alert("shuzu4[i + 1="+shuzu4[i + 1]); c4 = (a1 + a4 + a3 + a2) / 4.0; c2 = MathMax(a4, MathMax(c1, c4)); c3 = MathMin(a3, MathMin(c1, c4)); if (c1 < c4) { shuzu1[i] = c3; shuzu2[i] = c2; } else { shuzu1[i] = c2; shuzu2[i] = c3; } shuzu3[i] = c1; shuzu4[i] = c4; Print(i," shuzu4[i+1] = " ,shuzu4[i+1]); // <<==== Play and trie out... }

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use