Welcome to the Traders Laboratory Forums.
Forex Trading Laboratory Discussion forum for Forex traders - all forex pairs

Reply
Old 11-01-2007, 06:27 AM   #489

unicorn's Avatar

Join Date: Apr 2007
Location: Athens
Posts: 165
Ignore this user

Thanks: 27
Thanked 1 Time in 1 Post



Thumbs down Re: Playing with the VMAR`s open research

Quote:
Originally Posted by PYenner »
you appear to have mistaken the stochastic within the ADX to be a secondary external and additional stochastic.

As I read your code, you are applying a secondary stochastic right after the ADX's internal stochastic.
Hi Bruce;

The adx does not have an internal stochastic. You have probably forgotten how it is computed; you need to freshen up your knowledge.
This is the code for adx computation:

function adx_1( adx_periods)
{
PlusDM= IIf(High>Ref(High,-1) AND Low>=Ref(Low,-1), High-Ref(High,-1),
IIf(High>Ref(High,-1) AND Low<Ref(Low,-1) AND High-Ref(High,-1)>Ref(Low,-1)-Low, High-Ref(High,-1), 0));
DIPlus= 100 * Wilders(PlusDM,adx_period s) / ATR(adx_periods);

MinusDM= IIf(Low<Ref(Low,-1) AND High<=Ref(High,-1), Ref(Low,-1)-Low,
IIf(High>Ref(High,-1) AND Low<Ref(Low,-1) AND High-Ref(High,-1)<Ref(Low,-1)-Low, Ref(Low,-1)-Low, 0));
DIMinus = 100 * Wilders(MinusDM,adx_perio ds) / ATR(adx_periods);

Diff= abs(DIPlus - DIMinus);
DISum= DIPlus + DIMinus;
ADX_value = 100 * Wilders(Diff/DISum, adx_periods);

return ADX_value;
}

ATR(adx_periods) is the average true range, which in your mt4 code is different from the actual formula (of the TR true range), perhaps on purpose.

In order to understand what I am saying you should test this adx code (plot the result), alongside with the adx function of mt4. You need to know what your code is doing. Then plot the result of your computation as coded in your vmar code and compare it to the stochastic_adx, as implemented by the code I have used. Finally, it is a good idea to plot the coefficients that will be used in the vidya formula and compare the results. I have already posted my code for the coefficients.

It should be noted that the Wilders moving average " Wilders(quantity, adx_periods) " is in effect an exponential smoothing average
with equivalent_ema_periods = 2 * wilders_period -1;
Test it; Your test should be:

// test code
{
w_periods = Param("periods",9, 2, 55, 1);
w=Wilders(C, w_periods);

equivalent_ema_periods = 2*w_periods -1;
z= EMA(C, equivalent_ema_periods);

Plot(w,"Wilders", colorBlue, styleLine);
Plot(z,"ema", colorRed, styleLine);
}

do the math:
coeff_ema = 2/( ema_periods +1) = 2/( 2*w_periods -1 + 1) = 1/w_periods

Of course, the coefficients of the wilders_ma are 1/w_periods and (w_periods-1)/w_periods

You need to know what your code is doing to these coefficients, because you are actually modifying these computations in order to fine-tune vmar3.

cheers.
Unicorn.
unicorn is offline  
Reply With Quote
Old 11-01-2007, 08:50 AM   #490

PYenner's Avatar

Join Date: May 2007
Location: New Zealand
Posts: 511
Ignore this user

Thanks: 0
Thanked 8 Times in 8 Posts



Re: Playing with the VMAR`s open research

Thanks Unicorn and you are right, the stochastic is external to the ADX code.
So much for working from swiss cheese memory.
That also explains why there were two normalization divisions, seemed like overkill.

I have used a lazy version of ema weighting that differs slightly from standard "ema_periods" there will be a conversion for it but I have not bothered working it out. So thats one more complication.

A minor quibble regarding describing say Maji's Vidya as being based on price eg Maji = vidya(stochastic(price))
The input is actually delta price over delta time, aka momentum in pips/min for a 1min chart.
so Maji = vidya(stochastic(momentum )) might be dimensionally more sound.

But then the normalization makes it dimensionless, more like a momentum index or ratio unless that is a contradiction in terms, arghh.

Dude, there is only one answer here, you take over the MT4 programming and let me get a holiday, a long one, a very long one...

As far as the maths goes I would much rather be tracking the dimensional content, x% momentum, y% price etc so I know for real just what it is telling me. There seems little point in determining that it is 100% true to formula while the formula does not also tell you what the quantity is that is being displayed. Your car speedo is in miles/hr or ks/hr, what use would a speedo be if it mixed distance in with speed the same way a "momentum" indicator mixes price in with momentum. Something tells me that there should be a way to remove the price content that is inserted by smoothing and get you back closer to pure momentum. There is too much "hubble bubble" ignorance and not enough science in indicator signals.

Also in MT4 some programs repaint the most recent bar to correct for missed ticks. The ema function is one that has to be run in a repaint loop. Their internal functions are a mix of repainting and non repainting loops. Even the Tardis could not do a reliable job of comparing apples1 with apples2 to check for errors, MT4 does not have a reliable time basis, some programs repaint more than one bar. The comparison you suggest is still possible, constructive and sensible, full stop. Equally, until dimensional analysis accompanies it you can still not quantify and qualify what the indicator displays, so it might as well be called shoes sizes for elephants as momentum, it is neither, it is unknown and unscientific. The maths is not in contact with reality and that makes it more of a silly mind game than a tool, fools paradise.

Forgive the frustration.
I am currently running 5 momentum oscillators and 4 of them are a heap of you know what. I can't seem to face MT4 programming at the moment, possibly because it looks like it cant go where I need to go, possibly because so much is unreliable and undocumented that 80% of my time gets wasted by it, the reconstituted market feed makes a joke of fine tuning anything, I am seeing ticks being bundled and delayed for 30 secs or longer, during that time your indicator shows you no change.
There are signs that the frustration could be terminal.
The subroutines or diy function calls that you take for granted are not available within MT4 indicator programs, looks like you have to #define functions and do them on something like an include file. Of course its not documented, you have to find other proggies to copy and go search a forum for a day. The last week has been wasted in just this way, the programs are written in russian and there are no english versions of them.
It is possible I have had a gutfull of the MT4 runaround.
Been swollowing too much crud for too long with MT4.
Sorry all for the tantrum.
I'm taking some time out and it might be permanent as far as MT4 goes.

Last edited by PYenner; 11-01-2007 at 09:06 AM.
PYenner is offline  
Reply With Quote
Old 11-01-2007, 09:03 AM   #491

unicorn's Avatar

Join Date: Apr 2007
Location: Athens
Posts: 165
Ignore this user

Thanks: 27
Thanked 1 Time in 1 Post



Lightbulb Re: Playing with the VMAR`s open research

Quote:
Originally Posted by PYenner »
I have used a lazy version of ema weighting that differs slightly from standard "ema_periods" there will be a conversion for it but I have not bothered working it out.
Bruce;

you are using wilders_ma; it is standard in the internal computation of adx; do you remember that Wilder created the adx?
In my post I was reminding this fact to you.

Take it easy.
Unicorn.
unicorn is offline  
Reply With Quote
Old 11-01-2007, 09:14 AM   #492

unicorn's Avatar

Join Date: Apr 2007
Location: Athens
Posts: 165
Ignore this user

Thanks: 27
Thanked 1 Time in 1 Post



Arrow Re: Playing with the VMAR`s open research

Quote:
Originally Posted by PYenner »
The subroutines or diy function calls that you take for granted are not available within MT4 indicator programs,
I'm taking some time out and it might be permanent as far as MT4 goes.
Bruce;

You can try Amibroker; there is a free version to test that the programming suits your taste and requirements. It even downloads free historical data for your testing.

Or you can try Ninja Trader. For that you need to ask Sparrow.

Take care.
Unicorn.
unicorn is offline  
Reply With Quote
Old 11-01-2007, 09:28 AM   #493

PYenner's Avatar

Join Date: May 2007
Location: New Zealand
Posts: 511
Ignore this user

Thanks: 0
Thanked 8 Times in 8 Posts



Re: Playing with the VMAR`s open research

Quote:
Originally Posted by unicorn »
Bruce;
you are using wilders_ma; it is standard in the internal computation of adx; do you remember that Wilder created the adx?
In my post I was reminding this fact to you.
Take it easy.
Unicorn.
That was one of the reasons MT4 vma1 could not use Wilders or even the ema function, the ema would have ended up in the template file along with the fantail lines. Instead the ema's were done using up the indicator arrays that are limited to 8 in total. Use 6 emas and you can't do an oscillator unless you leave out the two Histo bars. It gets that sick dude. Its not software its knobbleware. There are ways around most of the knobbles but they are poorly documented or not documented at all and with even the most basic stuff there is this crazy treasure hunt you have to go on to maybe find out what they don't tell you. I don't have time for never ending runarounds. Again sorry for tuntrums.

Last edited by PYenner; 11-01-2007 at 09:42 AM.
PYenner is offline  
Reply With Quote
Old 11-01-2007, 10:13 AM   #494

walterw's Avatar

Join Date: Nov 2006
Location: Argentina
Posts: 2,228
Ignore this user

Thanks: 0
Thanked 199 Times in 127 Posts



Re: Playing with the VMAR`s open research

Quote:
Originally Posted by PYenner »
Walter
Do you know of any free forex platforms or charting packages that have proper tick charts? They would be the alternative to excel for Volume work.

Hi Bruce... Ninjatrader would be the way... it has tick charts and its free, also forex data is free there... so far had tested quite a lot and has a very friendly charting functions and no connection issues (very important )...

I would love to get a chart on Ninjatrader similar to Unicorn`s on amibroker... hope we get there...

The edge of using Tick charts on forex is being able to get a very good precise timing... even better than the 1 min we actually have on mt4...

I dont know how their coding language differs to mt4... but if we could migrate there, it would be worth the effort eventually... cheers Walter.
__________________
you must enjoy trading... otherwise you shouldnt trade...
walterw is offline  
Reply With Quote
Old 11-01-2007, 10:18 AM   #495

walterw's Avatar

Join Date: Nov 2006
Location: Argentina
Posts: 2,228
Ignore this user

Thanks: 0
Thanked 199 Times in 127 Posts



Re: Playing with the VMAR`s open research

Quote:
Originally Posted by unicorn »
Bruce;

You can try Amibroker; there is a free version to test that the programming suits your taste and requirements. It even downloads free historical data for your testing.

Or you can try Ninja Trader. For that you need to ask Sparrow.

Take care.
Unicorn.
Unicorn, what datafeed are you using for the currencies futures charts ? thanks Walter.
__________________
you must enjoy trading... otherwise you shouldnt trade...
walterw is offline  
Reply With Quote
Old 11-01-2007, 10:29 AM   #496

unicorn's Avatar

Join Date: Apr 2007
Location: Athens
Posts: 165
Ignore this user

Thanks: 27
Thanked 1 Time in 1 Post



Re: Playing with the VMAR`s open research

Quote:
Originally Posted by walterw »
Unicorn, what datafeed are you using for the currencies futures charts ? thanks Walter.
Good day Walter;

IQFeed
The CME package.

take care
Unicorn.
unicorn is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing the Initial Balance TinGull Market Profile 13 10-19-2011 10:48 AM
Walter`s First Forex Research (various ideas) walterw Forex Trading Laboratory 157 09-13-2011 05:14 AM
Playing the Opening Gap Soultrader Technical Analysis 19 05-23-2007 05:10 PM
Playing Inside Days Soultrader E-mini Futures Trading Laboratory 12 03-06-2007 05:10 PM
Research On Forums and Communities. Comments Please. RichardKen General Discussion 6 02-18-2007 08:48 PM

All times are GMT -4. The time now is 03:27 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.