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 have noticed a bug in the TypeNearPos function when the condition is met:
Market price = open order price, then this order is not taken into account by this function.
I had to add this simple condition to the code.
This condition will also be useful in functions like TypeNearPos() and PriceOpenNearPos().
But if we leave the condition as it is, we'd better exit the loop by break instead of return.It makes more sense to compare ti with zero in the condition instead of pp
Igor, I am speaking to you as an excellent specialist and expert in your field.
The essence of my problem is as follows:
I use five indicators in my TS, one of them is TRAP. It removes all unnecessary "noises" very well, but it is just as "good". It has three drawing buffers: 0 for the signal line, 1 and 2 for the two-colour chart. When the TRAP signal line is down and has a red chart underneath it - Sell. When the signal line rises and the chart is blue - Buy.
Manually, everything is fine, but when I try to get its data from the Expert Advisor, torture begins, which continues to this day.
The design...
...reads the data, but the data is not at all what I expected. Tried to read data from all three buffers for bars 0 - 7 and display them on the screen. Zero bar contains 2147483647, first bar the price, second bar the price, third bar the price, fourth bar again 2147483647 etc. At the same time, all the data does not change on a tick-by-tick basis, but when it does. Sometimes after a rather long period of time, sometimes quickly, and they change their content according to a strange system that I have not yet understood. If first there is a price there, then it may be this mysterious number, or it may be a different price or the same (although the line goes up and the price should go up), etc. ...
In short, all my attempts to systematise these readings have led to the fact that my brains should already be given to the systematisation of the sanitarians.... :)
I'm crying out for help... Igor, maybe you can advise me on how to beat this indicator?
Or any of the gurus already dealing with this problem.
Help please, all the work costs...
Thanks in advance!
The indicator itself is in the trailer:
By the way - where is Igor himself? He hasn't been seen for four or five months!
не используйте нулевой бар.... Он только формируется, а значит, значение индикатора меняется с каждым тиком....
The thing is, I've tried first and second and third and... tried every bar up to seven on every buffer. The signals are wrong. The signal that displays the price, say, 1.3478 may be held up to the next rise of the price to the level of 1.3478, and then sharply become 1.3486 or the price disappears and an unknown value of 2147483647 appears, it may wander from one bar to another in the readings of all three buffers... God willing... It may be present in the readings of three buffers in different bars, and when you change the price of one bar, this reading will move to another bar or buffer... I couldn't beat his logic...
вообще цена пропадает и появляется непонятное значение 2147483647...
2147483647 is 0x7FFFFFFFF.
Special constants used to indicate the state of parameters and variables. Can be the following values:
The thing is, I've tried first and second and third and... tried every bar up to seven on every buffer. The signals are wrong. The signal that displays the price, say, 1.3478 may be held up to the next rise of the price to the level of 1.3478, and then sharply become 1.3486 or the price disappears and an unknown value 2147483647 appears, it may wander from one bar to another in the readings of all three buffers... God willing... It may be present in the readings of three buffers in different bars, and when you change the price of one bar, this reading will move to another bar or buffer... I couldn't beat his logic...
open data window (Ctrl+D), move mouse over your indicator and see what it has in bars. It's not calculated on zero bars, and about EMPTY_VALUE you've already been written.
откройте окно данных (Ctrl+D), поводите мышью по своему индикатору и посмотрите что он имеет в барах. На нулевом баре он не рассчитан, а про EMPTY_VALUE Вам уже написали.
Oh, shit! You live and learn! And I used to make a non-trading Expert Advisor, which plotted this data on a chart... :))) A teapot, and it was boiling... :)
It all turned out so easy... Thanks a lot!!!!
Если же оставить условие как есть, то из цикла лучше выходить не по return, а по break.Логичнее, в условии сравнивать с нулём не pp, a ti
Explain why: "it's better to exit the loop by break instead of return." ???
I exit a function by return, but I only exit a loop by break. What's the trick?
Help, please... Already tried everything... I can't....=( I need to find the intersection of the indicators... All the tips I have been given have not helped me...=( maybe you can help...