Help with change in entry price
Created at 25 Jul 2013, 23:05
Help with change in entry price
25 Jul 2013, 23:05
Hello,
Please help with this code. I am creating a buy limit option setting the target price, it gets created fine but when it is executed the Entry Price has change.
Thanks,
Best regards,
protected override void OnBar() { int index = MarketSeries.OpenTime.Count - 1; var _startTime = MarketSeries.OpenTime[index].Date.AddHours(22); var _cadahora = MarketSeries.OpenTime[index]; if (_cadahora == _startTime) { double TargetPrice = MarketSeries.Close.LastValue + 75*Symbol.PipSize; double? StopLoss = MarketSeries.Close.LastValue + 50*Symbol.PipSize; double? TakeProfit = MarketSeries.Close.LastValue + 140*Symbol.PipSize; var Expiration =_startTime.Date.AddHours(23); Trade.CreateBuyLimitOrder(Symbol,Volume,TargetPrice,StopLoss,TakeProfit,Expiration); }
Garcho
25 Jul 2013, 23:56
Found the problem...
@Garcho