Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 838

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
How do I empty the indicator high and low values? For example, if I set a maximum of 100 and a minimum of 0, and then I need the indicator to visualise everything, how do I organise that? The matter is that I write an indicator with several modes, one of which uses max and min, but after switching the mode in the input parameters the max remains 100, as well as the min 0
MQL5
You have already called and passed the value returned byDeviation(Kanal) to theEnvelopes(........) function
and in theEnvelopes(........) function itself, you declare the last parameter, which will take this value
like this
Thank you, it makes more sense now.
Slightly modified the code for MT5 according to your advice, it turned out like this:
Only now I don't understand why at every tick the first calculated value is written everywhere.

Can you tell me how to fix it ?Slightly modified the code for MT5 according to your advice, it turned out like this:
Only now I don't understand why at every tick one calculated value is written everywhere.
It's immediately apparent. Even without being highlighted.
It catches the eye immediately. Even without the highlighting.
Thank you.
Any questions from newbies on MQL4, help and discussion on algorithms and codes
WinProject, 2019.05.07 18:38
Can you please tell me why the same code works in MT4 but does not work in MT5? In MT5 the strNum variable always =1, but in MT4 the ++ counter works as it should and strNum = number of line items in the file.
I am answering to myself, it may be useful for those who have no loop in MT5 when opening or reading file into array or structure. In MT5, in contrast to MT4, when reading .csv file, you should additionallyset file open flag FILE_ANSI.
I.e., in MT5 the line should look like this:
Why, I don't know, maybe someone knows?
I get "OrderSend error 130" for unknown reason, the program is running in strategy tester on demo account, so there cannot be any restrictions from broker as far as I understand, Stops Level = 30. I get this error at regular intervals during testing and the stop is fixed in percentage of ATR for all trades but some orders are placed successfully while others are not.
There are times when an order is rejected several times and then passes...
How can I publish the same code in CodeBase for different language audiences (e.g. how can I fill in a form in the marketplace for the corresponding language)?
I have already seen this in CodeBase, here is an example
How can I do the same?
For example, when you decrease to the limit the size of candlesticks scale with the mouse, then indicator readings change, although none of the thousands of candlesticks in the indicator code says anything about the change of candlesticks size. For example, at 4 o'clock volumes in a reduced form show one value, but if you slightly increase the candlesticks scale, then another setting will be considered as the correct one.