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
Hello, I have attached the code for a function I am using to move the stop loss to break even. I do not see any issue with the code, but I am obviously missing something because it is not working. It is supposed to iterate through all open positions, and if a position is 5 pips in profit the stop loss is to be moved to breakeven. I tried to add debug codes to monitor the current profit for open positions but even that is not working properly.
Here is the code:
Any help would be greatly appreciated and I can provide the rest of the code as well.