I am trying to use SubmitOrderUnmanaged and I guide with https://ninjatrader.com/support/help...orderunmanaged .htm
but I dont know why it doesnt work it to me.
I already have:
- IsUnmanaged = true; → In setdefault
- I am using Calculate.OnBarClose
- Without multitimeframes, just normal way
SubmitOrderUnmanaged(int selectedBarsInProgress, OrderAction orderAction, OrderType orderType, int quantity)
protected override void OnBarUpdate()
{
if (isTrigger)
{
SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Market, 1, 0, 0, string.Empty, string.Empty);
}
When you should make the entry, the strategy is automatically unchecked and then the program makes a sound.
in the other hand, when I used this in the strategy, it works good
protected override void OnBarUpdate()
{
if (isTrigger)
{
/// Stop Loss
double stopLossPrice = High[0] + StopLossTicks * TickSize;
SetStopLoss(CalculationMode.Price, stopLossPrice);
/// Entry
EnterShort();
}
}
My interest to use SubmitOrderUnmanaged is because I would like to have double SL using 1 entry... but when I use setstoploss X2 it doesnt work properly, I guess they plus each other
When I try to use SubmitOrderUnmanaged to make SL, it doesnt work neither. For that reason first at all I am trying to make the simple way, with the simple syntax
Thanks

Comment