Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 739
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
It's up to the author to figure that out. Better bring the code from OnTick()
I contacted the author. I did not help. He himself hardly knows what to do:"Check your conditions here I won't help you".
I may(!) be responsible for my part of the code, but I can't be responsible for yours".
Here is the code OnTick():
Try replacing
with this line.
I think it's working! There's been no message for 20 minutes now. Let's see how it reacts to the news at 1pm.
The number is NaN - Not a Number - Not a Number. Try to normalise the numbers in the Z-count calculation
Thank you, that helped.
Strange thatMathCeil() is not working. NormalizeDouble() number helped - == Z-score equals = -92233720368547.77 . The figure is awesome, but the balance is almost unchanged
Try replacing
with this line.
Oh, that's great! Everything worked according to the settings, no failures. Thank you!
I love simple solutions and simple codes.
Thanks also to everyone who paid attention and tried to help a complete amateur.
I attach the price marker to the Bid, observe that it works fine, switch to another chart and see that the vertical coordinate immediately shifts by about 15 pixels.
I go back, the marker "escaped" and is not in place until the next tick, then it returns "to the motherland". What can this be caused by?
I attach the price marker to the Bid, observe that it works fine, switch to another chart and see that the vertical coordinate immediately shifts by about 15 pixels.
I go back, the marker "escaped" and is not in place until the next tick, then it returns "to the motherland". What can this be caused by?
Because the chart is only redrawn on the next tick. But it is dangerous to set forced redrawing of the chart now. The previous two builds of MT5 were not childish brakes. I don't know how it is in MT4, I should check it.
The situation can be solveddue to the fact that the chart is re-drawn only on the next tick. But the forced re-drawing of the chart is dangerous. The previous two builds of MT5 were rather complicated. I do not know how it is in MT4, I should check it.
So this is a consequence, it is not clear what causes the shift.
The same thing happens horizontally and the most unpleasant thing is that the marker is overlapping the price, I cut out most of the code to understand the situation.
How to get out of this situation?
This is the consequence, it is not clear what is causing the shift.
The same thing happens horizontally and the most unpleasant thing is that the marker is overlapping the price, I cut out most of the code to understand the situation.
How to get out of this situation?
try updating marker coordinates in the same way and in the CHARTEVENT_CHART_CHANGE event
Try updating the marker coordinates in the same way as the CHARTEVENT_CHART_CHANGE event
Tried it, you have to move the mouse to get the mark back. It's the same crutch, but in a different hand :-)
And switching between charts forCHARTEVENT_CHART_CHANGE is not an event.
Can anyone think of a way to overcome this anomaly?
Tried it, you have to move the mouse to get the mark back. It's the same crutch, but in a different hand :-)
And switching between charts forCHARTEVENT_CHART_CHANGE is not an event.
Can anyone think of a way to overcome this anomaly?
Do initialization of variables in OnInit (including redrawing of objects)