Im trying to figure out how to code taking profit on half my position but am not having much luck.
Essentially what I want is to have an initial hard stop on my whole position. Then when my profit target is reached, take profit on 50% of my position. Then implement a trailing stop on the remainding half of my position.
Also, what if my strategy is running on bar close. How would I go about changing my stops as per above if I dont want to wait till the close of the bar. ie: My entries work on bar close, but I need my stops to be managed 'live'. Is that possible?
Could someone please offer some advice or point me in the right direction.
Thanks.
Please review the LOM WIKI before posting questions to this thread. (
Hi All,
This thread is going to appeal more to Strategy Writers and Programmers. I have been an Elite member for quite some time now and have learned a lot about indicators and strategies …