The Chimp`s "Forex Trades" - Page 21 - Traders Laboratory
Forum Guidelines | Contact Us
Home

Go Back   Traders Laboratory > Equities, FX, and Options > Forex Laboratory

Forex Laboratory Discussion forum for Forex traders.


Reply
 
LinkBack (3) Thread Tools Search this Thread Display Modes
  #201 (permalink)  
Old 11-18-2007, 12:35 PM
walterw's Avatar
walterw is The Trader Chimp

Trader Specs
 
Join Date: Nov 2006
Location: Argentina
Posts: 2,168
Thanks: 0
Thanked 41 Times in 30 Posts
This member is the original thread starter. Re: The Chimp`s "Forex Trades"

Quote:
View Post
Hi PYenner and Walter,

If you wouldn't mind, indulge me one more time and have a quick look at these charts... then I'll let things go. The basic concept here is classic support and resistance. My information comes from Martin Pring.

PYenner, what I have tried to do here is to illustrate some pretty classic analysis working with your indicators on the 60 minute chart. My inexperience makes precise definition of s/r, let's say uncomfortable, yet I have seen prices respect these (past) levels time and time again.

My opinion is that fundamentally the market is driven by psychology as even the shakers and movers in this market are human beings and respond to defined markers.

What I am looking for is indicators that will define the turning points, and yours do quite well...the other thing I have difficulty with is the draw down.

Profitable or not, correct direction or not, it's hard to watch the market move against you as far as it can and still hold on if you're using real money.

At any rate, I appreciate you taking the time.

Regards gentlemen

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 can check my site on my profile contact info...
Reply With Quote
  #202 (permalink)  
Old 11-18-2007, 01:10 PM
PYenner's Avatar
PYenner has no status.

 
Join Date: May 2007
Location: New Zealand
Posts: 511
Thanks: 0
Thanked 1 Time in 1 Post
Re: The Chimp`s "Forex Trades"

Quote:
View Post
Hello Bruce;
I thought that you have transferred to Ninja Trader.
Have opened a Ninja account and an EFX account but have not taken on the learning curves with either. Significant programming efforts will probably get done in NT and only easy stuff done in MT4. I still use MT4 charts for trading and for my own currency based indicators which are what I have been working on for 9 months and am still working on because they are central to my trading but they are difficult to interpret still. Walters vma entry timing is now used for trading as well. I will still be using MT4 and doing basic programming jobs in MT4. I may start trading futures and I may switch to an ndd for forex but if either happens it will probably be next year.
Quote:
View Post
I realize that cleaning up the code is not your priority, BUT please explain
1) why the _16, or _12 or _6 suffixes, I thought that they are minor fixes...
They were identical copies of vma6 with just ADX_Bars preset to the suffix value shown in the file name. Any one of those versions could be set to any value of ADX_Bars. We were experimenting with a fantail of vma lines at the time and that was the quick way to make up a bunch of lines to see what fast lines and slower lines had to offer. Walter used other values for ADX_bars in each of the versions he finally chose for trading, that was the intention from the beginning, keeping those options open without needing further programming at each step. The line colours could also be changed.

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:
View Post
2) why the _test3 ? what are you testing? what is the outcome? better, worse?
Test3 was the final test, it became adxvma6 (without the "testn").
Quote:
View Post
3) what is the minor bug?
I repeatedly got confused over the stochastic loop counting and live bars versus historical bars and it still needs to be sorted.
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:
View Post
I have coded adxvma6 in Amibroker but the vma curves I get are not identical to what Walter has on the posted charts.
What I worry about is the following:
a) there might be a small bug that creates the difference ; small BUG - big disappointment!
b) I certainly do not want the good attributes of the adxvma6 to be due to a small bug; and I certainly hope that after the bug is fixed, the shape of the adxvma6(adxbars=6) will not be transformed and become less successful in indicating the horizontal effect and the laddering.
Fixing the bug made very little difference in the comparison I did but it was not a comprehensive comparison. The problems with matching ami version curves to mt4 version curves may arise if you used an internal ema function then my ema weights dont correspond exactly to the regular formula for weighting ema smoothing and slightly different numbers (eg 3.3 instead of 3.0) may be needed to match the curves. The hand coded version of the adx used in the mt4 version will also differ from an internal adx function in ami. The priority had always been to stay close to the VT adx version that Bemac used and that meant hand coding it across platforms. MT4 does not have a Wilders function and iMAon Array has "known issues" so the ema smoothing got hand coded as a result, the weighting formaula used may not be standard, again it made sense at the time. Frankenstein's workshop stuff.
Drives ya nuts doesn't it?
Cheers
Bruce

Reply With Quote
  #203 (permalink)  
Old 11-18-2007, 01:49 PM
PYenner's Avatar
PYenner has no status.

 
Join Date: May 2007
Location: New Zealand
Posts: 511
Thanks: 0
Thanked 1 Time in 1 Post
Re: The Chimp`s "Forex Trades"

Quote:
View Post
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"....
Nicely said Walter, that is how I "feel" the final entry timing and quick stop out if it looks to be not developing normally, momentum discernmet...break or hold...

Reply With Quote
  #204 (permalink)  
Old 11-18-2007, 02:54 PM
unicorn's Avatar
unicorn has no status.

 
Join Date: Apr 2007
Posts: 164
Thanks: 25
Thanked 0 Times in 0 Posts
Arrow Re: The Chimp`s "Forex Trades"

Quote:
View Post
Hi Unicorn,

To answer your questions:

Green ADXVMA6 Bar (6)
Red ADXMA4 (4)
The white line is a DECEMA 12, virtually identical to the HMA 9.

I was not at my computer at the time of the first indicated trade, and it was well on its way so I waited for the retracement, hoping to see a continuation of the trend.

Exit when decema (white) turns to cross red (4). I struggle with exits.

Hope that answers your questions.
Thank you sundowner, your answer is crystal clear.

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.

Reply With Quote
  #205 (permalink)  
Old 11-18-2007, 03:37 PM
unicorn's Avatar
unicorn has no status.

 
Join Date: Apr 2007
Posts: 164
Thanks: 25
Thanked 0 Times in 0 Posts
Arrow Re: The Chimp`s "Forex Trades"

Quote:
View Post
MT4 does not have a Wilders function and iMAon Array has "known issues" so the ema smoothing got hand coded as a result, the weighting formula used may not be standard, again it made sense at the time.
Hello Bruce;

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.

Reply With Quote
  #206 (permalink)  
Old 11-18-2007, 04:06 PM
cattus's Avatar
cattus has no status.

Trader Specs
 
Join Date: Sep 2007
Location: Mexico
Posts: 63
Thanks: 0
Thanked 1 Time in 1 Post
Re: The Chimp`s "Forex Trades"

Hi Walter, PYenner, Unicorn and sundouner.

Great interaction that you have here. It looks like a pretty game seen from the chairs of a stadium.

Quote:
View Post
Hi Unicorn, thats precisely what I am working right now... taking some decisions into wich is the better combination of indicators... so I am letting the sands settle down and once I get the most simple and optimized combo I will make it public on a new thread... my idea is going live with that defined combination and be consistent posting my live trades during a year at least...

So that thread will be diferent to the research threads as it will show something already defined and used on the live realm... it will be cool... cheers Walter.
Walter, already I am moved by this commentary, I will be waiting for this thread with anxieties....... I have some doubts as those that Unicorn mentioned...


Quote:
View Post
...even I am still not convinced of using NT as it has data problems... cheers Walter.
It is really a very important point... NinjaTrader has 3 forex sources of data and as I understand the confidence order of the data is: TradeStation, eSignal and the last could be data form Gain Capital. But to obtain any of them in order to work with live data as I understand we must pay for, or open a live account with TradeStation or Gain Capital...This condition make me think if it is better to compare NT with other chart packages like Amibroker, Ensign, or any other that have charts with ticks or seconds at least.

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

Reply With Quote
  #207 (permalink)  
Old 11-18-2007, 04:22 PM
unicorn's Avatar
unicorn has no status.

 
Join Date: Apr 2007
Posts: 164
Thanks: 25
Thanked 0 Times in 0 Posts
Arrow adxvma modification - The Chimp`s "Forex Trades"

Quote:
View Post
MT4 does not have a Wilders function and iMAon Array has "known issues" so the ema smoothing got hand coded as a result, the weighting formula used may not be standard, again it made sense at the time.
Frankenstein's workshop stuff.
Drives ya nuts doesn't it?
Bruce; and Walter; and Sparrow:

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