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

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
Got it, changed it.
the errors are gone. Thank you.
Got it, changed it.
the errors are gone. Thank you.
These are not errors, they are warnings.
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, help and discussion on algorithms and codes
Artyom Trishkin, 2019.05.20 15:16
What are the types of variables n and period_find ? The most important thing and didn't show...
Try it:
And in general - why do you declare a loop variable at OnTick() handler level ?
You can do it this way:
You can remove n declaration from OnTick() - we don't need it there.
These are not mistakes, they are warnings.
Great, I'll fix it.
If you don't mind my saying so, please give me a hint how I can get the values of the prices on which the Arrows were created. Assuming I already have their indexes. ???
Now it's cursing in a different way:
'n' - undeclared identifier Test_iCustom.mq5 82 48
Great, I'll fix it.
If you don't mind my saying so, please give me a hint how I can get the values of the prices on which the Arrows were created. Assuming I already have their indexes. ???
Either iOpen(), or CopyOpen(), or CopyRates() if getting several prices at once.
In my opinion, in the indicator the arrows are placed on the chart at the open prices of the bars.
Either iOpen(), or CopyOpen(), or CopyRates() if getting multiple prices at once.
In my opinion, the indicator puts arrows on the chart at open prices of bars.
Yes, it says so there:
I'll tryiOpen().
And instead of n I add another variable, or it can be this way:?
The scope of a loopvariable is limited to the loop body. Assign the required values before break:
The scope of a loopvariable is limited to the loop body. Assign the required values before break:
Got it, it works both ways, no warnings.
Please tell me how to do it kosher, with calculations in the loop body, beforebreak; or it's better to take calculations out of the loop ???
Got it, it works both ways, no warnings.
Please tell me what is more kosher, with calculations in the body of the loop, beforebreak; or it is better to take calculations out of the loop ???
Which calculations?