Нет. Выставление идет так:

Code:
StopLoss stopLoss;
for (int barIndex = 0; barIndex < barsCount; barIndex++) {
int nextBarIndex = barIndex + 1;
IPosition position = source.Positions.LastPositionActive;
...
stopLoss = new StopLoss(stopLossBaseList, koeff); // both are positive
stopLoss.createOn(position, nextBarIndex);
}


StopLoss
Code:
public class StopLoss {
		private IList<double> stopLossBaseList;
		double koeff = 0;
			
		public StopLoss(IList<double> stopLossBaseList, double koeff) {
			this.stopLossBaseList = stopLossBaseList;
			this.koeff = koeff;
		}
		
		public void createOn(IPosition position, int barIndex) {
			double stopLossPrice = stopLossBaseList[barIndex - 1] * koeff;
						
			if (position.IsShort) {
				stopLossPrice = position.EntryPrice + stopLossPrice;
			} else {
				stopLossPrice = position.EntryPrice - stopLossPrice;
			}
			
			position.CloseAtStop(
				barIndex,
				stopLossPrice,
				SignalUtils.STOP_LOSS_CLOSE
			);
		}
	}


Отредактировано Sherman81 (Tue Mar 29 2011 12:42 PM)