KT
Topics
26 May 2014, 23:28
3577
6
Replies
ktzn
27 May 2014, 10:56
RE:
modarkat said:
There are two ways to do that.
First of all you can convert moving average value to pips distance from a spot price.
Another way is to execute market order without TP and then modify TP as an absolute value.
ExecuteMarketOrder(TradeType.Sell, Symbol, Volume, label, StopLossPips, null); if (LastResult.IsSuccessful) { ModifyPosition(LastResult.Position, LastResult.Position.StopLoss, mAverage); }
Thanks alot!
It works but not sure if it is doing exactly what i want. I want it to keep updating the target to current SMA, not just to modify the position once at entry to make target SMA.
The idea is that all trades should be exited as soon as price touches SMA no matter if it is long or short
is that possible?
@ktzn
ktzn
29 Jul 2014, 20:40
RE: RE:
Thanks Breaker!
Have completely forgotten to check here for a while - tried to look at what you posted but I cant get it to work according to what i have in mind :(
Possible to have a quick skype chat maybe, I can also post the full code here if it helps.
breakermind said:
@ktzn