It probably goes through Un_Initialize REASON_RECOMPILE without going through init() where it would see dot. Search the forum for more information of what happen during these phases.
https://docs.mql4.com/check/UninitializeReason
2. shall I get more information about SetLevelValue(), in the fact I don't know what is its exactly effect after view its introduction in MQL4 and other place; when we should use it? for what?
Yes you shall get more information. Last time I checked, it drew a Horizontal_Line at 70 or 30 like in RSI_Indicator. If you cannot see the level then perhaps the level isn't on the chart. Example EurUsd price is usually 1.2345. If you plot RSI 70|30 on price chart, you'll never see the levels ... because they're too far away from price of 1.
What ever you can do within init() you usually can also do within start(). Some programmers do-not trust/understand the UninitializeReason process and might rather choose start. You'll be better off asking the authors the why questions.
Here: https://www.mql5.com/en/forum/131068.
It probably goes through Un_Initialize REASON_RECOMPILE without going through init() where it would see dot. Search the forum for more information of what happen during these phases.
https://docs.mql4.com/check/UninitializeReason
Yes you shall get more information. Last time I checked, it drew a Horizontal_Line at 70 or 30 like in RSI_Indicator. If you cannot see the level then perhaps the level isn't on the chart. Example EurUsd price is usually 1.2345. If you plot RSI 70|30 on price chart, you'll never see the levels ... because they're too far away from price of 1.
What ever you can do within init() you usually can also do within start(). Some programmers do-not trust/understand the UninitializeReason process and might rather choose start. You'll be better off asking the authors the why questions.
Thanks for all your details.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
About below Indicator, I have some questions as below:
1. when "#property indicator_chart_window" is available, we get the result is:
when "#property indicator_separate_window" is available, we get the result is:
the first picture shows the indicator draw "dot" between x1 and x2 area; the second picture shows the indicator draws both "dot" from lowest point to x1 and "dot" from lowest point to x2 which is covered the "dots" from lowest point to x1; I don't know why? maybe this is defined by MT4? In addition, when the indicator is attached to chart, and we get the "dot" lines, then if I compile the indicator's code(whatever I have changed some codes or not, or changed right or wrong), the "dot" lines will become solid lines at once, why?
2. shall I get more information about SetLevelValue(), in the fact I don't know what is its exactly effect after view its introduction in MQL4 and other place; when we should use it? for what?
In this indicator, I find nothing changes when I delete it or change its parameters.
3. In addition, some time I find some Indicator made by others, in which "SetIndexBuffer(n,x);" will be written two times in" int init()", or /and "SetIndexStyle(n,DRAW_ARROW,STYLE_SOLID,2);" is written in "int start()" when it has been written" in int init()", I want to know the reason to do these?