I'm trying to code a trail stop loss into my system, but I can't seem to find the correct code.
My idea is pretty simple. As I enter a position on lets say 2000 points, I want to have 200 point stoploss. The market starts moving up and as I reaches a 100 point profit I want the stoploss to move to 2000 points, instead of staying at the initial 1800 points.
Where can I find this code?
Comment