Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
"negatively displaced moving average"
Collapse
X
-
I am attaching the code for the ichimoku indicator as a text file and you will see how the programmer detrended the chikouAttached Files
Comment
-
Originally posted by mrmagoo View PostHow can I create a "negatively" displaced moving average? Each time I attempt to, the value setting goes automatically to "1". I want to create a negative moving average, like -14, -49, -89, etc. Thank you, David
David,
If your just want to change the output, Times minus one works.
if (BidChange[0] <= BidChange[1])
{
VolumeDown.Set(totalaskvol * (-1) );
}
if (BidChange[0] > BidChange[1])
{
VolumeUp.Set(totalbidvol); // Green
}
If its the variable, Set min value to less than lowest minus value when first creating the indicator or in the properties section later.
Simply put a minus in front of the integer
ex. -16
Easy


RJay
Comment
-
RJay,
When I right click on my chart, click on indicators, select an SMA, type in
-16 for the period value under Parameters, and click on apply, the SMA automatically displays 1 for the value...I can't make it go to a "negative" value.
What do you think that I am doing wrong.
Thanks, David
Comment
-
Josh,
There are trading methods and strategies that actually use this "negative" displaced moving average setting for trading setups. Some other charting platforms have the ability to use such a "negative" displaced moving average, but I wanted to be able to utilize it in Ninja. Apparently the Ichimoku indicator offers this feature, which is available in ninjatrader file sharing. My only problem there is that I can't download the Ichimoku file share indicator because every time I attempt to, I get an error message stating that "you have custom Ninjascript files on your PC that have programming errors". So, I am also trying to resolve those programming errors so that I can download the Ichimoku file share.
Thanks anyway, David
Comment
-
Displacement is not the same as pulling a negative period. If you want to displace an indicator, when you add the indicator to the chart there is a displacement parameter you can use to move it to the right.
You will need to open up your NinjaScript Editor and press F5 to compile. Then you will need to fix any errors that show up there before you will be able to import.Josh P.NinjaTrader Customer Service
Comment
-
RJay,
I ended up getting what I wanted by right clicking on my chart, clicking on indicators, clicking on SMA, and then clicking on Displacement under General and simply typing in -5, -10, etc. and getting my desired "negative" displacement value for my moving average.
David
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, Yesterday, 11:51 AM
|
0 responses
16 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:51 AM
|
||
|
Started by CarlTrading, Yesterday, 11:48 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
16 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
20 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment