Setting a trailing stop.
Created at 03 Dec 2018, 03:25
Setting a trailing stop.
03 Dec 2018, 03:25
Im sure this is a simple question but i havent managed to do it.
Im trying to set a trailing stop to a possition when its opend.
It is my understaning from examaning the API refrance explorer that to set it you using
public bool HasTrailingStop{ get; } ExecuteMarketOrder(TradeType.Buy, Symbol, 10000, "myLabel", 10, 10, 2, "comment", true); Print("Position was opened, has Trailing Stop = {0}", result.Position.HasTrailingStop);
This doesnt build however. In effect I want the code to not use stop loss or take profit but instead use a trailing stop with a 10 pip spead.
Any help would be much appricatied,
WILL
PanagiotisCharalampous
03 Dec 2018, 11:23
Hi William,
Can you share with us the complete cBot code so that we can fix it? It the above code sample the definition of result is missing.
Best Regards,
Panagiotis
@PanagiotisCharalampous