[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 553
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 am a beginner.
Folks, please advise, as I know the robot is activated every time a tick changes. How to make it activate only when a new candle opens, i.e. when the opening price of the candle appears.
Thank you all for the tips.
I am a beginner.
Folks, please advise, as I know the robot is activated every time a tick changes. How to make it activate only when a new candle opens, i.e. when the opening price of the candle appears.
Thank you all for the tips.
To quote the moderator "The function returns true when a new bar appears on M15. Use only in EA."
To quote the moderator "The function returns true when a new bar appears on M15. Use only in EA."
Thank you very much.
Thank you very much.
To quote the moderator "The function returns true when a new bar appears on M15. Use only in EA."
I'm still learning. And in this function, how can you determine the opening price of a candle.
Questions for the pros from the dummies:
1. when performing any operations with normalized variables of double type, they behave like variables of int type (the result is a normalized number), or
the result should be normalized?
2. In the help, it is written: "Two non-normalized floating-point numbers cannot be linked using the == or != operations". Can I compare a normalized and a non-normalized
number? Can the operations >= and <= be used?
I'm still learning. And in this function how can you determine the opening price of a candle.
This function only detects when a candle appears. To find the opening price, use iOpen. Something like this:
I am a beginner.
Folks, please advise, as I know the robot is activated every time a tick changes. How to make it activate only when a new candle opens, i.e. when the opening price of the candle appears.
Thank you all for the tips.
I am also a beginner, but I think I need to declare a variable of datetime type on global level (for example datetime TIME;) , in init()and check at the beginning of start() if TIME== Time[0] -- return(0); if not -- TIME= Time[0];. In this case, expert will execute start() only once at opening of a new bar.
Any numbers can be compared with each other using >= and <=. After NormalizeDouble is normalized, it is possible to compare them as == or !=. However, you need to see if it makes sense to compare numbers with e.g. 10 decimal places, it is unrealistic to find a situation where they would be equal or unequal.
Thanks you very much for the answer. Just to clarify a question: after normalization the number in computer memory remains the same and only its representation changes. or the number itself changes?
Thank you very much for your answer. Just to clarify a question: after normalization the number in the computer memory remains the same and only its representation changes, or the number itself changes?
After normalisation the number changes, e.g:
Another thing is when you print it out, with DoubleToStr, e.g.:
And if you print it out after normalisation, it goes like this:
This function only detects when a candle appears. To find the opening price, use iOpen. Something like this:
Thank you, you are very helpful