[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 126
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
Then tell me how to edit the code so it doesn't look hacked if you understand what I'm saying. It's my first time on the forum, and I got a beautiful answer.
"Genius people have a genius answer."
Make the names of the variables "readable".
No, not without a stop. I just posted a piece of it. Here's my Breakeven function:
The line clearly shows that if the calculated stop is equal to the one you already have, there will be no modification! Right? So the check was initially there? But error 1 was constantly popping up, until I had entered another condition in the start before the modification function:
This is why.... that's what I want to understand. I think I've described everything thoroughly.This function is used for all modifications, such as setting SL and TP, moving positions and orders trawling with attempts and error checks.
And the start only needs to prescribeposition selection, conditions and warnings. Here is the function:
It's a small one, but it's a big one!For newcomers first and foremost:
Thank you! Will definitely read it .
The world is not without good people.
Give the variables a "readable" name.
I want to modify not all open orders but only the start and the last T/P order. Help me out. here is the code
/* Так и до бана не далеко */
Hello all. I take indicator values in a separate window from an already formed bar (i.e. bar 1) that I count once on bar 0 on its first tick. Everything works quickly and correctly.But if I turn off the computer and after some time to switch back on, the indicators continue to work properly, but their values at the time when the computer was off, there is just an empty place. i.e. there are indicator values before and after the computer switch on. But just switch back and forth from TF to TF - all the "missing" values appear. Theindicators are standard - CCI, AO, etc. The codes were taken from the forums, I am attaching them, please explain where I am wrong and what I do not understand.
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!Wow :) Thank you. I'll have to have a look!
I want to modify not all open orders but only the start and the last order on T/P I want to make an EA for myself.
Actually, we should "screen out" all closed orders, not counting the magician and the symbol, of course. Then you should select the initial and the last order to modify.
The OrderSelect (g_pos_300, SELECT_BY_POS, MODE_TRADES); - this is the last order.
And the OrderSelect(0, SELECT_BY_POS, MODE_TRADES); - this will be the first order.
This is a branch with questions on the language, and I have answered your question. Bots are not engaged in redesign here. But you can find everything to include it in the Expert Advisor if you have a slightest understanding of the language. Hope that helped...
I want it to modify not all open orders but only the start and the last T/P order. I want it to modify not all open orders but only the last T/P order.
For catching the right items, use Kim's "Useful Features" for almost every possible occasion!
https://www.mql5.com/ru/forum/131859
Generally, closed orders should be "screened out", not counting the magician and the symbol, of course. Then select the initial and the last order to modify.
The OrderSelect(g_pos_300, SELECT_BY_POS, MODE_TRADES); - this is the last order.
And the OrderSelect(0, SELECT_BY_POS, MODE_TRADES); - this will be the first order.
This is a branch with questions on the language, and I have answered your question. Bots are not engaged in redesign here. But you can find everything to include it in the Expert Advisor if you have a slightest understanding of the language. Hope that helped...
I take indicator values in a separate window from an already formed bar (i.e. from bar #1) that I count once on bar #0 on its first tick. everything works quickly and correctly. but if I turn off the computer and after some time to turn on again, the indicators continue to work properly, but their values at the time when the computer was off do not exist.All I need to switch back and forth between TF and TF, all "missing" values will reappear.
Code #1