Cost Averaging System - page 14

 

I think a great feature of a cost averaging EA would be to have the option to only trade it in the direction of positive interest so we don't have to watch all the swap rates on all the pairs.

Also, I have found with Terminator that the pip spread between positions should correlate with the average daily pip range. I have been dividing the pip range by 4 to get my "pips between positions" number.

I also maually watch for a fib retracement and often jump out before the price pulls back to the preselected TP point. When the ADX shows a reveral, it would be cool to have a position open immediatley following the reversal, then held until aech fib level is retraced with a trailing stop.

Just my 2 cents.

 
forex4syg:
Not good day for V3.

Could be worse.

 
forex4syg:
Not good day for V3.

\

A bad day for RSI as well...at least for me. Finally got to see what this thing can do when a strong trend takes off. I had limited max trades to 7 to avoid large drawdowns....EURUSD really took off today and promptly placed 7 sell trades while going up the pipeline. Not good for me, but for those who left it at max trades = 10, they probably did ok on the dip. That's ok....I've been wanting to see how this EA reacted when a pair takes off and now I know. I definitely think RSI is more suited for ranging markets which is why it's probably done so well the past few weeks.

 

Cost Averaging EA test

Bad day-strong market moves and 2 power outages lasting a few hours.

My profits have been erased quickly.

 

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

 

Strong trends can kick this system's butt. However, those days are rare and the system makes money during the other days. I am attaching my results. Overall ahead of the game. However, $5000 is now tied up in margin and about $2500 in drawdowns (when I first managed to take a look at it this evening, it has subsequently closed some trades and improved). I think the clue is to stick with the rules and the system. No system will win everyday and one thing is for sure... there will be drawdowns. The ability and capitalization to withstand these drawdowns in the secret to success with trading mechanical systems.

Thanks everyone. Just keep the demos running. Don't worry about the losses, they are just demo dollars... they are dime a dozen. However, be thankful that you are getting to know how brutal trending markets can be towards anti trend systems. Also, think how strong nerves the commercials have when they trade by averaging down positions, and those are in millions of dollars.

Good luck.

 

Statement Updated

see the result for forward testing

same setting no manual intervention...

 
Maji:
Strong trends can kick this system's butt. However, those days are rare and the system makes money during the other days. I am attaching my results. Overall ahead of the game. However, $5000 is now tied up in margin and about $2500 in drawdowns (when I first managed to take a look at it this evening, it has subsequently closed some trades and improved). I think the clue is to stick with the rules and the system. No system will win everyday and one thing is for sure... there will be drawdowns. The ability and capitalization to withstand these drawdowns in the secret to success with trading mechanical systems.

Thanks everyone. Just keep the demos running. Don't worry about the losses, they are just demo dollars... they are dime a dozen. However, be thankful that you are getting to know how brutal trending markets can be towards anti trend systems. Also, think how strong nerves the commercials have when they trade by averaging down positions, and those are in millions of dollars.

Good luck.

Eventually we deserve to make a system that we can bring out of the demo and into the live account that isn't going to make gamblers of us all. It's easy to ignore demo losses unless the intent is to actually make money with an EA. What you have started here has great potential but that potential won't be realized by mickey mousing around with it. This EA deserves to be taken seriously and treated seriously. I has a fatal flaw which needs to be addressed to prevent catastrophic drawdowns. Several of the ideas suggested so far have tremendous merits. The idea to only allow it to trade in the direction of the interest on each pair is great. Those swap factors add up especially when running on multiple pairs which is where I see this working best. Using the ADX is a good idea too perhaps better than my channel suggestion if it can be made to work. Alas my development and coding skills still leave something to be desired. I tried to add some code to us the ADX but can't seem to get the variables to be on the right scope...it doesn't compile.

maybe someone can help me get it straightened out, in the variables I added...

extern bool UseADX = true;[/PHP]

in the code I added....

TradeNow = true;

StartEquity = AccountEquity();

}

ADX();

if (TradeNow)

{

if(ShortTrade)

[/PHP]

then at the bottom I added....

[PHP]//////////////////////////ADX////////////

void ADX()

{

if(UseADX)

{

if (LongTrade)

{ // main now < main last bar +DI now -DI last bar

if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0) < iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,1) && iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0) iADX(NULL,0,14,PRICE_HIGH,MODE_MINUSDI,1) )

{

TradeNow = false;

Print (" long trade blocked by ADX");

}

else

{

TradeNow = true;

}

}

if (ShortTrade)

{ // main now > main last bar +DI now > +DI last bar -DI now < -DI last bar

if(iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,0) > iADX(NULL,0,14,PRICE_HIGH,MODE_MAIN,1) && iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,0) > iADX(NULL,0,14,PRICE_HIGH,MODE_PLUSDI,1) && iADX(NULL,0,14,PRICE_HIGH,MODE_MINUSDI,0) < iADX(NULL,0,14,PRICE_HIGH,MODE_MINUSDI,1) )

{

TradeNow = false;

Print (" short trade blocked by ADX");

}

else

{

TradeNow = true;

}

}

}

}

dang if it doesn't give me this....

[PHP]Compiling 'Cost Averaging v2_1-Pyramid-ADX.mq4'...

'LongTrade' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (527, 11)

'TradeNow' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (531, 13)

'TradeNow' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (536, 13)

'ShortTrade' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (541, 11)

'TradeNow' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (545, 13)

'TradeNow' - variable not defined C:\Documents and Settings\Kelly\My Documents\currencies\Cost Averaging v2_1-Pyramid-ADX.mq4 (550, 13)

6 error(s), 0 warning(s)

now I know darn well that those variables are defined because they are used all thru the code...but with all the paranthesis coming and going and formatting being what it is, I can't for the life of me figure out where or how exactly to insert this function so that it can use the variables and see them correctly.

I would really like to see crodzilla's code regarding the ADX.

Since Maji's email is down he can't forward crodzilla's version to me. I wonder if I sent you my email addy if you would send me your version with the ADX so I can see how you're doing it? Carl, I'll PM you me email in that hope. I think your using the ADX has merit here. I just want to be in on it too. I want to see if this can in fact fix this EA's fatal flaw, the huge drawdowns. Exercising all that nerve and guts to endure with patience isn't very meaningful if it all gets wiped away in the blink of an eye. My tests show that it takes months for this EA to recover what it loses in an instant if it ever does. Only one or two catastrophic losses can bankrupt the account. That can't be tolerated except by the most compulsive gamblers. I refuse to be one of them. Still it may be fixable so let's keep after it.

If someone could put together the correct directions for trading 'with the interest' on each pair as Ducati suggested. I'd be happy to insert a function to do that too. I just don't know which way to trade on each pair. This will enhance profitability no doubt.

 

Swap rates

Swap rates per 1 standard lot

Symbol Buy ($) Sell ($)

AUD/CAD 2.90 -3.95

AUD/JPY 10.85 -12.75

AUD/NZD -3.65 3.00

AUD/USD 0.90 -1.50

CAD/JPY 8.75 -10.20

CHF/JPY 2.00 -2.65

EUR/AUD -10.75 9.15

EUR/CAD -4.65 3.60

EUR/CHF 5.50 -6.30

EUR/GBP -7.00 4.90

EUR/JPY 9.10 -10.50

EUR/NZD -16.80 13.75

EUR/USD -8.65 7.20

GBP/AUD -6.45 4.85

GBP/CHF 15.85 -19.65

GBP/JPY 21.55 -25.40

GBP/USD -3.50 2.15

NZD/JPY 10.95 -13.15

NZD/USD 3.25 -3.75

USD/CAD 2.65 -3.20

USD/CHF 9.90 -11.50

USD/JPY 13.00 -14.60

Files:
 

here are results from 10-17 with the very first version of the EA

Files:
costavg_1.htm  72 kb
Reason: