RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Bug in StopLossType and ProfitTargetType Expand / Collapse
Message
Posted 8/30/2009 19:25:51 Post #9267
 

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member
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 Post #9275
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
This will be corrected in the next build.
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:45am

2005-2007 © RightEdge Systems