Thanks,
Erik
protected override void Initialize() {
[SIZE=2] SetProfitTarget([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"Long Limit Order"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], CalculationMode.Percent, 5);[/SIZE]
}
protected override void OnBarUpdate() {
if (BarsInProgress != 0) return;
if (Positions[0].MarketPosition != MarketPosition.Flat && BarsSinceEntry([COLOR=#a31515]"Long Limit Order"[/COLOR]) >= 2) {
ExitLong([COLOR=#a31515]"Long Limit Order"[/COLOR]);
return;
}
...
if (some condition) {
...
if (some condition) {
EnterLongLimit(100, SomePrice, [COLOR=#a31515]"Long Limit Order"[/COLOR]);
}
}
}

Comment