The indicator does not display in real time in visual mode if i run EA test; it only appears after pressing stop. But when i choice only indicator mydonchian. It is working!
- chinhbcdev: The indicator does not display in real time in visual mode; it only appears after pressing stop. Where am I going wrong in using this indicator that it does not draw real time?
EAs have no eyes; they don't need to see them. If you want to see it on the chart, you must add it to the chart, either manually, of via template.
The template ordering for new charts is «EAname».tpl, (if tester) tester.tpl, (if debugging) debug.tpl (if offline chart) offline.tpl, and then Default.tpl.
-
void OnTick() { iCustom(NULL,0,"mydonchian",20,1,0);
Be careful with NULL.
- On MT4, you can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, iCustom does, MarketInfo does not, OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don't hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
MT5: create them. - Cloud Protector Bug? - MQL4 programming forum (2020)

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
The indicator does not display in real time in visual mode; it only appears after pressing stop. Where am I going wrong in using this indicator that it does not draw real time? Thank you so much.