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
Elder's - Force Index
Collapse
X
-
if it's just swapping EMA for SMA, then that's a 10-second fix:
tools | edit ninjascript | indicator > ForceIndex2
find lines 63-64:
Code:// create SMA-Period of ForceIndex arrForceIndexPeriod.Set(SMA(arrForceIndex,Period)[0]);
Code:// create EMA-Period of ForceIndex arrForceIndexPeriod.Set(EMA(arrForceIndex,Period)[0]);
if that solves the "math" issue, then we'll get to the histogram
Comment
-
excellent! got your other changes in:
- added the histogram that plots the ForceIndex
- colored histogram up-tick bars green, down-tick bars red like elder's MACD but you can set these to a neutral color if you prefer
- allowed for you to select the PeriodType (EMA, SMA, etc.) and set it to default to EMA
- also added an outline of the ForceIndex, but set the default color to Transparent (this is a personal preference of mine on MACD and figured i'd give you that capability if you like/need).
so here 'tis ... enjoy,
-eAttached Files
Comment
-
e-man you da bomb man!! (Randy on American Idol). Really appreciate your expertise on this. I owe you a round of golf if you ever get to Calgary! Can't figure how to load a screenshot (too big) or would attach it for you. Looks identical allowing for the different data. Thanks again e-man!
Comment
-
e-man,
Thank you for this indicator. However, there seems to be a fundamental issue with the display scaling.
I am trying to think of a way to overcome this, but frankly do not know how.
The issue is that in times of lower volume, the indicator will appear to flat-line near the zero-line because the actual Values for the indicator are too small vs. the historical scale.
Any idea on how to make this more of a 0-based indicator, with a max 100/-100 setting?
Mike
Comment
-
hey Mike,
good point on the change needed ... i was looking thru the code for RSI like Bertrand suggested, and these two lines seem to do the magic:
Code:double rs = avgUp[0] / (avgDown[0] == 0 ? 1 : avgDown[0]); double rsi = 100 - (100 / (1 + rs));
Code:arrForceIndex.Set(Volume[0]*(Close[0]-Close[1]));
thanks,
-e
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Today, 10:57 PM
|
0 responses
5 views
0 likes
|
Last Post
by DJ888
Today, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
Comment