![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Sep 2008
Posts: 356
Thanks: 1
Thanked 1 time in 1 post
|
protectedoverridevoid OnBarUpdate()
{ if (Historical){ Print("in historical"); return; } if(Bars.FirstBarOfSession ) { Print("in FirstTickOfstrategy"); } the FirstTickOfstrategy is not getting fired. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 981 times in 963 posts
|
Hi junkone, which chart session time have you defined? Please make sure to enable the strategy before the first bar of the session starts building.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2008
Posts: 356
Thanks: 1
Thanked 1 time in 1 post
|
how do you define session?
1. on connection with IB 2. when chart loads up with ib session 3. when the stretegy starts |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Double click on your chart and you define your session there. Any strategy thrown onto that chart will use the chart session you have defined.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ExitShortStop fired again | xewoox | Automated Trading | 9 | 02-17-2009 11:18 AM |
| Bars.FirstBarOfSession not set to true during backtest? | tradefaz | General Programming | 1 | 09-03-2008 08:19 AM |
| Bars.FirstBarOfSession opening price 1 min vs 1000 volume charts | ATI user | Charting | 4 | 06-10-2008 06:40 AM |
| Question about FirstBarOfSession | lucktrader | General Programming | 1 | 05-10-2008 02:32 PM |
| multiple (unwanted) orders fired on 'outside' bars | roxana | Automated Trading | 1 | 05-25-2007 11:13 AM |