Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 120
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
Reworked your EA a bit, comments in the code. Pay attention to the formation of signal and stop. I put them especially without thinking. Change it to your taste if necessary.
Well, the t++ kind of works either way
The only option is this?
It doesn't look like much. It's not optimised. The repetition of t++ is not happy...
The only option is this?
It doesn't look like much. It's not optimised. The repetition of t++ is not happy...
And why would you want to increase t in any case ? In fact, what is there anyway:
If the order type is greater than 1 and less than 6, increase p, increase t
Otherwise (even if the order type is==6), we again increase t
It is strange, isn't it?
Why would you want to increase t anyway? In fact, what is there anyway:
If the order type is higher than 1 and lower than 6, we increase p, increase t
Otherwise (even if the order type==6) we again increase t
It is strange, isn't it?
While I was writing your comment, I had already rewritten mine. Above is the corrected version.
While I was writing your comment, I had already rewritten mine. The above is the corrected version.
And why should we increase t, if the order is pending, and then increase t again, if the next order is a market one?
t is the number of all the orders.
p - number of pending orders
If the condition:
is true, then both t and p are incremented, since any order of the type 2 to 5 is both a pending and a general order. Therefore both counters should be incremented. And if the condition is true:
Then there is no pending order but there is a market order. It means we will increase the t counter, i.e. the counter of the total orders number.
And if there is nothing, then we will print that there are no orders.
Create an array of six elements. Pass it to the function by reference. Once an order has been selected and it fits all the filters (symbol, magik), increment the array cell addressed by the order type. After the function is running, you will have the number of orders sorted by their type in the array.
I have already understood that the array is more preferable here))) Is there any inconsistency in the above variant? (Just for the sake of interest, everything seems to be clear now).
That here the array will be preferable, I've already understood))) And in that variant, which I described above is inaccurate? (Just for the sake of interest. I think everything is clear already)
How about this?
I've already understood that the array is preferable here))) And in that variant, which I described above is not accurate? (Purely for the sake of interest. I think everything is clear already)
Something like that is what I had in mind. So... the direction to think...
And what you have there, I did not really look ...