[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 105
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'm moving this kind of writing now, the stop moves exactly when the profit reaches 30 pips (minus the spread, etc.), at a distance of 15 pips from the price.
And the order is always modified? If I try to place it manually, it won't move and I get the message Invalid S/L...
first_may:
And the order is always modified? When I try to set it manually, it's not set and I get the message Wrong S/L...
Well, it must be wrong, on the wrong side or closer than 10 pips to the price depending on what the broker allows for this pair
My S/L is modifiable? no complaints.
Well, it must be wrong, on the wrong side, or closer than 10 pips to the price.
Is it modifying? I'm not complaining.
Well, let's say EURAUD - stop loss cannot be set less than 100 pips, and I would like to memorize the breakeven level and move it...
Well, let's say EURAUD - you cannot place a stop loss of less than 100 pips and I would like to remember the breakeven level when placing an order and move it...
I see...
Well, let's say the pair EURAUD - here you can not put a stop loss of less than 100 pips and I would like to memorize the breakeven level and move it...
Use a virtual StopLoss level. As you write here, remember the price (store it in a variable). If price moves below (for BUY) or above (for SELL) virtual level, use OrderClose() function.
This is the only way to make a loss (profit) slightly more (less) than we want. The price rarely stops at the level we want. But this variant is quite acceptable for trading. It's true, I did not trade with this method.
Use a virtual StopLoss level. As you write here, remember the price (store it in a variable). If price moves below (for BUY) or above (for SELL) virtual level, use OrderClose() function.
This is the only way to make a loss (profit) slightly more (less) than we want. The price rarely stops at the level we want. But this variant is quite acceptable for trading. I have not traded using this method.
Is storing in a variable a global one? And if you need to store for several securities at the same time, you need an array?
Is storing in a variable some kind of global one? And if you need to store for several papers at the same time, you need an array?
How smart you are. Don't be afraid of working with arrays. They won't eat you! :DD
Read: https://book.mql4.com/ru/variables/arrays . It turns out that I can arrange a two-dimensional array for say three pairs: double Mas_d[3][2] = {1, 0, 2, 0, 3,0};
while keeping in mind that:
the value of Mas_d[1][1] corresponds to e.g. the AUDCAD pair, and Mas_d[1][2] is the value of that pair;
the value of Mas_d[2][1] corresponds for example to AUDCHF pair and Mas_d[2][2] is the value of this pair;
value of Mas_d[3][1] corresponds for example to AUDJPY, and Mas_d[3][2] is the value of this pair,
the array elements retain their values between ticks. And then I will be able to change values of array elements according to the criterion I need. Did I understand correctly what you mean? :)