Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Calling terms from another indicator
Collapse
X
-
Calling terms from another indicator
I'm trying to set up a sound alert based on certain indicators reaching a predefined level. Those indicators were also programmed in Ninjascript. How can I call on some of those levels in a new indicator (the indicator for sound alert)Tags: None
-
Unfortunately, I don't know who the author is . . . it was a post on a forum. But maybe you can help. I can't post the whole code here (it's pretty long) but see below for the relevant sections.
I want an sound alert when both conditions are met in either of the following 2 situations:
Situation 1
trendingHist < -10
primeLow [1] > primeLow [0]
Situation 2
trendingHist > 10
primeHigh [1] < primeLow [0]
The indicator is named gpLogicPrimes
This is in the variables section:
privatedouble[] primeHigh; //Array for prime highs
privatedouble[] primeLow; //Aray for prime lows
DataSeries trendingHist; //Trending Histogram
This is in the onbarupdate section:
//Calculate Trending Histogram
trendingHist.Set((trendingERG[0] - trendingERG[1]) * 75);
. . . .
//Display price at each extreme support peak, update list with new extreme price value
if (eRGTradingSupport)
{
if (LowestBar(Low, CurrentBar - supportOscTradeBar) == 0 )
{
primeLow[1] = Low[0];
if (primeLow[1] > primeLow[0])
{ . . . .
Comment
-
Insearch,
Unfortunately I cannot be of much assistance. For 3rd party indicator support you will have to inquiry the original author.
As a guess you can try something along the lines of this in a separate indicator:
Code:if (gpLogicPrimes().trendingHist[0] < -10 && gpLogicPrimes().primeHigh[1] > gpLogicPrimes().primeLow[0]) // Do something;Josh P.NinjaTrader Customer Service
Comment
-
Like I mentioned earlier Insearch, there is not much I can do to assist you, especially for syntax. I have no idea how the 3rd party indicator was created and as such you have to talk to the original author. There is nothing more I can do.
You generally do not need to do things in Initialize or Variables.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
152 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
89 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
131 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
127 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment