I know it's not compiling, because when you make sources through the Wizard, it generates that mqproj file which contains many settings (buffers numbers and stuff).
so the source file code isn't like a non project file.
I just need to know :
so the source file code isn't like a non project file.
I just need to know :
- when filling buffers that are gonna be plotted as lines, we fill them from i=0 , i++ or from i=something, i-- ?
- when only one new bar is formed since last OnCalculate() call, value of prev_calculated is 1 more than total_rates ?
- should my indicator be dropped on M1 timeframe only ? (based on the specifications I described above)
- when prev_calculated==0, how differently I fill my buffers ?
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
Hey, I have some calculations to do on a pre-determined number of M1 bars. (120, 240, 360 or 480 or... based on input)
and I want to write my first indicator ever.
from the new indicator wizard, I have created the source file.
added my codes and functions to calculate my variables.
but there's something wrong probably with filling the buffers.
when I run the indicator, terminal slows down, So it seems I'm repeating the calculations more than once per bar (?)
I have read the docs, and indicator codes examples, but I don't understand how to deal with the prev_calculated==0 part.
please note these :
I have 2 buffers, both Line, and plotted on chart window, please review my code: