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
I am creating a custom indicator and I am facing a dilemma on the approach I am currently using.
The indicator creates approximately 300-400 labels (prices & calculation results), most of which are live updated, like a hud.
My initial approach was to create each label like that:
However the indicator source file reached critical size (~ 750kb, 20k lines) and was giving me issues in scite with scrolling and finding things.
I then switched to making a custom function to pass my labels:
like that:
Now the resulting source file is ~450kb and 7k lines smaller.
However the odd thing I noticed is that while the compiled file in the first version was approximately 750kb, the new compiled file when using the custom function is ~1.9mb. Tried both by having the custom function in the source itself or as an mqh.
I am wondering whether there are any implications in using the second method, such as slower response times, higher ram usage (didn't see any notable difference) or in cpu usage (cpu seems to have decreased from 8-9% to 3% but this might be due to the time of the day and low volatility).
Can anyone confirm that there shouldn't be really any difference despite the file size in speed/ram/cpu?
Thanks.