Modification of Stoploss

 
I'm working on my own EA based on my trading plan, which is 90% working. When conditions are met it opens a order which a 2:1 reward-risk ratio

The problem is modifying the Stoploss to set to Order price after it passes 50% reward 
Files:
 
Show your attempt if you need coding help.
 
Alain Verleyen #:
Show your attempt if you need coding help.
Sorry I'm new to the mql4 language 
Files:
 

If your program does not do what it should the debugger will tell you where and why:

Code debugging:  https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5:  https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code, scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/272

Code debugging - Developing programs - MetaEditor Help
  • www.metatrader5.com
MetaEditor has a built-in debugger allowing you to check a program execution step by step (by individual functions). Place breakpoints in the code...
Reason: