mrluck1: i'm starting to learn to program, i have a question from a exercise, based on this code above. I really tried to understand this for loop, but i can't, on that ExtMapBuffer1 [i], if i understood right, the very first cycle this value will be 0 , right? and this value somehow will bind to some bar or candle, but why and to what candle? because its not open[] close[] or anything, i compiled and it creates the indicator, but i dont know why it works, thanks for any
Have a look at the following:
However, you should read all the documentation on MQL4:
But pay special attention to the Updated form of MQL4 Language:
Also, have a look at the many examples of code available:
Also, given that you are from Brazil, if you have difficulty with the English language, consider going over to the:
Creation of Custom Indicators - Simple Programs in MQL4 - MQL4 Tutorial
- book.mql4.com
Creation of Custom Indicators - Simple Programs in MQL4 - MQL4 Tutorial

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
{
double ExtMapBuffer1[];
SetIndexStyle(0,DRAW_LINE);SetIndexBuffer(0,ExtMapBuffer1);
MathSrand(TimeLocal());
for(int i=0; i<Bars; i++)
{
ExtMapBuffer1[i]= MathRand()%1001;
}
return(0);
}
Hi friends, i'm starting to learn to program, i have a question from a exercise, based on this code above
I really tried to understand this for loop, but i can't, on that ExtMapBuffer1 [i], if i understood right, the very first cycle this value will be 0 , right? and this value somehow
will bind to some bar or candle, but why and to what candle? because its not open[] close[] or anything, i compiled and it creates the indicator, but i dont know why it works, thanks for any
help