Repository navigation
Order Entry
#103
Replies: 1 comment
|
This would need to be supported by the ninjaTrader dev support |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Looking for some advice on the code required to submit resting orders. I'm playing around with the ATSSampleMACrossOver strategy with some custom entry code which is working well. I'd like to understand how I can change the OrderType from Market to Buy Stop Market (Long) and Sell Stop Market (Short)
I will create a private int entryLimit and use the following logic to calculate the entry level
entryPrice = High[0] + (entryLimit * base.TickSize) //Long
entryPrice = Low[0] + (entryLimit * base.TickSize) //Short
Just struggling with what the OrderType.xxxxxx looks like and hoping someone can point me in the right direction.
Thx.
public override Order SubmitShort(string signal)
{
orderEntry = SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Market, 4, 0, 0, String.Empty, signal);
return orderEntry;
}
All reactions