Currently I just have the stops set up
For the Longs I have this
if (Position.MarketPosition == MarketPosition.Long) { longStopPrice = Low[0] - 4 * TickSize; SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.StopMarket,1,0,longStopPrice); }
if (Position.MarketPosition == MarketPosition.Short) { shortStopPrice = High[0] + 4 * TickSize; SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.StopMarket,1,0,shortStopPrice); }
The longStopPrice and shortStopPrice are defined in public class
public class TestManual : Strategy
{
private int longOrderBar = 0;
private int shortOrderBar = 0;
When I test the strategy I enable the strategy in the strategy tab, and then take a position and the strategy immediately goes from True to False on the Sync.
Attached is a shot of my settings, which I believe should be correct for the unmanaged approach. For Stop & Target submission, I have tried both "By Strategy position" and "Per Entry Execution" and neither have worked.
Any ideas what may be causing this to not place my stop?
Comment