Here is what I have in my onexecution area.
protected override void OnExecution(IExecution execution)
{
if (execution.Order != null
&& execution.OrderState == OrderState.Filled)
LongLimit = ExitLongLimit(0, true,DefaultQuanity,(AvgPrice + (longSignalHigh - longSignalLow)*TargetPerc),"LongTarget","LongEntryA");
}
In short, 1 or more candles ago a signal candle was created. I take the high and the low from that candle and multiply it by a certain percentage and add it to my entry price. That becomes my profit target.
LongLimit is a variable that I declared under variables and only here am I defining what it is. I am using the OnExecution() help page for samples as well as one of the sample education codes that are found on this site by Josh.
Hopefully that is enough information.
Thank you for your help

Comment