NexusFi: Find Your Edge


Home Menu

 





Multiple order execution


Discussion in NinjaTrader

Updated
    1. trending_up 1,456 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 olres7 
Gatlinburg TN/USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Futures
Posts: 12 since Sep 2015
Thanks Given: 5
Thanks Received: 0

Hi there!

I have a question. How to do multiple orders with IOrder null?

Here is my code:

private IOrder myEntryOrder = null;
protected override void OnBarUpdate()
{
// Submit an entry order at the low of a bar
if (myEntryOrder == null &&
High[0] > MAX(High, 30)[1] &&
Range()[0] <= 13*TickSize)
{
myEntryOrder = EnterShortLimit(0, true, 1, High[0], "Long Entry");

}
}

protected override void OnOrderUpdate(IOrder order)
{
if (myEntryOrder != null && myEntryOrder == order)
{
if (order.OrderState == OrderState.Filled)
entryOrder = null;
}
}

myEntryOrder = EnterShortLimit(0, true, 1, High[0], "Entry1");

I want to add 2 more EnterShortLimit orders with the same entry rules. How can I do that?
Do I need to add 2 more objects like myEntryOrder1 and myEntryOrder2?
How can I manage them in OnOrderUpdate?


private IOrder myEntryOrder = null;
protected override void OnBarUpdate()
{
// Submit an entry order at the low of a bar
if (myEntryOrder == null &&
High[0] > MAX(High, 30)[1]
Range()[0] <= 13*TickSize)
{
myEntryOrder = EnterShortLimit(0, true, 1, High[0], "Entry1");
? = EnterShortLimit(0, true, 1, High[0] - 2*TickSize, "Entry2");
? = EnterShortLimit(0, true, 1, High[0] - 4*TickSize, "Entry3");

}
}

Pls help me to figure out
Thanks,
Serge


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
SEC Advisory Committee Backs Tokenized Securities Exempt …
Traders Hideout
MegaETH Proves the Crowd Right: Prediction Markets Calle …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
Cboe Files for Near 24x5 Equities Trading -- December 20 …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Algo automated / semi-automated trading anyone?
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


Yes make 2 extra object to store the order 2 & 3

And make 2 extra if's

Test all on market replay..

Good luck


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on October 20, 2015


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts