Example: The close crosses above a moving average at 1000, I wish to go long when the price is 2% above that point or 1020.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Percent Above/Below Price Crossing
Collapse
X
-
Percent Above/Below Price Crossing
Instead of going long when a price (close) crosses above a moving average, is there a way in the Strategy Wizard to setup when the price (close) crosses above a moving average by a certain percentage, then go long.
Example: The close crosses above a moving average at 1000, I wish to go long when the price is 2% above that point or 1020.Tags: None
-
I used the Wizard to go long when the close crosses above the moving average. What changes must I make to the generated code (See Attachment) to go long when close is 2% above the crossing point.Attached Files
Comment
-
StarBright2009, unfortunately we don't provide custom coding services, a NinjaScript consultant could be a valuable resource here - http://www.ninjatrader.com/webnew/pa...injaScript.htm
Generally, you would save your the price value at the cross over to a variable then compare it to the current, most recent Close price to determine when it's higher by 2% to trigger an entry for example.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
94 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
49 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
34 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
71 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment