To help better understand my strategy and to optimize it, I'd like to do a few things after a trade is placed.
1. I'd like to draw vertical lines from the trade entry point to the TP/SL points on the chart. I've interrogated the order object and the position object in Visual Studio and can't find anything resembling those points. The "Draw.Line" method looks suitable, but again I can't find the targets from the order or position objects. I know I can store them in a global variables, but this is a learning exercise for me and I hate global variables.
2. I'd like to perform partial close events at certain points. F.E. If the trade moves in my favor 80% of the target price, I'd like to close 50% of the position and move the stop loss a few pips above the entry price.
Comment