| Forex Trading Laboratory Discussion forum for Forex traders - all forex pairs |
![]() | | Tweet | |
| | #489 | ||
![]() | Quote:
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. | ||
| |
|
| | #490 | ||
![]() | Re: Playing with the VMAR`s open research 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. | ||
| |
|
| | #491 | ||
![]() | Quote:
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. | ||
| |
|
| | #492 | ||
![]() | Quote:
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. | ||
| |
|
| | #493 | ||
![]() | Re: Playing with the VMAR`s open research Quote:
Last edited by PYenner; 11-01-2007 at 09:42 AM. | ||
| |
|
| | #494 | ||
![]() | Re: Playing with the VMAR`s open research Quote:
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... | ||
| |
|
| | #495 | ||
![]() | Re: Playing with the VMAR`s open research Quote:
__________________ you must enjoy trading... otherwise you shouldnt trade... | ||
| |
|
| | #496 | ||
![]() | Re: Playing with the VMAR`s open research Quote:
IQFeed The CME package. take care Unicorn. | ||
| |
|
![]() |
| Thread Tools | Search this Thread |
| 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 |