if (Position.MarketPosition == MarketPosition.Long)
{
ExitLongLimit(LXprice, "LX");
}
if (Position.MarketPosition == MarketPosition.Short)
{
ExitShortLimit(SXprice, "SX");
}
If the order isn't filled, I'm happy to have the order canceled at the end of each bar and will calculate a new exit point for both long and short entries.
Once I get over this hurdle, I'd like to tie these exits to specific entries but the examples are limited on the ExitLongLimit help page. Could you please give me an example of how this is done? ie: Exit a long position, naming the exit so it shows up on the chart and also tying that exit to a specific entry.
Also... I'd rather not use SetProfitTarget. When I tried this, only the Long Limit entries worked. Short Limit entries did not show up in a back test.
Comment