Cost Averaging System - page 15

 

ADX Trend Exhaustion...

Aragorn,

In my code snippet, you will see that you need to identify peaks. So the easiest way to do that is to check 2 bars back for ADX rising, and then one bar back for ADX falling. You can't do any ADX logic calculations on the current bar, because it will always be changing. Then depending on whether you want to buy or sell, you need to find out if the ADX is above +DI or -DI. The ADX, by nature will be below both +DI and -DI when there is a consolidation period.

ADXPeak = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,2)) && //this will sense ADX peaks (trend reversals)

(iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,2) > iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,3)); //Added by Carl Rodriguez (crodzilla)

ADXBuy = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MINUSDI,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1)); //-DI must be less than ADX to buy

ADXSell = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_PLUSDI,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1)); //+DI must be less than ADX to sell

Carl

 

Some results

Hi all,

I tried Cost Averaging_v2 for 6 days - from 13.10 to now-20.10 at 5M timeframe. I enclose two reports (from today and from yesterday). If I had closed all positions yesterday, I would have had a profit of $519 which means about $104 a day. Excellent! But I left the expert working today also. If I close all my positions now, the profit is $133 (or $22 a day). This is also not bad.

Thanks to Maji for sharing! The expert is great!

 

Forward testing

Cost Averaging v3 and v4 results for the week are posted here and as per advice I will not close them down for the weekend.

John

 

Forward testing RSI

The week's result forward testing the RSI version. As with the other 2 versions I will not close RSI for the weekend.

John

 

Margin

treberk:
I think you were trading too many pairs on such a small deposit with regards to a standard account. - this is bourne out by the fact that you have very liitle free margin on the RSI statement you just posted

Yes I know. I did that to maximize risk and see what happens.

I think minimum should be $1000 per pair.

Also It seems to me that FXDD and Money Tec demos give better results than IBFX.

Has anyone else noticed that ?

 

.......................................

 
crodzilla:
Aragorn,

In my code snippet, you will see that you need to identify peaks. So the easiest way to do that is to check 2 bars back for ADX rising, and then one bar back for ADX falling. You can't do any ADX logic calculations on the current bar, because it will always be changing. Then depending on whether you want to buy or sell, you need to find out if the ADX is above +DI or -DI. The ADX, by nature will be below both +DI and -DI when there is a consolidation period.

ADXPeak = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,2)) && //this will sense ADX peaks (trend reversals)

(iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,2) > iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,3)); //Added by Carl Rodriguez (crodzilla)

ADXBuy = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MINUSDI,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1)); //-DI must be less than ADX to buy

ADXSell = (iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_PLUSDI,1) < iADX(NULL,0,ADXPeriods,PRICE_TYPICAL,MODE_MAIN,1)); //+DI must be less than ADX to sell

Carl

Carl,

apparently Maji got his email working and I got the EA from both of you now..

I wonder about the ADX settings you have for buy and sell. I can see the peak identification but when I think of ideal buy and sell conditions this is what I want to try...

ADXBuy = main now>main previous bar && +DI now > +DI previous bar && -DI now < -DI previous bar

ADXSell = main now>main previous bar && +DI now -DI previous bar

I'm not sure how it would work to use the +DI and -DI in direct comparision to the MAIN since the main is reflection of the combined isn't it? Am I misunderstanding the indicator? or are you?

as far as backtesting goes the only one I can get to test worth crap is the v2 or v2_1

I'll see if I can transfer this into the one I'm using.

 

Hello everyone,

How can we get the EA for v.2

Thanks

 

Goes to show what goes up must come down... couple of days of good trend action kicked butt. In reality, one has to have a portfolio of systems, a mix of antitrend and trending systems to even out the equity curve. My trend systems did well today, while the cost averager got its butt handed to it.

I am attaching the results. It appears the USDCAD was the culprit.

Thanks for testing.

 

ADX Trend Exhaustion...

Aragorn,

I see what you are saying. However, now you are wanting to catch the trend... is this true? Because ADX rising with +DI/-DI rising is catching a rising/falling trend.

In the codes current configuration, that would be very difficult. The way the indicator works is... the ADX peaks signaling a possible trend exhaustion. ADX falls as price consolidates or continues the new trend. ADX rises when the new trend is established. Start over again. My use is well documented in many technical trading journals.

My goal was to let Maji's code do its work. Not modify it to be a trend follower. I intended for new counter-trend positions to be in a better position strategically... by not willy-nilly entering positions just based on the pip-step.

Please clarify if I have mis-understood. I don't think Maji wants to turn this in to a trend follower.

Carl

Reason: