[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 127

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've put it in for you. You can do the same in your post.
Sorry, it won't work! Not the first one, not the last one!
Why? Because the last order is OrdersTotal()- 1, and the first order has an index of 0 . Why then it won't work?
I have a function for all modifications such as setting SL and TP, transferring to B/S, trawling positions and orders with attempts and error checks.
I only need to prescribe position selection, conditions and warnings in the start. Here is the function:
Small but clever!By the way, your function only modifies orders. And the conditions are already all in the start. And I have all the conditions in the function. It turns out that there will be a lot of conditions placed in the start and it would be very unreasonable to overload it, wouldn't it? After all, the essence of function is mostly in conditions, not only in bare modification function, of course with displaying errors. But somehow you have a strange approach. I have not yet encountered it. I look and I am surprised.
By the way, your function only modifies orders. And the conditions are already all in the start. And I have all conditions in the function. It turns out that there will be a lot of conditions placed in the start and it would be very unreasonable to overload it, wouldn't it? After all, the essence of function is mostly in conditions, not only in bare modification function, of course with displaying errors. But it is a strange approach. I have never seen such an approach. I look at it and wonder.
Why? Because the last order is OrdersTotal() - 1, and the first order has index 0 . Why then it won't be?
For the last order there is a function at Kim's where he compares by time to avoid errors, and for the first order.
You think of everything at once, but the computer thinks one at a time, say 0 or 1, then again, 0 or 1, and again 0 or 1, etc.
So you have to do by the logic of the machine, not ours. And the reward will be an error-free program! Good luck!
Use theSRC button at the top to insert code! No one will poke around like that. I've pasted it for you. You can do the same in your post.
I have a function for all modifications such as setting SL and TP, transferring to B/S, trawling positions and orders with attempts and error checks.
I only need to prescribe position selection, conditions and warnings in the start. Here is the function:
Boris. Why do you have the variable e here ?
Boris. Why do you have variable e here ?
Variable e is an expiration (for orders, see Doc OrderModify()), which I must specify if I want to use arrow_color, for bai one, and for sell another, and for orders I can diversify the colour). After all, the program doesn't go into such details at once, as we do, but one by one, defining parameters by their place of presentation in the standard OrderModify() function.
You can set it to 0(zero), since usually the expiration is not required. But you probably have it in case of emergency, so that you don't have to return to this point.