EasyLanguage ADXVMA Indicator - EasyLanguage Programming | futures io social day trading
futures io futures trading


EasyLanguage ADXVMA Indicator
Updated: Views / Replies:8,947 / 15
Created: by Big Mike Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 3  
 
Thread Tools Search this Thread
 

EasyLanguage ADXVMA Indicator

  #11 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker/Data: AMP Trading / CQG
Favorite Futures: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 22 received

ADXVMA s/r

Hello Mike
I have import thie Adxvma S/R im my chart .. is in red dots ..
I just have supports not resistance ? normal or ?
is a TF graph for Apr 21
Thank you
Serger

Attached Thumbnails
EasyLanguage ADXVMA Indicator-adxvma_sr.png  
Reply With Quote
 
  #12 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


Big Mike View Post
Here is the ADXVMA function and indicator for EasyLanguage - TradeStation/MultiCharts. I am unsure of the original author, this is a conversion from NinjaTrader.

I've built it as a function so you can use it in signals easily. The attached .pla MultiCharts file is both the function and the indicator.

Hm, there's something weird about this function. I've double checked it with two NinjaTrader ADXVMA indicators from the forum here, but although the code from NinjaTrader and MultiCharts is the same, the results are wildly different:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Anyone knows what can cause this difference?


Little update February 16th:
Though Mike coded the function correctly (thanks Mike ) and my converted function works the same, the code from the NinjaTrader indicator is somewhat sloppy and I wouldn't be surprised if NinjaTrader used some other calculation method than MultiCharts.

There are some 'weird' things in the code, like using the constant i value of 0 for serializing (what's the point of that?), or code like:
 
Code
if (DI_Sum>0)
    Out.Set(DI_Diff/DI_Sum);//Factional, near zero when PDM==MDM (horizonal), near 1 for laddering.
else
    Out.Set(0);

Out.Set(((WeightDX-1)*Out[i+1] + Out[i])/WeightDX);
I don't see the point in setting the value of Out twice this way, but that's perhaps that due to me not using NinjaTrader extensively.

Perhaps I made a mistake, and by the way, I'm not saying that the MultiCharts function cannot be used or gives wrong signals. Just that the results are different from the NinjaTrader version.


Last edited by Jura; February 16th, 2012 at 03:27 AM.
Reply With Quote
The following 6 users say Thank You to Jura for this post:
 
  #13 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Update for NinjaTrader version of ADXVMA


I have revisited the NinjaTrader code for the ADXVMA, and found it extremely dirty with a number of bugs and inconsistencies. As somebody wanted to use it, I took the challenge to clean it up. I am posting the code here,

- because the Easy Language version is already much cleaner than all NinjaTrader versions
- because it helps to understand what the indicator actually does


Here is the code. k is a smoothing constant of an exponential moving average based on Wilder's average ( that is the 1/n method as opposed to the 2/(n+1) method later used as a result of the assimilation between SMA and EMA). The various periods ADXperiod, weight DX etc. are replaced with a single period. The useless parameter i is dropped (as for the MultiCharts version). Double variables are not compared to zero but to the value double.Epsilon to take into account the error term. For the initialization of the first value for the ADXVMA 0 has been replaced with Input(0). The version now allows for calculating the ADXVMA from other values than the Close series.

Clean code for comparison with the Easy Language version is here:

 
Code
double currentUp = Math.Max(Input[0] - Input[1], 0);
double currentDown = Math.Max(Input[1] - Input[0], 0);
up.Set ((1-k)*up[1] + k*currentUp);
down.Set((1-k)*down[1] + k*currentDown);
double sum = up[0] + down[0];
double fractionUp = 0.0;
double fractionDown = 0.0;
if(sum > double.Epsilon)
{
	fractionUp = up[0]/sum;
	fractionDown = down[0]/sum;
}
ups.Set((1-k)*ups[1] + k*fractionUp);
downs.Set((1-k)*downs[1] + k*fractionDown);

double normDiff = Math.Abs(ups[0] - downs[0]);
double normSum = ups[0] + downs[0];
double normFraction = 0.0;
if(normSum > double.Epsilon)
	normFraction = normDiff/normSum;
index.Set((1-k)*index[1] + k*normFraction);

hhv = MAX(index,period+1)[0];
llv = MIN(index,period+1)[0];
double vDiff = hhv-llv;
double vIndex = 0;
if(vDiff > double.Epsilon)
	vIndex = (index[0] - llv)/vDiff;
ADXVMA.Set((1 - k*vIndex)*ADXVMA[1] + k*vIndex*Input[0]);

The indicator can be downloaded here:

https://futures.io/download/ninjatrader-7/indicators/1198-download.html


Last edited by Fat Tails; June 5th, 2012 at 06:41 PM.
Reply With Quote
The following 7 users say Thank You to Fat Tails for this post:
 
  #14 (permalink)
Elite Member
Amarillo, Texas, USA
 
Futures Experience: Advanced
Platform: Ninjatrader, Multicharts
Broker/Data: Amp Futures/CQG
Favorite Futures: YM 6E CL GC
 
kinkeadfx's Avatar
 
Posts: 29 since Oct 2010
Thanks: 11 given, 1 received

Where can i find the signal that works with this indicator for use in automated trading?

Thanks!

Reply With Quote
 
  #15 (permalink)
Elite Member
Boston
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: YM
 
Posts: 2 since Dec 2013
Thanks: 0 given, 0 received


Jura View Post
Hm, there's something weird about this function. I've double checked it with two NinjaTrader ADXVMA indicators from the forum here, but although the code from NinjaTrader and MultiCharts is the same, the results are wildly different:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Anyone knows what can cause this difference?

Here is the updated version of ADXVMA. I think it should work similar to the NinjaTrader version, can you please check?

 
Code
// Big Mike Trading https://futures.io
// April 17 2010
// Converted from NinjaTrader version, original author unknown
// Function

inputs:     
    Price (NumericSeries),
    Length (NumericSimple);

vars:
    TR(0),
    DI_Diff(0),
    DI_Sum(0),
    ma(0),
    pdm(0),
    mdm(0),
    pdi(0),
    mdi(0), 
    DI_Factor(0), 
    VI(0), 
    diff(0), 
    HHV(0), 
    LLV(0),
    WeightDM(Length), 
    WeightDI(Length), 
    WeightDX(Length),
    ChandeEMA(Length),
    output(0);

once ma=Price;    

if(Price>Price[1]) then begin
	pdm=Price-Price[1];
	mdm=0;
end else begin
	mdm=Price[1]-Price;
	pdm=0;
end;

pdm=((WeightDM-1)*pdm[1] + pdm)/WeightDM;//ema.
mdm=((WeightDM-1)*mdm[1] + mdm)/WeightDM;//ema.

TR=pdm+mdm;

if (TR>0) then begin    
	pdi=pdm/TR; 
	mdi=mdm/TR; 
end else begin
    pdi=0;
    mdi=0;
end;

pdi=((WeightDI-1)*pdi[1] + pdi)/WeightDI;//ema.
mdi=((WeightDI-1)*mdi[1] + mdi)/WeightDI;//ema.
DI_Diff=pdi-mdi;
 
if (DI_Diff<0) then  DI_Diff= -DI_Diff;//Only positive momentum signals are used.

DI_Sum=pdi+mdi;

DI_Factor=0;//Zero case, DI_Diff will also be zero when DI_Sum is zero.

if (DI_Sum>0) then output=DI_Diff/DI_Sum else output=0;

output=((WeightDX-1)*output[1] + output)/WeightDX;

HHV = HighestFC(output,Length+1);
LLV = LowestFC(output,Length+1);

diff = HHV - LLV;
VI=0;

if (diff>0) then  VI=(output-LLV)/diff;

ma=((ChandeEMA-VI)*ma[1]+VI*Price)/ChandeEMA;//Chande VMA formula with ema built in.
ADXVMA = ma;

Reply With Quote
 
  #16 (permalink)
Trading Apprentice
Sharon, MA USA
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: futures
 
Posts: 1 since Dec 2010
Thanks: 0 given, 0 received


Big Mike View Post
I believe in laymens terms it uses a VMA and ADX together to plot the MA. The MA is primarily based on the VMA of price but uses the ADX values to determine volatility, adjusting the VMA by the volatility.

As I am not the original author I can't say for sure, but that is what I see from glancing at the code.

Mike

ADX is a strength of direction indicator. It does not indicate direction. Typically it is used to determine whether a breakout is valid, or the converse, that a break may be about to occur because of the lack of directional strength.

Reply With Quote

Reply



futures io > > > > > EasyLanguage ADXVMA Indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want your EasyLanguage indicator created, free? Big Mike The Elite Circle 604 September 15th, 2017 02:30 PM
EasyLanguage SuperTrend indicator Big Mike EasyLanguage Programming 79 August 10th, 2016 04:34 AM
EasyLanguage Chart Markup Indicator Big Mike EasyLanguage Programming 8 April 29th, 2010 08:10 PM
EasyLanguage ZeroLagEMA indicator Big Mike EasyLanguage Programming 1 April 10th, 2010 02:16 PM
EasyLanguage ZeroLagWMA indicator Big Mike EasyLanguage Programming 1 April 10th, 2010 02:09 PM


All times are GMT -4. The time now is 08:03 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-12 in 0.12 seconds with 20 queries on phoenix via your IP 54.234.255.29