Setting stops @ Trade.CreateMarketOrder(....)
Setting stops @ Trade.CreateMarketOrder(....)
17 Oct 2013, 17:52
Hi
Am i missing something, or there is no way to set stops with this method?
Any other suggestions?
Thanks
Replies
Futuresmo
21 Oct 2013, 18:31
Thanks for response.
The point is that i want to have set stop immediately when opening with position, so opening and modifying position seem like one step too far.
Will try MarketOrderRequest(), also SellStop and BuyStop() methods can serve the purpose.
@Futuresmo
Cerunnos
21 Oct 2013, 18:54
RE:
Futuresmo said:
Thanks for response.
The point is that i want to have set stop immediately when opening with position, so opening and modifying position seem like one step too far.
Will try MarketOrderRequest(), also SellStop and BuyStop() methods can serve the purpose.
This should succeed with Market Order Request (). With Trade.ModifyPosition () I had problems when using a trailing stop. No SL was set twice for some reason!
@Cerunnos
Cerunnos
17 Oct 2013, 19:48
RE:
Futuresmo said:
With ModifyPosition() you can set SL & TP:
Trade.ModifyPosition(openedPosition, stopLoss, takeProfit);
In my view the better alternative is MarketOrderRequest() :
TradeType sell = TradeType.Sell;
var request = new MarketOrderRequest(sell, 10000)
{
Label = "Robot 1",
SlippagePips = 0,
StopLossPips = 10,
TakeProfitPips = 20
};
Trade.Send(request);
@Cerunnos