Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 129
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
Nah. Tanks are not an option. If you really want to do something like that. It will calm down just the result.)
:-)
No way. All in all, it turns out to be a strange moment. I didn't have the lot normalised. Here we have the function of lot normalization:
I checked where there was a mistake, in the trading function itself where functions of order opening are called from. I have added this function in the lot parameter of the calling function that sends orders. The error did not disappear.
And the soon as I added the normalization function directly to the first cursing function, and this is the function that sets pending orders, the cursing stopped. What do you mean by that?
In the first case, I immediately send a checked lot, and in the second case, I check the lot size in the OrderSend() function itself. But what is the difference?
Here's the problem - there is a one-dimensional array, which size may vary.
How to loop through all possible combinations of array elements with each other?
The order of elements doesn't matter, i.e. 123==213==321.
Here is an example for an array with 4 elements:
Well, with each other, it doesn't seem difficult.
But, here, when there are more than two, it's not clear how to compare. Show a method to compare three numbers 1, 2 and 3 at the same time,Well, with each other, it doesn't seem difficult
But when there are more than two, it's not clear how to compare. Show me a method to compare three numbers 1, 2 and 3 at the same time,.If I'm not mistaken, the number of cycles must match the number of elements in the array. The problem is that the number of elements is not fixed and can be much more than 4, need to think how to design it. I also wonder if there are other implementation options that affect speed, memory consumption, etc.?
Thank you! Doesn't it matter which side you start counting from, i.e. the 3rd bar?
Below is the code for an array of 4 elements. In reality the number of items in the array is variable.
How can I change the code so that the number of nested 'for' loops becomes variable, one 'for' per array item?
Thank you!
Thank you! Doesn't it matter which side to start counting from, i.e. 3rd bar?
For your example it doesn't actually make a difference, but you have to specify the beginning and end of the array anyway.
The beginning does matter if the array is large. For example, if the condition is triggered at the end of the array as a rule, you'd better start at the end. This example is typical of order/position searching. Of course, if you do the search first in this case, the program will get to this point anyway, but it will take more resources.