[FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] Initialize() { CalculateOnBarClose = [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]; [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000]// TraceOrders = true; [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]} [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]<summary> [/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000] Called on each bar update event (incoming tick) [/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]///[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#808080]</summary> [/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] OnBarUpdate() { Print([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"OBU"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]); [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] (Historical) [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2];[/SIZE][/FONT] [FONT=Courier New][SIZE=2]} [/SIZE][/FONT]
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnBarUpdate
Collapse
X
-
OnBarUpdate
The following code only executes once when I initialize the strategy. Afterwards, I get nothing. I would like to see the code Print "OBU" on each tick. What would be the reason this isn't working?
Code:Tags: None
-
I am getting the following error...
"Error on calling 'OnBarUpdate' method for strategy 'MyStrategy': Object reference not set to an instance of an object."
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by junkone, Today, 11:37 AM
|
0 responses
1 view
0 likes
|
Last Post
by junkone
Today, 11:37 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
5 responses
34 views
0 likes
|
Last Post Today, 11:32 AM | ||
Started by proptrade13, Today, 11:06 AM
|
1 response
6 views
0 likes
|
Last Post Today, 11:27 AM | ||
Started by love2code2trade, 04-17-2024, 01:45 PM
|
4 responses
34 views
0 likes
|
Last Post Yesterday, 10:31 PM | ||
Started by cls71, Today, 04:45 AM
|
2 responses
10 views
0 likes
|
Last Post
by eDanny
Today, 11:11 AM
|
Comment