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.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
191 views
0 likes
|
Last Post
by Hasadafa
Today, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,230 views
0 likes
|
Last Post Today, 08:07 PM | ||
Started by andrewtrades, Today, 04:57 PM
|
1 response
14 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
7 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
441 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
Comment