Aaragorn's EA workbench - page 4

 

Do you have a template that i can use to call any custom indicator into an EA code?

 
forextrend:
Do you have a template that i can use to call any custom indicator into an EA code?

I'm sorry I don't. You might check with codersguru. Don't you call a custom indicator the same way you call any other indicator? Check out the iCustom function in the metaeditor. As long as you are clear about how many parameters and the type of parameters the indicator needs I think that's all you need. I'm not really sure what you mean by a template. You just need to understand how to call the indicator as far as I know.

 

Divergence 8

Feedback and suggestions welcome.

I should mention that I only have worked on the long side of the system. so this is for long only.

 
Aaragorn:
Feedback and suggestions welcome. I should mention that I only have worked on the long side of the system. so this is for long only.

Blew 100K in less than a month on backtesting. I am using the same settings as you. 89.40% modeling quality. Any ideas?

 

i_me

I love that graph you posted!

Just think if the lots had increased in relation to the accountbalance

*EDIT* just realized, it's probably trading the max lots for the account !!

I'm currently down to 1 project atm.

Also hoping to contribute here at the workbench soon.

Tross

 
Tross:
i_me

I love that graph you posted!

Just think if the lots had increased in relation to the accountbalance

*EDIT* just realized, it's probably trading the max lots for the account !!

I'm currently down to 1 project atm.

Also hoping to contribute here at the workbench soon.

Tross

Indeed, the secret is clever money management

 
Tross:
i_me

I love that graph you posted!

Just think if the lots had increased in relation to the accountbalance

*EDIT* just realized, it's probably trading the max lots for the account !!

I'm currently down to 1 project atm.

Also hoping to contribute here at the workbench soon.

Tross

Look forward to it yes it was trading max lots for the mini account which it reached in about 5 trades from the start.

 

Two projects seem to have drawn my attention currently.

Inside the Divergence EA I am working to create a support and resistance way of identifying phase1 phase2 and phase3 trend acceleration. This is relative to the slope of the trend. The trends usually follow in succession and it's sorta like the ELwave theory I guess. I'm not fully up on ELwave but there is arithmetic progression followed by logrithmic progression followed by the final big move which is obscenely fast.

To detect these phases I'm building some support and resistance code and making it draw on the chart. Oddly enough...

This code which was in the original divergence trader works fine to draw the down arrows for the resistance point...

ObjectDelete("Cmmt430");

ObjectCreate("Cmmt430", OBJ_ARROW, 0, Time[cord411],cord411value+(15*p));

ObjectDelete("Cmmt431");

ObjectCreate("Cmmt431", OBJ_ARROW, 0, Time[cord412],cord412value+(15*p));

however I can't for the life of me figure out how to turn that around to draw UPARROWS for the support points???? go figure. I guess I'll live without drawing those arrows an it won't stop the logic of the program but it irks me that I can't figure out how to draw them.

I also received this feedback by PM...

shohreh shohreh is offline

Junior Member

Join Date: Nov 2006

Posts: 13

shohreh is on a distinguished road

CT

Hi

I have been testing out 1.93b and analysed from august 2006 why it wins or looses trades. this is what i found

1) Trend should be analysed on a lower time frame as a filter for taking positions on a higher time frame. Dont know how thats possible to program that. As whatever the logic is a higher time frame gives better signals but all it needs is a trend filter from a lower time frame since we are scalping

2) The second reason why ct looses a trade is actually due to the trailing hard stop. If the market direction is correctly analysed the default 15 pip stop should be raised. Which can be done even now

3) The system also looses trades when it takes positions at market extremes. So even if the system accurately analyses the trend at market extreme it wont detect the reversal on a higher time frame

So another variable within should say not to trade between those price levels. Here individual discretion should be used as what u consider as market extreme. Or perhaps use rsi above 60 as the no trade zone and visa versa

Just observing the animation when you backtest ct you can see a pattern where ct is going wrong

Hope that helped

tc

I think that shohreh is got some very valid insights here....

I'm swamped with my attention on the s/r development but I wish someone could develop his suggestions in the CT ea. I'm posting my latest version of CT here too if anyone wants to take it on.....

My only suggestion to Ducati is that this wasn't finished. It's not just about changing settings. It's about understanding the logics of the program and what/how it might be improved on that level. that's what the workbench is about. If you can and want to participate on that level great but simple changing settings isn't really the end all of this thread. This is about reworking the program logics and making EA's better on the inside. Keep studying and your insights are always welcome.

 

Can anyone Help me debug this?

This code is finding the resistance point(s) in order to draw a trend line.

cord111 = Highest(NULL,0,MODE_HIGH,(MidRange*4),MidRange);

cord121 = Highest(NULL,0,MODE_HIGH,MidRange,0);

cord111value = High;

cord121value = High;

ObjectCreate("Cmmt32", OBJ_TREND, 0, Time[cord111],cord111value , Time[cord121],cord121value);

The problem occurs when two values on different bars are exactly the same level. The correct trendline would be thru the most recent occurance of the value. The code doesn't recognize anything but the high index and the highest high. if two values are both the same and both the highest of the range then it uses the first occurance of the value instead of the most recent.

here's the full code snippet....

int run21=0,cord111=0,cord121=0;//resistance

double cord111value=0,cord121value=0,Resistance1=0,rise21=0,slope21=0;//resistance

//---the problem is when a subsequent occurance of the same value happens in variable "cord121"

//---I need the code to defer to the most recent occurance and right now it's not

cord111 = Highest(NULL,0,MODE_HIGH,(MidRange*4),MidRange); //returns index value of bar

cord121 = Highest(NULL,0,MODE_HIGH,MidRange,0); //returns index value of bar

cord111value = High; //returns value of bar

cord121value = High; //returns value of bar

//----everything below this works fine, it calculates the line and draws it on the chart

rise21 = cord121value - cord111value;

run21 = cord111-cord121;

slope21 = rise21/run21;

if(cord111value==cord121value)

{

cord111=cord111-1;

}

if(rise21>0)

{

Resistance1 = cord121value+(MathAbs(slope21)*cord121);

}

else

{

Resistance1 = cord121value-(MathAbs(slope21)*cord121);

}

ObjectDelete("Cmmt32");

ObjectCreate("Cmmt32", OBJ_TREND, 0, Time[cord111],cord111value , Time[cord121],cord121value);

ObjectDelete("Cmmt33");

ObjectCreate("Cmmt33", OBJ_ARROW, 0, Time[cord111],cord111value+(15*p));

ObjectDelete("Cmmt34");

ObjectCreate("Cmmt34", OBJ_ARROW, 0, Time[cord121],cord121value+(15*p));

ObjectDelete("Cmmt35");

ObjectCreate("Cmmt35", OBJ_TEXT, 0, Time[0], Resistance1+(40*p));

ObjectSetText("Cmmt35","Mid Range cord121= "+DoubleToStr(cord121,4),8,"Arial",White);

 

Support and Resistance

I don't know if it's a win or a loss but...

I am conceding the battle for the day. I can't make this work exactly as I envisioned where it would maintain the highest sloped line as the values rolled down the chart. This makes for some interesting whipsaw action as the indicators crest peaks and before they reestablish themselves. By running three instances of this a short, mid, and long range it gives occasionally a picture perfect snapshot of the three phases. However until I can figure out how to eliminate the whipsaw motion as values move out of range for each instance I don't know that it will do me any good as an automated indicator. It would need alot more work I think. Beyond my level of programming skill at present.

That however doesn't mean that we can't perhaps learn to benefit from it, using our own discretion. I can see the chart, and if it's not drawn a line exactly where I think it should be I can still draw it manually.

It's kinda interesting to watch it move across the data.

I apologize for not being able to work the bugs out of it more. I'm just a novice programmer. If you find any value in it please let me know. Please forward it to anyone you think might be able to offer insight on improving it too. It's still full of bugs.

This is actually got all everything turned off except the part the draws the lines on the chart. I'm not at all sure how to use this information yet.

Reason: