Terminator v2.0 - page 36

 

Dec 21 2006 12:51 Est

Here is the state of affairs as of Dec 21. This is amazing. Makes it look like I know what am doing; I don't. At least not entirely. I found the line to limit lot size will report on this later.

I would like to reduce the capital in trade, i.e. withdraw some profits, does anyone know how to do that on a demo? I just want to intentionally reduce the capital used in trading.

Pipsqueak2

Files:
dec_21.jpg  135 kb
 

Dec 22 RESULTS TREMINATOR

Seems like this thread is very quiet. Anyway here are my results and comments.

1) Terminator does not come with stops, you must add regular stops and trailing stops.

2) Max lots is set at 100 in the program, for me that is too high. You must change the line in the code "if(maxLots>=100){maxLots=100;}". Change the 100 to a lower number, e.g. 5.

3) Case0: seems the winner in my forward test this week and last. Case0: is MACD slope. I will introduce a filter to ignore slopes that are too shallow (sideways moves) and use EMA slope instead of MACD seems like EMA gives earlier signals.

4) This coming week, I will concentrate on the most favourable Case0:: which I believe will be MACD when I do the analysis.

Happy pipping.

Pipsqueak2

Results attached.

Files:
 
pipsqueak2:
Seems like this thread is very quiet. Anyway here are my results and comments.

1) Terminator does not come with stops, you must add regular stops and trailing stops.

2) Max lots is set at 100 in the program, for me that is too high. You must change the line in the code "if(maxLots>=100){maxLots=100;}". Change the 100 to a lower number, e.g. 5.

3) Case0: seems the winner in my forward test this week and last. Case0: is MACD slope. I will introduce a filter to ignore slopes that are too shallow (sideways moves) and use EMA slope instead of MACD seems like EMA gives earlier signals.

4) This coming week, I will concentrate on the most favourable Case0:: which I believe will be MACD when I do the analysis.

Happy pipping.

Pipsqueak2

Results attached.

I am still doing research, development and testing on a better handle to making a safer Terminator EA. Hence my lack of presence until I have something fruitful to deliver.

Regarding the line of code referenced above, most if not all brokers using metatrader have a 100 lot trade limit. So if the Lots= and MaxTrades= settings are such that lot size would exceed 100 lots the EA would set the maximum allowable to 100 lots. That is the purpose of that section of code.

tom

 

Testing Terminator

Hi tmaneval, fine piece of work you have done. My demo account has gone from about 8k to 35k in a little less than a month. However I am still not comfortable with Terminator while it is set with stoploss=0, and trailing stoploss=0.

I have been manually putting in stops when I can. In the extrenal settings, should I not use stops?

I thought that the EA actually automatically found entry points from the 5 Cases on the last page. After looking over your code, I cannot see where "OpenOrdersBasedOn" is calculated, instead I see it as a variable. My copy of Treminator had "5" as that variable and all positions opened used Case5: for the algorithm. Since then I have changed it to 0, and 1... etc..

I also plan on changing the Pips variable to something like 200, because I don't want to open more than one position in the same direction. What do you think of my results and settings?

Pipsqueak2

 

Analysis

Here are the results for my tests of the various Cases.

Case 0: GBP/USD Net Gain/loss $13,217 GAIN

Case 1: USD/JPY Net Gain/Loss $827 GAIN

Case 2: EUR/CHF Net Gain/Loss $147 LOSS this was my algorithm nfg!

Case 3: not tested

Case 4: USD/CHF Net Gain/loss $2,271 GAIN

Case 5: EUR/USD Net Gain/Loss $8,132 GAIN.

Conclusion: My algorithm is nfg. Case 0 is the winner by a long shot but it could be further tweaked to reduce negative trades.

This week I will be testing Case 0 but instead of using the slope of the MACD MAIN, I will use the slope of a Linear weighted MA(5) with filtration to ignore shallow slopes. The LWMA(5) hugs price profile closely and if I can exclude trading in the region of shallow slopes, bad trades might be avoided.

Pipsqueak2

 

Is This For Real?

I tried backtesting with a new entry algorithm and it flattened my 10k in one year. Next I switched from buy criterion to sell and sell to buy. That makes no sense to me but the backtest on GBP/USD is astounding. I have allowed for lots up to 100.

See the backtest results below; its amazing, now if I could duplicate the same on a forward demo test then a live test!

So far I've gotten those results on the GBP/USD pair but the EURO/USD is quite good too. Here is my algorithm:

========================================================

int OpenOrdersBasedOnMACD()

{

int myOrderType=3;//Case 0

double a1=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,0);

double a2=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,1);

if(a1>a2){myOrderType=1;}

double a3=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,0);

double a4=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,1);

if(a3<a4){myOrderType=2;}

if(myOrderType!=3){EntryStrategy="Case 0";}

return(myOrderType);

}

========================================================

Can anyone figure out what is wrong? I'd like to know because it appears totally illogical, but works in the backtest.

Pipsqueak2

Files:
backtest.htm  735 kb
backtest.gif  6 kb
 

Comparative Results

Some of you may be interested in my comparative results. All pairs were tested under identical conditions, but the results of the backtests are widely different. This lends more credence to my assertion that EA's should be Pair-Specific. I believe it is a waste of time trying to produce a one-size-fits-all EA.

If there is such a thing, then so be it, if not I think its best to develop EA's for specific pairs and TF's etc. All my testing has been on the H1 TF. The results below are not absolute, but relative. An exceptionally good back on one pair is meaningless for any other pair.

====================================================

TEST OF PAIRS vs TERM2.02 EA

H1; st=35; tp=35; tr=25;maxlots100;;openpos=5; mm=1;Account=normal;etc,Starting capital=$10,000;Jan01/06-Dec 15/06

1) GBP/USD $5,940,718

2) EUR/USD 62,995

3) USD/CAD 39,689

4) EUR/AUD 36,639

5) USD/CHF 36,370

6) EUR/JPY 25,889

7) USD/JPY 24,465

8) GBP/JPY 16,716

9) GBP/CHF 16,548

A) EUR/CHF 9,516

B) EUR/GBP 8,844

C) AUD/USD 7,726

Pipsqueak2

 
pipsqueak2:
I tried backtesting with a new entry algorithm and it flattened my 10k in one year. Next I switched from buy criterion to sell and sell to buy. That makes no sense to me but the backtest on GBP/USD is astounding. I have allowed for lots up to 100.

See the backtest results below; its amazing, now if I could duplicate the same on a forward demo test then a live test!

So far I've gotten those results on the GBP/USD pair but the EURO/USD is quite good too. Here is my algorithm:

========================================================

int OpenOrdersBasedOnMACD()

{

int myOrderType=3;//Case 0

double a1=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,0);

double a2=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,1);

if(a1>a2){myOrderType=1;}

double a3=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,0);

double a4=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,1);

if(a3<a4){myOrderType=2;}

if(myOrderType!=3){EntryStrategy="Case 0";}

return(myOrderType);

}

========================================================

Can anyone figure out what is wrong? I'd like to know because it appears totally illogical, but works in the backtest.

Pipsqueak2

You may just have your order types reversed? Try this:

int OpenOrdersBasedOnMACD()

{

int myOrderType=3;//Case 0

double a1=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,0);

double a2=iMA(NULL,0,5,0,MODE_LWMA,PRICE_OPEN,1);

if(a1>a2){myOrderType=2;}//buy

double a3=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,0);

double a4=iMA(NULL,0,5,0,MODE_LWMA,PRICE_CLOSE,1);

if(a3<a4){myOrderType=1;}//sell

if(myOrderType!=3){EntryStrategy="Case 0";}

return(myOrderType);

}

Or is it that the above code is what crashed the account in backtest?

tom

 

fibolotsize

hello tom,i want to know if it's possible to included in the script of terminator

v2 , a fibonacci lot size progression..... thank you

 
markus06160:
hello tom,i want to know if it's possible to included in the script of terminator v2 , a fibonacci lot size progression..... thank you

Done. See post#1 for T2.03. Also added another buy/sell trigger (OpenOrdersBasedOn=6)

Changed some settings in hopes to make this a safer EA - larger pipspread.

It's not much so far....but every little bit helps.

tom

Reason: