Well use the debug mode not only to check a certain value but even the reason - single calculation by single calculation - why this value was assigned to the variable.
Carl Schreiber:
Well use the debug mode not only to check a certain value but even the reason - single calculation by single calculation - why this value was assigned to the variable.
Well use the debug mode not only to check a certain value but even the reason - single calculation by single calculation - why this value was assigned to the variable.
Hello,
After I close and open and debug again, there are reasonable values now. Don't know what happened, but this bug is not my worries now.
If you got the time, I wish you would answer my new bug. Any help would be appreciated:
https://www.mql5.com/en/forum/346215
![Trailing stop loss only work in next bar, not every single tick as intended. Trailing stop loss only work in next bar, not every single tick as intended.](https://c.mql5.com/36/38/trailing-stop-loss-only-work-in.jpg)
Trailing stop loss only work in next bar, not every single tick as intended.
- 2020.07.08
- www.mql5.com
Hello everyone! So I have a stop loss check in the Ontick function like this: Some part of the code is hide away for simplicity...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi, I am pretty new here and to the platform.
So I wanna deal with trailing stop loss, so I will have to get access to the stop loss of the current postion.
Here is the way I open a position, which has no problem as far as I know.
However, when it enters the function
And I use debug mode an watch the value of CurrentStopLoss, it gave me 8.3575835936946108E-312, which makes no sense.
Attached is the time when I watch the variable, as you can see, the position ticket gives me 2, which I guess means that there indeed has a position.
Thanks a lot. Any help will be appreciated.