Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
tick chart and second chart conflicting
Collapse
X
-
tick chart and second chart conflicting
i'm trying to have an entry on the tick 100 chart. and my exit on the second chart. but, when i enter the trade the second chart is at [0] above a certain line (which is the stop line later). its like not enough time has passed for the second bar [0] to be lower than the line in order to trade. is there a way not to read the current second bar when the trade executes?Tags: None
-
Hello SteveReiza,
Have you added a 1 second series with AddDataSeries()?
Is the order being submitted to the BarsInProgressIndex of that 1 second series?
Is the order being submitted during historical or real-time?
What is the Calculate setting set to?
Is TickReplay enabled?
Print Times[0][1], Times[1][0], State, BarsInProgress, Bars[BarsInProgress].IsTickReplay, and all values used in the condition that submits the order along with labels for each value and comparison operator.
Enable TraceOrders. Print the order object in OnOrderUpdate().
Attach the output saved to a text file with your next post.Chelsea B.NinjaTrader Customer Service
-
thanks for the reply. yes the second chart is added to the data series. what is the bars in progress? maybe i can put bars in progress greater than 1 bar in the condition. its a short trade. its just that the momentum in the tick creates the entry condition. but, the exit short stop limit order is acting because the second bar the ticks moved in for the entry condition to happen is still above a certain line. if the second bar can go by. then it will be below the line. and, then i won't have any problems with the exit short stop limit order.
Comment
-
Hello SteveReiza,
Below is a link to a forum post on intra-bar granularity.
Each time the AddDataSeries() method is called, this adds a price series that updates in OnBarUpdate(). BarsInProgress is the index of the series updating OnBarUpdate().
The orders should be submitted to the index of the 1 second series added with the AddDataSeries() method call. If you have only called this method once, the 1 second series will be BarsInProgressIndex 1, while the primary series is BarsInProgressIndex 0.Chelsea B.NinjaTrader Customer Service
Comment
-
thanks for the reply. price action didn't move enough from the next second bar to be above where i have the stop price attached to the indicator so it denies the order. i have it sorted. thanks for the guidance!
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tin34, Today, 03:30 AM
|
2 responses
19 views
0 likes
|
Last Post
by Tin34
Today, 04:11 AM
|
||
Started by sastrades, Yesterday, 09:59 AM
|
2 responses
33 views
0 likes
|
Last Post Today, 04:06 AM | ||
Started by ETFVoyageur, Today, 12:52 AM
|
1 response
17 views
0 likes
|
Last Post Today, 03:36 AM | ||
Started by lollers, Today, 03:26 AM
|
0 responses
12 views
0 likes
|
Last Post
by lollers
Today, 03:26 AM
|
||
Started by aliyahany, Today, 03:16 AM
|
0 responses
4 views
0 likes
|
Last Post
by aliyahany
Today, 03:16 AM
|
Comment