hi, I have just started my adventure with MQL4 and I am really impressed with the
possiblities of the system. I have written a simple custom indicator which doesn't
work as it should. It is an indicator which should calculate the highest and lowest
values of a day, and draw the highest and the lowest lines during the whole next
day. the indicator does the job as it should, but only once - when the next bar
comes, all values drop down to zero... I have no idea why.... . everything looks
like it's ok - but well it doesn't work. Would anybody help me ? attached is the
custom indicator. It also doesn't want to print on the screen the short name of
the indicator.... Thank you in advance, mkowal
- Awesome Oscillator - Bill Williams' Indicators - Technical Indicators - Price Charts, Technical and Fundamental Analysis
- Accumulation/Distribution - Volume Indicators - Technical Indicators - Price Charts, Technical and Fundamental Analysis
- Fractals - Bill Williams' Indicators - Indicators - Charts - MetaTrader 5 for Android
You have this declaration both in global and under start():
double TodayHigh, PreviousHigh, TodayLow, PreviousLow;
I'm not sure, but I think that means they'll be cleared out on new tik when Start is run. I'd try commenting out "//" the extra declaration in the start function. Not near my MT4 machine, so no solid backup on that, but that's my gut feeling after glancing at the code.
-matt
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