NexusFi: Find Your Edge


Home Menu

 





ADX dmPlus Inaccessible due to Protection Level


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Slipknot511 with 5 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 eDanny with 1 posts (0 thanks)
    4. looks_4 vegasfoster with 1 posts (1 thanks)
    1. trending_up 3,894 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
Slipknot511's Avatar
 Slipknot511 
Springfield,Missouri, USA
 
Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314

I'm trying to add a simple condition to a NT7 indicator:

&& (ADX(13).dmPlus[0] >= ADX(13).dmMinus[0])

I get the error "Ninjatrader Indicator ADX.dmPlus is inaccessible due to protection level" & the same for dmMinus.

I'm just getting started with code, so you'll have to dumb down your answers for me please.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
CME Cuts Precious Metals Margins Up to 21% Starting Toda …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #3 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845


Try

DM(13).DiPlus[0]

DM(13).DiMinus[0]


Reply With Quote
Thanked by:
  #4 (permalink)
 
Slipknot511's Avatar
 Slipknot511 
Springfield,Missouri, USA
 
Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314

It compiled. Tomorrow I'll see if the concept is any good.

Thanks


Started this thread Reply With Quote
  #5 (permalink)
 
Slipknot511's Avatar
 Slipknot511 
Springfield,Missouri, USA
 
Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314

OK, My logic was flawed.

Instead, I just want to modify the stock NT7 DM indicator to add a plot/alert when +DI and -DI cross.

Using my original logic, it will plot on every bar where the conditions are true. Do I need to use "CrossAbove"/"CrossBelow" instead... or is there is proper way to have the alert/plot occur only once when the condition becomes true and not again as long as the condition remains true?
Also, I want a dot to remain once it paints, even if COBC is set to false. Meaning if the lines cross and then uncross before close, the dot will remain. In theory, it could be possible for both buy and sell dots to plot on the same bar as long as other filters aren't added.

Here's what I have & it accomplishes what I want on the first cross, with the exception that it plots EVERY bar thereafter:

 
Code
if ((Close[0] > Open[0])
                && (DM(period).DiPlus[0] > DM(period).DiMinus[0]))

                {
                DrawDot(CurrentBar.ToString() + "dotbuy", true, 0, Low[0] - 5 * TickSize, Color.DarkGreen);
                 Alert("BuyAlert", NinjaTrader.Cbi.Priority.High, "PossibleBuy", "chime_up.wav", 15, Color.Black, Color.Green);
                }
                
            if     ((Close[0] < Open[0])
                && (DM(period).DiPlus[0] < DM(period).DiMinus[0]))
                
                {
                DrawDot(CurrentBar.ToString() + "dotsell", true, 0, High[0] + 5 * TickSize, Color.DarkRed);
                 Alert("SellAlert", NinjaTrader.Cbi.Priority.High, "PossibleSell", "chime_down.wav", 15, Color.Black, Color.Red);
                }


Started this thread Reply With Quote
  #6 (permalink)
 
eDanny's Avatar
 eDanny 
East Rochester, NY
 
Experience: Intermediate
Platform: NT
Posts: 329 since Jul 2009
Thanks Given: 18
Thanks Received: 425

Remember, if you paint a dot that remains after the condition changes it will disappear if you refresh the chart.

Dan


Reply With Quote
  #7 (permalink)
 
Slipknot511's Avatar
 Slipknot511 
Springfield,Missouri, USA
 
Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314


eDanny View Post
Remember, if you paint a dot that remains after the condition changes it will disappear if you refresh the chart.

Dan

Correct, that's why I use market replay to populate the chart rather than just refreshing it. I do that if any of my indicators are set to COBC=false. Using market replay to populate historical charts is the only way to see how indicators really behave.
Thanks.


Started this thread Reply With Quote
  #8 (permalink)
 
Slipknot511's Avatar
 Slipknot511 
Springfield,Missouri, USA
 
Experience: Advanced
Platform: NinjaTrader (It's a love/hate relationship)
Trading: CL, TF, 6E
Posts: 169 since May 2010
Thanks Given: 60
Thanks Received: 314

OK, I finally got the syntax right for CrossAbove so the indicator is working as expected now.


Started this thread Reply With Quote




Last Updated on November 22, 2010


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts