![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
I am using Ninjatrader wizard to build new strategy, and want my strategy to send orders immediately when I press Enable in the Control Panel, and not wait for incoming tick to activate the strategy. How do I program this condition using the wizard? I use COBC=False and GetCurrentAsk()>GetCurrentBid() as my condition but it still waits for incoming tick to send orders.
Thank you for assistance |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
alvin050, this would be unfortunately expected when working with your code in OnBarUpdate() - a tick has to be seen to trigger the logic, eventhough you're working with COBC = false. Please also keep in mind your GetCurrentAsk / GetCurrentBid properties only could work in realtime, for historical data they would use the close price.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Orders open and then close immediately reagardless | forextrader2003 | ATM Strategies (Discretionary Trading) | 1 | 01-11-2012 03:04 PM |
| Stop Orders at Session Start which are immediately executable | Joerg | Version 7 Beta General Questions & Bug Reports | 7 | 08-10-2010 07:48 AM |
| Orders Sent then Immediately Cancelled on Multi TF | hodgsos | Strategy Development | 2 | 11-03-2009 11:51 AM |
| Why does my strategy send orders by itself? | atrader | Strategy Development | 5 | 09-24-2009 02:33 PM |
| my limit orders immediately filled at market .? | mini_me | SuperDOM and other Order Entry Windows | 6 | 05-31-2009 11:24 AM |