Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1887
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
Something about arrays
Looked at the profiling on the history of the speed
и
Running costs are exactly the same.
As I understand it, under the bonnet of ArrayInsert is like that.
Greetings. Can you advise me please. mt5
I am trying to put indicator into EA, during testing/debugging it works on all ticks, data match. When testing on open prices data often diverge and when trying to find out the reason in the debugger a problem occurs - for the EA OnTick() is called once per candle and for the indicator OnCalculate() is called several times, once at the beginning and several times at the end of the candle, therefore data in variables change. In general, I need some help.
ozymandias_03 indicator
Greetings. Can you advise me please. mt5
I am trying to put indicator into EA, during testing/debugging it works on all ticks, data match. When testing on open prices data often diverge and when trying to find out the reason in the debugger a problem occurs - for the EA OnTick() is called once per candle and for the indicator OnCalculate() is called several times, once at the beginning and several times at the end of the candle, therefore data in variables change. In general, I need some help.
ozymandias_03 indicator
Good afternoon, all. I have an indicator that draws Fibonacci levels. I need the EA to place another EA with certain settings on this chart when the price reaches the 61.8 level on this Fibo grid and press the button to open an order.
Below is a screenshot of the indicator and the EA with its buttons.
Fibonacci drawn by the indicator.
The Expert Advisor buttons should be clicked on the left Open
Is this thing really done? If so, how to implement it in words, and then in code? Please explain in as much detail and clearly as possible.
Good afternoon, all. I have an indicator that draws Fibonacci levels. I need the EA to place another EA with certain settings on this chart when the price reaches the 61.8 level on this Fibo grid and press the button to open an order.
Below is a screenshot of the indicator and the EA with its buttons.
Fibonacci drawn by the indicator.
The Expert Advisor buttons should be clicked on the left Open
Is this thing really done? If so, how to implement it in words, and then in code? Please explain in detail and understandably.
The "other" EA should be placed in the first one. In the first one, calculate the level and the code of the second EA starts working when it is reached. When the second starts, you have to prescribe the state of the button you want to press.
Insert the "other" EA into the first one. In the first one, calculate the level, when the second one reaches it, the code of the second one starts working. When the second one starts working, the state of the required button should be prescribed as pressed.
I forgot to specify that the source code of Expert Advisor with buttons is missing. Is there any way to do what I have in mind?
I forgot to mention that there is no source code for the EA with buttons. Is there any way to do what I have in mind?
If this is the case, then, as far as I know, it cannot be done with mql , without writing third-party software.
Add data calculation to the indicator at the opening of the candle.
it was counting correctly there, I was watching incorrectly because the data here sometimes did not update with new candlesticks if the mouse was not moved
Good afternoon, all. I have an indicator that draws Fibonacci levels. I need the EA to place another EA with certain settings on this chart when the price reaches the 61.8 level on this Fibo grid and press the button to open an order.
Below is a screenshot of the indicator and the EA with its buttons.
Fibonacci drawn by the indicator.
The Expert Advisor buttons should be clicked on the left Open
Is this thing really done? If so, how to implement it in words, and then in code? Please explain in as much detail and clearly as possible.
The ChartApplyTemplate function loads the required template. If the template has the required Expert Advisor, then it will run.
If the buttons of the EA are made by standard objects, then it is possible (but not certain, this is done for work in the visual tester, and not all) that it will respond to ObjectSetInteger(chart,necessary_button,OBJPROP_STATE,1)
maybe you'll get lucky :-)