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
Why ? What are you trying to solve ?
When you run OnInit(), you initialize handles.
When the ticks start coming, You run CopyBuffer to prepare data analysis.
I want to test CopyBuffer during OnInit() to avoid discovering that we have a buffer problem (lack of bars for example) pro actively.
When you run OnInit(), you initialize handles.
When the ticks start coming, You run CopyBuffer to prepare data analysis.
I want to test CopyBuffer during OnInit() to avoid discovering that we have a buffer problem (lack of bars for example) pro actively.
The data are not supposed to be ready during the initialization process, they can or can not.
You always have to manage possible errors of CopyBuffer(). I don't see why it's a problem, you just have to act accordingly to the possible errors.
The data are not supposed to be ready during the initialization process, they can or can not.
You always have to manage possible errors of CopyBuffer(). I don't see why it's a problem, you just have to act accordingly to the possible errors.
Let me give you an example:
Lets suppose you add an EA to the graph 2 hours before the market opening.
If you could test the CopyBuffer with the last "x" bars available you would know in advance there is a problem.
The way it works today, I have to wait the market opening and the 1st tick to realise there is a problem.
Let me give you an example:
Lets suppose you add an EA to the graph 2 hours before the market opening.
If you could test the CopyBuffer with the last "x" bars available you would know in advance there is a problem.
The way it works today, I have to wait the market opening and the 1st tick to realise there is a problem.
The data are not supposed to be ready during the initialization process, they can or can not.
You always have to manage possible errors of CopyBuffer(). I don't see why it's a problem, you just have to act accordingly to the possible errors.
facing the same issue for heikenashi:
https://www.mql5.com/en/forum/248411
I think it's an issue with MT5 program itself.
I do have data on chart. Checked also IndicartorParameters()
facing the same issue for heikenashi:
https://www.mql5.com/en/forum/248411
I think it's an issue with MT5 program itself.
I do have data on chart. Checked also IndicartorParameters()
Just use a timer, you don't have to wait for a tick. But I still don't see what you will win by doing that.
Do you mean like this, Mr. Alain?
Let me give you an example:
Lets suppose you add an EA to the graph 2 hours before the market opening.
If you could test the CopyBuffer with the last "x" bars available you would know in advance there is a problem.
The way it works today, I have to wait the market opening and the 1st tick to realise there is a problem.
i also had quite similiar problem in my strategy. Need to to learn the market behavior and map it to my strategy, i ended up performing manual calculcation in my code using the existing formula depending on the indicator i want to use.
The formula is there, just look in the MT5 indicators source code, unless you have your own indicator with custom formula (but you wouldn't have asked the question).
As long as the copyrates can return whatever count of bars you target, indicator's formula should return the expected value