NexusFi: Find Your Edge


Home Menu

 





adxslope


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,158 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
anahat
pinole california
 
Posts: 16 since Jul 2012
Thanks Given: 0
Thanks Received: 1

hello again everybody i have been busy all day cranking out this new code to try to figure out adx slope. what im trying to do is get an indicator that will tell me the slope of adx mainly what im concerned about is the value if slope is negative it will cross past zero into the negative area and vice versa for positive slope

but i am having some issues maybe you guys can help me out...
lets start off with the code..

 
Code
inputs: 
	ADXLength( 14 );
	
variables:
    time1(0),
    time0(0),
    slopenum(0),
	zero(0), 
	slopedenom(0),
	ADXValue( 0 ),
	adxvalue1( 0 );
	
time1 = (time);	
time0 = (time - 1);
zero = (0);
ADXValue = ADX(adxlength);
adxvalue1 = Adx( ADXLength-1);
SlopeNum = (ADXValue1 - adxvalue);
slopedenom =(time1 - time0);

Plot1( slopenum/slopedenom, "ADX Slope",Green ) ;
plot2(zero,"0",red);
issues
- as soon as adx slope turns negative it should immediatly go into the negative area but there is a lag can somebody explain that am i doing something wrong? attached is a picture of the indicator and adx

- also what is a good piece of code to use for time.. ie if i was to be looking at a 5 min chart the slope denom would change into a 5 minute division if 30 thirty minute divesion and 60 would be 60 min and so on and so forth

- slope = y1-y2/x1-x2 so y is my adx value and x is my time its sooo straightforward i dont know why it isnt working



Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
Al Arabiya: US-Iran Draft Deal Within Hours Contains Hor …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #3 (permalink)
anahat
pinole california
 
Posts: 16 since Jul 2012
Thanks Given: 0
Thanks Received: 1


Oh and one more thing im sure most people on this forum know this but adx is the measure between dmi- and dmi+ so the higher the adx the stronger the trend, but it is important to not that adx doesnt discriminate between uptrend and downtrend..
to reiterate the higher the adx the stronger the trend


Reply With Quote
  #4 (permalink)
anahat
pinole california
 
Posts: 16 since Jul 2012
Thanks Given: 0
Thanks Received: 1

 
Code
Input: NumBars(1),adxlength(14); 
variable: adxslope(0), slope(0); 

adxslope = ADX(adxlength); 
slope = arctangent((adxslope - adxslope[NumBars])/NumBars); 

plot1(slope, "slope"); 
plot2(0,"Zero");
sometimes you cant wait for others to help you but always remember to help other my motto
so your welcome forums
your welcome


Reply With Quote
  #5 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,774

Hi,


anahat View Post
- also what is a good piece of code to use for time.. ie if i was to be looking at a 5 min chart the slope denom would change into a 5 minute division if 30 thirty minute divesion and 60 would be 60 min and so on and so forth

If you want to "know the timeframe" (for instance: "5 min") from the code, you could use the instructions BarType/BarType_ex and BarInterval. Please have a look in the documentation.

Nicolas


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #6 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,774


anahat View Post
- as soon as adx slope turns negative it should immediatly go into the negative area but there is a lag can somebody explain that am i doing something wrong? attached is a picture of the indicator and adx

Actually, what we should see is: as soon as the ADX decreases, "slope" shall become negative.
It is the case on my computer with your above code.
You should plot the indicators (ADX and "slope") as points to better see it.

Nicolas


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on August 9, 2012


© 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