| Forex Trading Laboratory Discussion forum for Forex traders - all forex pairs |
![]() | | Tweet | |
| | #201 | ||
![]() | Re: The Chimp`s "Forex Trades" Quote:
S&R... yes... actually this analisis eventually gets automatically discounted on the vmar setups, as you most probably will take trades from very good competitive S&R levels... determining them its some times hard, any algorithm of S&R, be it pivots, fibos, MP levels etc, have 50/50 performance in terms of rejections... all of this levels nornally have two posible outputs : break or hold... so the levels are not so important as the capacity of anticipating a break or a hold... and thats where momentum readings (from my perspective) give you the edge on your trading, as it should give you the discernment on anticipating breaks or holds... Now once you have a perception of momentum thru vmars, you clearly get good in anticipating breaks or holds from some good clear levels, whatever they be... so THE SKILL is "Momentum Discernment"... did you see the video series ?... cheers Walter.
__________________ you must enjoy trading... otherwise you shouldnt trade... | ||
| |
|
| | #202 | |||||
![]() | Re: The Chimp`s "Forex Trades" Quote:
Quote:
That group of vma6_nBar lines used.. double WeightDM=ADX_Bars, WeightDI=ADX_Bars, WeightDX=ADX_Bars, ChandeEMA=ADX_Bars; So changing the ADX_Bars number also changed the smoothing. The fancy stuff like VI squared was commented out in the code. Yeah, there are too many threads and too many posts to find this stuff now. On the 1min chart 6bar was used (and set to 6) and 4bar (but set to 3). On the 5min chart 12bar was used (but set to 4 bars). The 5min trend line used 16bar (but set to 40 bars). It made sense at the time even if it seems nuts now. Quote:
Quote:
The adxvma6 used... if (Out[i]>Out[i+1]){HHV=Out[i];LLV=Out[i+1];} else {HHV=Out[i+1];LLV=Out[i];} for(j=1;j<ADX_Bars;j++) { if(Out[i+j+1]>HHV)HHV=Out[i+j+1]; if(Out[i+j+1]<LLV)LLV=Out[i+j+1]; } It was intended that the first comparison of two bars (one may be live) would be done before the loop and the loop would be used only for 3 bars or greater, but that isnt how it was working... Should have used... if (Out[i]>Out[i+1]){HHV=Out[i];LLV=Out[i+1];} else {HHV=Out[i+1];LLV=Out[i];} for(j=1;j<ADX_Bars-1;j++) { if(Out[i+j+1]>HHV)HHV=Out[i+j+1]; if(Out[i+j+1]<LLV)LLV=Out[i+j+1]; } What difference does it make? When you ask for ADX_Bars=2, you get 2 ok. But when you ask for 3 you get 4 instead. And so on, ask for 4 get 5 etc. With the adxvma6_nbar series this will mean using different numbers for adx_bars and also for ema smoothing on other platforms and there may be a further complication with the smoothing weights needing to be different (may need to use numbers other than whole integer values). Quote:
Drives ya nuts doesn't it? Cheers Bruce | |||||
| |
|
| | #203 | ||
![]() | Re: The Chimp`s "Forex Trades" Quote:
| ||
| |
|
| | #204 | ||
![]() | Quote:
![]() ![]() Is your entry the red vma(4) crossing the green vma(6) or the white decema(12) crossing the red vma(4) ? could you please post the mq4 code for the decema? regards. Unicorn. | ||
| |
|
| | #205 | ||
![]() | Quote:
wilders(value, wilders_periods) = ema(value, 2*wilders_periods -1); hence wilders(c, 3) is ema(c, 5) wilders(c, 4) is ema(c, 7) wilders(c, 5) is ema(c, 9) wilders(c, 6) is ema(c, 11) etc. Now, I mention this because you guys are missing intermediate settings; in the above cited examples from smoothing using ema of 5 periods your implementation jumps to 7, and then 9 and 11 ema periods. Your programming the adx computation in order to have an additional smoothing (for a total of three smoothing operations as opposed to Wilder's two smoothing operations) may be lacking some effectiveness on account of using half the resolution because you move in ema_period steps of 2 i.e ema_periods = 5,7,9,11 as opposed to 4,5,6,7,8,9,10,11. I hope that my point is clear. Wilder did not mind that; then again he did not have any use for three smoothing operations; he was not scalping. Bruce (and Sparrow) you can code the vma vma[j] = (1 - f*f_adx) vma[j-1] + (f*f_adx) C[j] ; where f = 2 / (ema_periods +1) and f_adx is the stochastic_adx value. in the stochastic adx smoothing operations you can use smooth_x[j] = (1-g) * smooth_x[j-1] + g * x[j]; for the PDM, PDI, Out, etc. Then adxvma(6) will correspond to the new implementation using weightdm = weightdi = weightdx = 2*6 - 1 =11 stochastic_periods = 6 (the one called adx_bars) in the following code for(j=1;j<ADX_Bars;j++) { if(Out[i+j+1]>HHV)HHV=Out[i+j+1]; if(Out[i+j+1]<LLV)LLV=Out[i+j+1]; } and ema_periods = ChandeEMA = 11; the ChandeEMA variable in MA[i]=((ChandeEMA-VI)*MA[i+1]+VI*Close[i])/ChandeEMA; Hope this helps in cleaning up the code. ![]() cheers Unicorn. | ||
| |
|
| | #206 | ||
![]() | Re: The Chimp`s "Forex Trades" Great interaction that you have here. It looks like a pretty game seen from the chairs of a stadium. Quote:
Quote:
NinjaTrader has excellent capacities and also it allows to work with a different kind of markets, But I think it would be advisable to develop more this topic... Regards. AgustÃÂ*n | ||
| |
|
| | #207 | ||
![]() | Quote:
Yes it does drive me nuts. Walter is putting in a lot of time. You have put in a lot of time. I have put in a lot of time. Now that Walter wants to come up with the final formulation, I believe that the tools that he and we will use must be in top shape. That's why I will help you clean the code. As a matter of fact I already did. The following code incorporates my suggestions for higher ema resolution. The added benefit is that this code will run faster, as it by-passes the Wilder's divisions in the previous implementation. Divisions need more cpu time than multiplications. // adxvma_U // Unicorn's modification to adxvma6 computation 18-11-2007 factor1 = 2 / (dm_ema_periods +1); //default for adxvma(6) is dm_ema_periods=11; factor2 = 2 / (di_ema_periods +1); //default for adxvma(6) is di_ema_periods=11; factor3 = 2 / (dx_ema_periods +1); //default for adxvma(6) is dx_ema_periods=11; alpha = 2 / (chande_ema_periods +1); //default for adxvma(6) is chande_ema_periods=11; for(i=i; i>=0; i--) //Main loop begins after history bars filled. { PDM[i]=0; MDM[i]=0; if(Close[i]>Close[i+1])PDM[i]=Close[i]-Close[i+1];//This array is not displayed. else MDM[i]=Close[i+1]-Close[i];//This array is not displayed. PDM[i]=((1-factor1)*PDM[i+1] + factor1 * PDM[i]) ; // REAL ema. MDM[i]=((1-factor1)*MDM[i+1] + factor1 * MDM[i]) ; //REAL ema. TR=PDM[i]+MDM[i]; if (TR>0) {PDI[i]=PDM[i]/TR; MDI[i]=MDM[i]/TR;} //Avoid division by zero. Minimum step size is one unnormalized price pip. else {PDI[i]=0; MDI[i]=0;} PDI[i]=(( 1- factor2 )*PDI[i+1] + factor2 * PDI[i]); // REAL ema. MDI[i]=(( 1- factor2 )*MDI[i+1] + factor2 * MDI[i]); // REAL ema. DI_Diff=PDI[i]-MDI[i]; if (DI_Diff<0) DI_Diff= -DI_Diff;//Only positive momentum signals are used. DI_Sum=PDI[i]+MDI[i]; DI_Factor=0; //Zero case, DI_Diff will also be zero when DI_Sum is zero. if (DI_Sum>0) Out[i]=DI_Diff/DI_Sum; //Factional, near zero when PDM==MDM (horizonal), near 1 for laddering. else Out[i]=0; Out[i]=((1- factor3 )*Out[i+1] + factor3 * Out[i]) ; // REAL ema. if (Out[i]>Out[i+1]){HHV=Out[i];LLV=Out[i+1];} else {HHV=Out[i+1];LLV=Out[i];} for(j=1;j<stochastic_peri ods;j++) // default for adxvma(6) is stochastic_periods=6; { if(Out[i+j+1]>HHV)HHV=Out[i+j+1]; if(Out[i+j+1]<LLV)LLV=Out[i+j+1]; } diff = HHV - LLV; //Denominator of stochastics VI=0; if (diff>0) VI=(Out[i]-LLV)/diff; //stochastic computation of modified adx. MA[i]=((1 - alpha * VI) * MA[i+1] + alpha * VI *Close[i] ; //Chande VMA formula. } // ENJOY ok guys. Try this modification and let me know. NB. I don't run MT, so I have not compiled and tested on that platform. Take care. Unicorn. and here are the modifications highlighted: // adxvma_U // Unicorn's modification to adxvma6 computation 18-11-2007 factor1 = 2 / (dm_ema_periods +1); //default for adxvma(6) is dm_ema_periods=11; factor2 = 2 / (di_ema_periods +1); //default for adxvma(6) is di_ema_periods=11; factor3 = 2 / (dx_ema_periods +1); //default for adxvma(6) is dx_ema_periods=11; alpha = 2 / (chande_ema_periods +1); //default for adxvma(6) is chande_ema_periods=11; for(i=i; i>=0; i--) //Main loop begins after history bars filled. { PDM[i]=0; MDM[i]=0; if(Close[i]>Close[i+1])PDM[i]=Close[i]-Close[i+1];//This array is not displayed. else MDM[i]=Close[i+1]-Close[i];//This array is not displayed. PDM[i]=((1-factor1)*PDM[i+1] + factor1 * PDM[i]) ; // REAL ema. MDM[i]=((1-factor1)*MDM[i+1] + factor1 * MDM[i]) ; //REAL ema. TR=PDM[i]+MDM[i]; if (TR>0) {PDI[i]=PDM[i]/TR; MDI[i]=MDM[i]/TR;} //Avoid division by zero. Minimum step size is one unnormalized price pip. else {PDI[i]=0; MDI[i]=0;} PDI[i]=(( 1- factor2 )*PDI[i+1] + factor2 * PDI[i]); // REAL ema. MDI[i]=(( 1- factor2 )*MDI[i+1] + factor2 * MDI[i]); // REAL ema. DI_Diff=PDI[i]-MDI[i]; if (DI_Diff<0) DI_Diff= -DI_Diff;//Only positive momentum signals are used. DI_Sum=PDI[i]+MDI[i]; DI_Factor=0; //Zero case, DI_Diff will also be zero when DI_Sum is zero. if (DI_Sum>0) Out[i]=DI_Diff/DI_Sum; //Factional, near zero when PDM==MDM (horizonal), near 1 for laddering. else Out[i]=0; Out[i]=((1- factor3 )*Out[i+1] + factor3 * Out[i]) ; // REAL ema. if (Out[i]>Out[i+1]){HHV=Out[i];LLV=Out[i+1];} else {HHV=Out[i+1];LLV=Out[i];} for(j=1;j< stochastic_periods;j++) // default for adxvma(6) is stochastic_periods=6; { if(Out[i+j+1]>HHV)HHV=Out[i+j+1]; if(Out[i+j+1]<LLV)LLV=Out[i+j+1]; } diff = HHV - LLV; //Denominator of stochastics VI=0; if (diff>0) VI=(Out[i]-LLV)/diff; //stochastic computation of modified adx. MA[i]=((1 - alpha * VI) * MA[i+1] + alpha * VI *Close[i] ; //Chande VMA formula. } | ||
| |
|
| | #208 | ||
![]() | Re: The Chimp`s "Forex Trades" My entry is white crossing red or green depending on trade direction. I want to see price cross both and don't trade if there is too much travel between lines. I am unable to determine trend fatigue and, as I said, struggle with exits using the vmas or chimp 2-1 turning, sometimes s/r. I'm hoping someone will come up with something better. I will attach the mq4 file of the decema, but I have switched to using sma1. Cheers | ||
| |
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The "Flip" Trade (support and resistance changing roles) | walterw | Technical Analysis | 218 | 11-22-2011 08:01 AM |
| Walter`s Forex "Trend Trades" | walterw | Forex Trading Laboratory | 357 | 08-12-2011 12:58 PM |
| "Back in 1986 Pete Steidlmayer wrote about needing to wait for the first 4.5 hrs..." | Dogpile | Market Profile | 4 | 10-30-2010 05:41 PM |
| Walter`s Forex "Vma Trend Scalps" | walterw | Forex Trading Laboratory | 147 | 11-17-2007 09:54 PM |
| The "FHR" Trades | walterw | Forex Trading Laboratory | 89 | 07-30-2007 07:39 PM |