Thanks
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
Cross problem in volatile market
Collapse
X
-
Cross problem in volatile market
Hello, I am having problems with the condition "Cross above" or "Cross below" in times of volatility. For example, I have a condition that triggers when the price crosses an average but it has given me error I suppose for a sudden movement of the price. It is the reason I find him. Would that be possible? In that case, would the option of => or =< be better depending on the case?
ThanksTags: None
-
Hello herkok,
Thanks for your reply.
With OnPriceChange this means your code will execute on every change in price and during volatile times it is certainly possible that a cross condition can be true on one price change and false on the next and repeating until price moves consistently in a direction. It is also possible that while the cross may be triggered, as price retreats it would look like the cross has not occurred.
Basically a cross condition would be comparing the previous bar to the current bar to see if it is greater (or lessor) compared to the reference (other indicator or numerical value) to determine the cross condition.
What is the error you are experiencing?
Paul H.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_PaulH View PostHello herkok,
Thanks for your reply.
With OnPriceChange this means your code will execute on every change in price and during volatile times it is certainly possible that a cross condition can be true on one price change and false on the next and repeating until price moves consistently in a direction. It is also possible that while the cross may be triggered, as price retreats it would look like the cross has not occurred.
Basically a cross condition would be comparing the previous bar to the current bar to see if it is greater (or lessor) compared to the reference (other indicator or numerical value) to determine the cross condition.
What is the error you are experiencing?
thanks
- Likes 1
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
0 responses
10 views
0 likes
|
Last Post
by mly916
Today, 09:48 PM
|
||
Started by Mikey_, Today, 09:21 PM
|
0 responses
11 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
13 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Comment