I want to research a strategy. For this I need to set the Stop Loss and Take Profit of the order (either buy or sell).
I have been reading the help and the most similar thing I have see is "StopOrder" under the order method. But, I think this is related to the order type, not the loss or profit price for the order.
I need to use this way because I will set the Stop Loss on an indicator calculated in the moment the trade is open, not later, this is because later the indicator will have another number.
To make things easier in case I didn't explain well:
1) Let's imagine the strategy gives me an long trade.
2) Enter the Long trade, and at the same time I want to make the Stop Loss in the value of the current "simple moving average of 50 periods" and the take profit at the "simple moving average of 200 periods".
As you can see I can't use the moving average later, since I need to calculate my risk (amount I want to invest or number of shares) at the moment of the trade, later this indicator will have a different value that the value they have when the trade was open.
Hope it's possible.
Thank you!