NexusFi: Find Your Edge


Home Menu

 





Strategy market orders


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 2 posts (1 thanks)
    2. looks_two zeller4 with 2 posts (0 thanks)
    3. looks_3 sam028 with 1 posts (0 thanks)
    4. looks_4 Saroj with 1 posts (0 thanks)
    1. trending_up 4,494 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404

Big Mike, samo028,

i've got a sample strat from NT (Vervoort) that i'm testing entries with. I know the NT market orders take essentially a "worst-case scenario" for the fills of those orders. I've been working with limit orders to improve the position entry but my question revolves around the use of this type of code snippet with EnterLong(), EnterShort():
 
Code
 
 
Initialize section contains 
CalculateOnBarClose = true;
 
OnBarUpdate section contains
 
if (CrossAbove(ZeroLagTEMA(Typical, Period), ZeroLagHATEMA(Period), 1))
{
EnterLong(1 , "Long-1");
DrawVerticalLine("VertHL"+CurrentBar,0,Color.Blue,DashStyle.DashDotDot,2);
}
if (CrossBelow(ZeroLagTEMA(Typical, Period), ZeroLagHATEMA(Period), 1))
{
EnterShort(1, "Short-1");
DrawVerticalLine("VertHS"+CurrentBar,0,Color.Red,DashStyle.DashDotDot,2);
}

I've put vertical lines on the chart to show where the setups occurred. This appears to take trades on the open of the next candle. If this is the norm, then I understand.

But, in some of my other strats, when comparing manual entries with an ATM strat vs an automatic strat, the actual order appears to be LATE AND WORSE for the entry.
Do you know of any way to enter trades with the automatic strategy that would show a more realistic entry and not just the worst case?
Have you been using any bar "timer" to show entering before the close of the last bar ie (# of seconds left in the bar, # of ticks remaining, etc.)?

Thanks for you help.


KZ


Attached Thumbnails
Click image for larger version

Name:	CL 10-09  8_21_2009 (4 Range).jpg
Views:	250
Size:	88.8 KB
ID:	1373  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Topstep Acquires The Futures Desk -- Prop Firm Consolida …
Funded Trading Evaluation Firms
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
The May 31 Binary: 60% Trump Declares Iran Ops Over, Onl …
Prediction Markets & Event Contracts
February NFP Preview -- Why This Mornings Jobs Number Co …
Traders Hideout
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557

Entry is always going to paint on the bar after the actual bar used to determine whether or not it should enter, if using COBC false.

If bar 15,000 is used to determine if it should go long or short, the entry will occur on bar 15,001, in other words. This is normal, and for a market order you would see it occur at the Open of the 15,001 bar most of the time unless there is slippage.

Limit orders and strategies are a big problem. I can't get into all the issues because there are so many. Stick with market orders until you are ready to spend a year troubleshooting and learning the finer point of NT's nuances like I have.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,557


btw, an easy way to prove/disprove "late" entries. Print the bar stats right when your 'signal trigger' occurs and see what they say.

Keep in mind, a market order will us the GetCurrentAsk() [long] or GetCurrentBid() [short], so Close[0] is not going to be the fill price in most cases, it will be the Open of the bar that does not yet exist when this Print() statement was executed, but you can see it on screen.

 
Code
                            

Print(Time[0] + " (# " CurrentBar "):  Close[0] was " Close[0]); 
Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404


Big Mike View Post
...
Limit orders and strategies are a big problem. I can't get into all the issues because there are so many. Stick with market orders until you are ready to spend a year troubleshooting and learning the finer point of NT's nuances like I have.

Mike

well, i knew it would be a long process, I guess i'm about half-way there then! I've heard about several of the issues and that's why i'm still working with the market orders...

also, makes sense about the print statements. i'll give that a try with the Close[0] is the same as the Open of the new bar.

thanks, Mike
Kirk


Started this thread Reply With Quote
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632

That's another reason why we should all be very very careful with strategies backtests.
So many strange results...
In my opinion, the backtest process with NT is fine for having the "big picture", but nothing, absolutly nothing (even market replay) replace a strategy on a real account with a real data feed.


Follow me on X Reply With Quote
  #6 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416

Mike, do you know if the NT issues with limit orders will be corrected in NT7?


Reply With Quote




Last Updated on August 27, 2009


© 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