Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Question about OnBarUpdate of Strategy
Collapse
X
-
Question about OnBarUpdate of Strategy
In a strategy, the OnBarUpdate method is read on every tick or on bar close? I have the CalculateOnBarClose variable set to true on initializebut it does not exit where I want to. The way I have it set up is to read on bar close and compare to the open price. If the change is N number of points then exit. But I think it is executing before like if it was reading ticks. In simulation it does run as it should.Tags: None
-
Well, what I was trying to say is that I programmed my strategy to enter at certain point and to exit when it reaches certain number of points gained/lost. Now, it has to happen after the bar closes; it checks where it closed and if it has reached either point of profit/loss or more then fires the order. It is not happening like that though. It is reaching the profit point in the middle of a bar and firing the order there; but not after the bar has closed.
In any case, I'll try that and see the time stamp.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 06:28 AM
|
3 responses
13 views
0 likes
|
Last Post Today, 12:00 PM | ||
Started by ScottWalsh, Yesterday, 04:29 PM
|
4 responses
18 views
0 likes
|
Last Post Today, 12:00 PM | ||
Started by 09try, 03-29-2024, 01:27 PM
|
7 responses
69 views
0 likes
|
Last Post
by ntcat
Today, 11:57 AM
|
||
Started by Gibranes, Today, 10:05 AM
|
4 responses
19 views
0 likes
|
Last Post
by Gibranes
Today, 11:54 AM
|
||
Started by f.saeidi, Today, 08:12 AM
|
2 responses
15 views
0 likes
|
Last Post
by f.saeidi
Today, 11:46 AM
|
Comment