Posted 8/30/2009 19:25:51
|
|
|
|
In the following code, the TargetPriceType for StopLossType and ProfitTargetType are returning as "Percentage" even though it is explicitly set to "None". The correct behavior is observed only if settings.StopLoss or settings.TargetPrice is assigned a value.
public override void NewBar()
{
if (Close.Current < Open.Current)
{
PositionSettings settings = new PositionSettings();
settings.PositionType = PositionType.Long;
settings.OrderType = OrderType.Market;
settings.ProfitTargetType = TargetPriceType.None;
settings.StopLossType = TargetPriceType.None;
Position position = OpenPosition(settings);
Console.WriteLine("position.ProfitTargetType = "+position.ProfitTargetType);
Console.WriteLine("position.StopLossType = "+position.StopLossType);
}
}
|
|
Posted 8/31/2009 09:17:57
|
|
|
|
| This will be corrected in the next build.
|
|
|
|