Sure for first and third, the second is supposed to be an "advanced method variation reserved for experienced programmers ...", hmm...
The fourth solution: keep it like this, it's not so crazy, if the order is not filled during the current bar, well, it's maybe a bit risky to keep the order open.
Anyway, now I know .
ps: I'm not sure to know what this crazy pilot smiley really means, but I like it .
Sorry if I'll ask silly question, but could you please elaborate a bit more on "what you know now", as I don't understand what went wrong so that your order was not filled. Is what happened against the design of a limit order - a bug in ninjatrader handling of limit orders or you simply didn't know how limit orders work.
Thanks
I didn't realize the method I use, EnterLongLimit(arg1,arg2,arg3), has this behavior (the order, submit during bar x, was canceled on bar x+1 if not filled).
The following user says Thank You to sam028 for this post:
If you placed the order on a separate chart, say with month bars or range bars set to a thousand, your orders won't get canceled becouse the bar won't complete with the order pending.
Also, if you're using something similar to check status of limit orders:
or
I'm still playing with the above code (was trying to get a "simple" limit order strat working) but still having trouble getting the unfilled limit order reset to a new level if not filled in 1 or 2 bars. I believe the strat where I pulled this out of was having problems due to the attempted use of 2 independent contracts so that 1 could have a target profit and the second could have a trailing stop with it. Still on the "drawing board". Do you have any "resetting of limit orders" types of strats that could be shared?
reminds me of the Wright Brothers ... sometimes I feel like I'm still in the bicycle shop - dreaming of future days of flying above the clouds ...
@RJay: Sure, this is what Big Mike says in post #51
@Zeller4: no, sorry, I don't have examples for this. So many thing can go wrong in an ATS, if you can keep order management as simple as possible, it's better.
@sam028 - You say you put on the trade at the close of the market (I'm assuming 4pm NY time) but the Globex session on index futures closes at 4:15pm NY time so basically you have 15 minutes to do what it's going to do, correct? Otherwise you're technically holding it overnight if you're still in a position at the beginning of the next Globex session at 5pm, correct? Take the ES as an example.
But, I've been very lucky, and it should have been a negative day. I've been freezing the Virtualbox which host this NT instance, then wake it up, refresh the charts, connect the second broker, add the strats... But it seems that this is not a good idea, because when one robot was buying a contract for one broker, the other robot was selling the same on the broker. So it should have been a flat day, but 2 contracts were not filled (limit orders).
So, another lesson: restart NT every days
Week 1: +977.5$ (+1217.5) before com
Week 2: +130$ before com
Week 3: +1180$ before com Week 4: -152.5 $ before com From the beginning: +1994.5$ (+2255) before com