![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
Let's say Bar[1] triggers a signal for a EnterLong
On Bar[0] which is a 15 minute bar (a lot of gyrations can happen in 15 minutes...how does the simulator fill my EnterLong order? At the OPEN, HIGH, LOW, CLOSE? does it fill it at the 1st Tick or 1st Minute of the 15 min Bar time series? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
Hello Oil_Trader,
It depends on what setting is used for 'Calculate on bar close'. If set to False, your strategy conditions will be calculated on each incoming tick. If set to True, conditions are calculated at the close of a bar. The order would be sent at the open of the next bar. More information can be found at the link below. http://www.ninjatrader-support.com/H...BarClose1.html
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
But for calculation of indicators? will it use the 15 minute bars? and not the tick bars?
What if there are no ticks, it is just 1 minute bars? So only the orders that will apply to? |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
It will use the bars on which you apply the indicator. If you apply the indicator in a 1 minute chart, the indicator will use 1 minute bars for calculations. If applied on a 150 tick chart, it will use 150 tick bars for its calculations.
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
I made CalculateOnBarClose = false;
and it still calculates enter/exit position at the close of 15 minute bar. I need it to CalculateOnBarOpen for the Entry/Exit. is this possible? |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
Can you please tell me how you tested your strategy. Did you test it on real-time data or did you test it on historical data only (Strategy Analyzer)?
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
NT7 Simulator Mode for testing
The database has 1 minute data but the bars im using are 15 minute bars. |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
Can you please check if 'Calculate on bar close' is set to False in the Strategy parameter window (the window that appears when you initiate a strategy) as well.
In addition, what happens if you test the SampleMACrossOver strategy with 'Calculate on bar close = False' in the same chart? Does it trigger orders only at the end of bars or intra-bar?
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
Calculate on bar close' is set to False in the Strategy parameter window (the window that appears when you initiate a strategy) as well.
I dont see this on the parameter window? |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
Do you see the option listed if you select the SampleMACrossOver strategy?
Does your custom strategy compile successful?
Jason
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
Ok I see it but that's when you activate in on chart or control panel....not in the strategy analyzer...
where is it if i use the strategy analyzer? yes my custom strategy is fine with the regular calculatebaronclose.
Last edited by Oil_Trader; 09-01-2010 at 06:06 AM.
|
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Aug 2007
Location: Breda, Netherlands
Posts: 11,223
Thanks: 83
Thanked 333 times in 325 posts
|
I see - the Strategy Analyzer will only use historical data. I assumed you ran the strategy on real-time data.
The 'Calculate on bar close' setting is disregarded - your conditions will be calculated at the close of each bar in the Strategy Analyzer. Unfortunately there is no way to change this.
Jason
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delay fill orders in Simulation Mode | newbietrader | ATM Strategies (Discretionary Trading) | 1 | 08-30-2010 10:13 PM |
| Graphics future DAX 15 minute | aguma | Version 7 Beta General Questions & Bug Reports | 14 | 06-16-2010 11:49 AM |
| range of selected 15 minute bars | stephenszpak | General Programming | 11 | 06-28-2009 02:46 AM |
| limit order fill simulation | andrewbee | Strategy Development | 4 | 03-11-2009 10:33 AM |
| Can 15-Minute Bar Backtest bars start on 7:20AM Session Start instead of 7:15 AM? | ChiTrader2000 | Strategy Development | 5 | 01-30-2009 10:29 AM |