scjohn
06-20-2007, 08:23 PM
I'm trying to to get the Strategy Wizard to issue a Profit Target order based the Average Entry Price and using the indicator ATR as the offset. The Wizrd generates the correct code for the Exit Long Limit but on the Exit Short Limit I can't seem to get the Wizard to accept a minus offset. It will not accept my minus sign.
Here is the code that the Wizard generates:
// Condition set 3
if (Position.MarketPosition == MarketPosition.Long)
{
ExitLongLimit(Position.AvgPrice + ATR(15)[0], "Exit Long PT", "Entry Long");
}
// Condition set 4
if (Position.MarketPosition == MarketPosition.Short)
{
ExitShortLimit(Position.AvgPrice + ATR(5)[0], "Exit Short PT", "Entry Short");
}
I can't seem to be able to tell the Wizard that for a Short Profit Traget the ATR needs to be subtracted from the Position.AvgPrice.
Thanks
Here is the code that the Wizard generates:
// Condition set 3
if (Position.MarketPosition == MarketPosition.Long)
{
ExitLongLimit(Position.AvgPrice + ATR(15)[0], "Exit Long PT", "Entry Long");
}
// Condition set 4
if (Position.MarketPosition == MarketPosition.Short)
{
ExitShortLimit(Position.AvgPrice + ATR(5)[0], "Exit Short PT", "Entry Short");
}
I can't seem to be able to tell the Wizard that for a Short Profit Traget the ATR needs to be subtracted from the Position.AvgPrice.
Thanks