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
I dont understand these parts;
OK, it was my code before I asked:
I need to get the minimum and maximum price on every tick and comment it on chart dynamically.
How do I change it ?
I dont understand these parts;
OK, it was my code before I asked:
I need to get the minimum and maximum price on every tick and comment it on chart dynamically.
How do I change it ?
You were given the answer in the very first reply to your OP.
Why have you ignored it?
You were given the answer in the very first reply to your OP.
Why have you ignored it?
the problem is that I have many functions that uses these variable and when I put these variable in ontick() part, it gives me error and needs these variable.
have got a solution ?
the problem is that I have many functions that uses these variable and when I put these variable in ontick() part, it gives me error and needs these variable.
have got a solution ?
Both GumRai and myself have given you several solutions for different variations that you have described, but you seem to be ignoring them.
First of all, you should invest some time learning about the basics of programming, before you tackle an EA or even an Indicator in MQL.
It is difficult to try explain things to you, when you still don't understand the basics such as local and global variables, data-types, functions and parameters, passing by value or passing by reference, etc.
I suggest that you first learn the basics by learning for example some coding in "C" (because MQL is very similar). There are many free online resources (such sample code, tutorials and even videos) to learn "C".
Then once you understand those basics then you can tackle MQL again and coding for an Indicator or an EA.
the problem is that I have many functions that uses these variable and when I put these variable in ontick() part, it gives me error and needs these variable.
have got a solution ?
Declare the variables globalscope and assign vales in OnTick()
OK.
I thought I am allowed to assign values where I declare !
I fixed it and works now.
thanks all.