Aaragorn's EA workbench - page 7

 
 
giapel:
i am forward-testing Divergence Trader 7 and Ea gives me this error :

2006.12.20 01:02:02 Divergence Trader Version 7 EURUSD,M15: -----ERROR----- BUY Ask=1.3207 error=4051 bartick=108

2006.12.20 01:02:02 Divergence Trader Version 7 EURUSD,M15: invalid lots number for OrderSend function

can you help me to solve it ?

thank you, giapel

ERR_INVALID_FUNCTION_PARAMETER_VALUE 4051 Invalid function parameter value.

it's telling you the lot size is outside it's parameter. I suggest using the normalizedouble(Lots,2) with only allowing two decimals. it probably means you are out of money in the account?

 

Hello Aaragorn. Can make an attempt add vhf and center of gravity to TrendRider3.2 ???

 

My technical strategy

Aaragorn:
I have a very similar goal. These are my goals.

Make an EA with a very high win rate.

Leverage the crap out of it.

As for the once a day thing. I don't care if it trades once a day or four times a day or once every two days. What matters to the strategy is that it has a high win rate.

I also am thinking of only seeking to make a small number of pips on each winning trade. It seems plausible to the mind. I understand money management if you look at most of my work on EA's it's been to enahnce the leverage of the money management on them.. post #58 on this thread shows what I'm talking about. I identified the highest winning trade in the series of 5 that the multilotscalper makes...

open orders total winners totallosers nettotal %W %L

0 326 177 503 0.648111332 0.351888668

1 310 105 415 0.746987952 0.253012048

2 228 46 274 0.832116788 0.167883212

3 162 29 191 0.848167539 0.151832461

4 97 24 121 0.801652893 0.198347107

this shows that when the order places which has 3 open orders it is 84% successful. so that is the one I leveraged most.

84% is not 98%!

That is why I am rummaging thru all these EA's I am looking for something I can make more winning % somehow. It seems to come down to filtering an already good signal.

There are many ways to generate a signal. However no signal that I know of is 98% in all market conditions. So we have to identify when a signal is best and limit taking action on it until only it's best times.

Believe it or not I almost think the cyberia trader could be used to isolate a ten pip move with a high probability. The cyberia trader right now as far as I know is about 75% accurate at winning at best. But there is alot of conditions it trades in that are not ideal for it. There is some feedback on that thread that I have not had time to work on to see if I can limit it out of those conditions to see if it can get above 75%.

I think what we are looking for we are going to have to focus on using the 30m chart or larger timeframe. There is a condition that I have observed that I have called 'market noise' in the past. Really it's a bounce or a flutter motion that retests repeatedly over the same 20 or 30 pip range two or three times. This happens more when consolidation is happening than when the sessions are really moving.. Consolidation may happen during the sessions but it's a time typically just after a large move that it either retraces to the 61% fib. level or nearly so or just after it's retraced to that level then it goes back and retests the extreme level it just moved to.

The other thing I'm paying attention to is trend acceleration. When a trend moves into exponential acceleration and makes those big moves. Entering right with a good trailing stop could make 10 pips happen easily. It may be that to get 98% might mean asking for less than 10 pips> I don't know. If we shoot for 10 and are willing to accept 5 or 6 I think our chances of getting our % up improves.

you might also look at the logic of https://c.mql5.com/forextsd/forum/17/basic_template.mq4

I was looking for a way to find a high probability entrance using the slopes of moving averages as a filter.

As for programming I'm qualified to hack at it. lol Its' only been a few months that I've been programming mql4 myself. All I know is I'm better at it than I used to be.

Thanks for the reply aaragon. Im really happy we are thinking in similar line!:)

Are you familiar with the UniversalMaCross of firedave? Anyways I was modifying it to try to filter out false signals generated by the MA, now it has 4 MAs instead of 3, an RSI filter, and the EMA angle, all still fully costumizable. 10 pips can easily be achieved when all this indicators line up and give a signal. My problem is making it trade just once a day. becasue it keeps trading even after TP. Can you help me with this?

The reason i want it to trade just once a day is because I believe it will dramatically increase the win rate of the program. say we are trading GBPUSD

with the average daily range of about 150 pips, 10 pips is just a small fraction of that average daily range. The idea here is to steal this 10 pips during its most volitile session which is during the Euro session. THis is where the turtle method comes in. Ex. Say a buy signal has been established by all the indicators during the openig euro session, the EA will then place a buy stop at that days high. if no signal is generated no stop will be placed, and incase the signal is false there is still a chance that the stop order wont be hit. the reason i prefer pending orders because we want the market to slimply pass trough our 10 pips, Instant Execution Orders sometimes cause delayed entry which can be very bad for our 10 pip goal . Then after this the EA should rest and start the next euro open day.

Anyways tell me what you think. Pls find the Modified UniversalMACross attached below.

Kind regards and a firm handshake,

Mikhail

 
mikhaildgreat:
Thanks for the reply aaragon. Im really happy we are thinking in similar line!:)

Are you familiar with the UniversalMaCross of firedave? Anyways I was modifying it to try to filter out false signals generated by the MA, now it has 4 MAs instead of 3, an RSI filter, and the EMA angle, all still fully costumizable. 10 pips can easily be achieved when all this indicators line up and give a signal. My problem is making it trade just once a day. becasue it keeps trading even after TP. Can you help me with this?

The reason i want it to trade just once a day is because I believe it will dramatically increase the win rate of the program. say we are trading GBPUSD

with the average daily range of about 150 pips, 10 pips is just a small fraction of that average daily range. The idea here is to steal this 10 pips during its most volitile session which is during the Euro session. THis is where the turtle method comes in. Ex. Say a buy signal has been established by all the indicators during the openig euro session, the EA will then place a buy stop at that days high. if no signal is generated no stop will be placed, and incase the signal is false there is still a chance that the stop order wont be hit. the reason i prefer pending orders because we want the market to slimply pass trough our 10 pips, Instant Execution Orders sometimes cause delayed entry which can be very bad for our 10 pip goal . Then after this the EA should rest and start the next euro open day.

Anyways tell me what you think. Pls find the Modified UniversalMACross attached below.

Kind regards and a firm handshake,

Mikhail

Let me take a look at it. I don't think that it will be hard to make a one order per day filter. I have an idea already how I could do it to specify how many pips you want to claim and then rest when that goal is reached.

I have a strong idea how to do the "x" pips a day filter now. I'm not as familliar with pending orders. My idea is use the int DayOfWeek() and to place the day of week in the order comment on each order. When orders close it's a simple matter to tally how many pips they took using the orderopenprice and ordercloseprice together with the ordertype. Then compare the pips to whatever "x" value we want to specify, (10) and if we have reached our goal block further trading on that day. It's doable for me to program.

I have looked at the bago method and it doesn't grab me. Why did you pick this method? Can you tell me what method you believe stands the best chance of identifying a good entry for this strategy? I'd like to insert this filter on a program as well developed already as possible , it's either that or start from scratch.

 
Aaragorn:
Let me take a look at it. I don't think that it will be hard to make a one order per day filter. I have an idea already how I could do it to specify how many pips you want to claim and then rest when that goal is reached.

I have a strong idea how to do the "x" pips a day filter now. I'm not as familliar with pending orders. My idea is use the int DayOfWeek() and to place the day of week in the order comment on each order. When orders close it's a simple matter to tally how many pips they took using the orderopenprice and ordercloseprice together with the ordertype. Then compare the pips to whatever "x" value we want to specify, (10) and if we have reached our goal block further trading on that day. It's doable for me to program.

I have looked at the bago method and it doesn't grab me. Why did you pick this method? Can you tell me what method you believe stands the best chance of identifying a good entry for this strategy? I'd like to insert this filter on a program as well developed already as possible , it's either that or start from scratch.

I only experimented to see how bago method would work as an EA but its not a profitable method when automated others claim to make money from this method trading manually. Anyway its just the filename but so much has already been added in this EA in an attempt to make bago EA profitable, until it already became very different from bago method. I just no longer bothered changing the filename.

If you prefer to start from scratch it would also be OK, I only posted this to illustrate to you my idea and to provide a code that already has so many indicators and filters for MA signals. because im a trend trader so the way i think is to try to capture the 10 pips from an already established trend...

for you what set of indicators do you think would provide the best signal for this particular EA?

looking forward to this little project of ours.

kind Regards and a Firm Handshake,

Mikhail

 

Hello Again!

is it possible for you to provide that code that would enable the one trade per day filter?

So I can play around with it

ill try to intigrate it to this EA and another I have in mind, if it shows promise Ill post it if not then its back to the drawing board...

Happy holidays,

Mikhail

 
mikhaildgreat:
Hello Again!

is it possible for you to provide that code that would enable the one trade per day filter?

So I can play around with it

ill try to intigrate it to this EA and another I have in mind, if it shows promise Ill post it if not then its back to the drawing board...

Happy holidays,

Mikhail

Ok, I fit the one day filter to this EA but it doesn't really engage with this strategy. It will show you how I did it though.

I made this function which could be transferred to another EA.

//----------GET LAST DAY of WEEK------------------+

string SuccessfulDay()

{

int

cnt,

total = 0;

string DAY;

//for(cnt=0;cnt<OrdersTotal();cnt++)

{

OrderSelect(HistoryTotal(),SELECT_BY_TICKET);

if((OrderType()==OP_SELL) && OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && OrderProfit()>0 && (OrderOpenPrice()-OrderClosePrice()>DailyPipGoal*Point) )

{

DAY = OrderComment();

string d="";

if(DAY=="0[sl]") d="Sunday";

if(DAY=="1[sl]") d="Monday";

if(DAY=="2[sl]") d="Tuesday";

if(DAY=="3[sl]") d="Wednesday";

if(DAY=="4[sl]") d="Thursday";

if(DAY=="5[sl]") d="Friday";

if(DAY=="6[sl]") d="Saturday";

ObjectDelete("day");

ObjectCreate("day", OBJ_TEXT, 0, Time[0], Low[0]+(0*Point));

ObjectSetText("day",d +" is successful",8,"Arial",White);

}

if((OrderType()==OP_BUY) && OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && OrderProfit()>0 && (OrderClosePrice()-OrderOpenPrice()>DailyPipGoal*Point) )

{

DAY = OrderComment();

string d1="";

if(DAY=="0[sl]") d1="Sunday";

if(DAY=="1[sl]") d1="Monday";

if(DAY=="2[sl]") d1="Tuesday";

if(DAY=="3[sl]") d1="Wednesday";

if(DAY=="4[sl]") d1="Thursday";

if(DAY=="5[sl]") d1="Friday";

if(DAY=="6[sl]") d1="Saturday";

ObjectDelete("day");

ObjectCreate("day", OBJ_TEXT, 0, Time[0], Low[0]+(0*Point));

ObjectSetText("day",d1 +" is successful",8,"Arial",White);

}

}

return(DAY);

} [/PHP]

and put this day of week code into where you are opening orders....example from this EA..

double dow = DayOfWeek();

string dayofweek = DoubleToStr(dow,0);

if(SuccessfulDay()==dayofweek) {return(0);}

if (OrderSend(Symbol(),OP_BUYSTOP,Unit,EMAX,6,BStopLossLevel,0,dayofweek,MagicNumber,0,Green)<0)

and of course this goes in the globals...

[php]extern double DailyPipGoal = 10;

This does the job basically but it's not fool proof. It is going to block orders after one order is successful at hitting the goal for the day. If you have a losing order before that it doesn't keep count or a net total. It just looks at the last order that closed and if it's enough to hit the goal it's satisfied.

 

Wow Aargon thanks allot,

will update you if i find something intersting.

Thanks again,

Mikhail

 

aaragon,

have u forward tested latest cyberia trader? is it successful?