Just wanted to know if any of you can help me or point me in the direction to find out how to code the following:
I want to take 50% of my profit as soon as my position has gone 20 pips in my favor after my breakeven has been activated. And would like to know if this can be done on the same bar and not on the next bar.
I am currently using the stops and targets study provided by MultiCharts and its working great, I use a stop loss and a break even once my position has reached the determined amount of pips (in my case 20 pips). What I cannot do and hopefully I can get some help or guidance is how to take 50% of my profit once I my breakeven has been activated (not hit but activated ). I have breakeven activated after 20 pips aswell.
you will have to use your own exit orders for that, as the build in reserved words for exits will only close out the full position. If you want to be able to issue orders on the same bar that a condition is met you will likely also need intrabar order generation.