Thanks
Announcement
Collapse
No announcement yet.
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?
Comment
-
Well, the error jumped on the screen and I quickly removed it, right now I don't remember what it said. Anyway I think I have solved it with the condition <> =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 NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|


Comment