NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-01-2009, 10:14 AM   #1
binwang2
Senior Member
 
Join Date: Jan 2009
Posts: 216
Thanks: 0
Thanked 1 time in 1 post
Default OnBarUpdate Vs. OnExecution

Hi NT experts,

I have a generic questions on the difference in handling order status with OnBarUpdate and OnExecution.

Right now stop and target orders are submitted in OnExecution after verifying the associated entry orders are filled.

Are there any pitfalls if stop and target orders are submitted in OnBarUpdate after vefifying entries are filled? Suppose CalculateOnBarClose = false.
binwang2 is offline  
Reply With Quote
Old 12-01-2009, 10:24 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,556
Thanks: 261
Thanked 1,014 times in 995 posts
Default

binwang2, the difference would be the slightly different timing when those methods are called then, OnBarUpdate() on each tick (thus can depend on the speed of the market), while OnExecution() would be called for the incoming executions directly, thus OnExecution() would give you more granular access in the event cycle.
NinjaTrader_Bertrand is online now  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable transfer/access between OnBarUpdate and OnExecution noincomenojobnoassets Strategy Development 9 09-23-2009 03:36 AM
OnOrderUpdate() or OnExecution??? whself beginner Connecting 8 03-25-2009 06:46 AM
OnExecution Stops GreenTrade Strategy Development 1 03-18-2009 07:01 AM
OnExecution Mike Winfrey Strategy Development 2 12-14-2008 06:59 AM
OnExecution question... heech Strategy Development 3 11-26-2008 03:09 PM


All times are GMT -6. The time now is 02:11 AM.