EA for freedom, and can't make it work

 

Hi all:

On page 32 of ¨last added¨from section Code Base, i found an excellent EA.

I don't know what his author was thinking about when he wrote it, but for me it is based on one of the very few truth in forex. That meens that in forex, for a currency to make (for example) 20 pips is much easier than making 40 pips.

Obviously it is easier.... buy it is stadistically MUCH easier.

Just think that the ATR2000 of EUR/USD of 1 day is about 120 pips, the ATR of 4H (witch is 6 times shorter) is 60 pips (just the half), the ATR of 1H (4 times shorter than the previous) is 30 pips (just the half).. and so on.

So i would like to have an EA who may open trades, even at random, with 20 pips TP and 40 pips SL (that is something opposite to what most people recommend, so... it should be ok...LOL)

Ok, i haven't found one.. but i found this one who is based on the same principle:

It opens 2 opposite trades at the same time, for example with 40 TP and 20 SL, so when the market moves 20 pips in any dirección i loose 1 of them (20 pips). But, i am winning 20 pips because of the other trade (so at this point i am brakeven) and i am about 20 pips to win (in that case i would win 40-20=20) and about to loose 20+20=40 if the price go 40 pips againt me.

Pffffff, so it is almost the same

Ok finally my problem is that it is not working properly. It opens only 1 trade (not 2 opposite) most of the time. Any know why???????

I attach the file just in case.

Thanks for your help

Files:
 

What error is returned by the failed OrderSend ? Perhaps ERR_TRADE_HEDGE_PROHIBITED error 149 ?

You shouldn't use Bars . . . it's not a reliable method . . .

 

That meens that in forex, for a currency to make (for example) 20 pips is much easier than making 40 pips.


Assuming Spread on your pair is 2pips and you calculate Stoplevels without spread:

On a 20/40 (TP/SL) pips trade as soon as you open the trade you are 2pips in minus, now you have to make 22pips to win but only -38 to loose. House advantage in this case should be somewhere near 10%.

On a 200/400 pips trade you have to win 198 to win and -398 to loose. House advantage in this case should be near 1%.

Statistically spoken you increase you chances to win by increasing the scalling faktor of the trade. RRR stays the same of course.

 
RaptorUK:

What error is returned by the failed OrderSend ? Perhaps ERR_TRADE_HEDGE_PROHIBITED error 149 ?

You shouldn't use Bars . . . it's not a reliable method . . .


RaptorUK i don't know anything about programming. Can you fix it???

It appears no messaje or anything, just don't open the 2 trades just one of them, generally it is a BUY trade.

 
marcat84:


RaptorUK i don't know anything about programming.

Time to learn then . . . https://book.mql4.com//
 
zzuegg:

Assuming Spread on your pair is 2pips and you calculate Stoplevels without spread:

On a 20/40 (TP/SL) pips trade as soon as you open the trade you are 2pips in minus, now you have to make 22pips to win but only -38 to loose. House advantage in this case should be somewhere near 10%.

On a 200/400 pips trade you have to win 198 to win and -398 to loose. House advantage in this case should be near 1%.

Statistically spoken you increase you chances to win by increasing the scalling faktor of the trade. RRR stays the same of course.



zzuegg in my opinion what you said it's all true!!

Spread is the main factor and obviously from that point of view it is better to increase the distance between TP/SL, (thats why i did't suggest 10/20) but.... you will make less trades also..

With 21.5 TP and 38,5 SL (spread 1,5) you need to win 2/3 to break even. I think you can win between 67.3 and 69.3%

 
I ran your EA, after 290 trades it had lost 90% and didn't have enough margin to place a 1 lot trade . . .
 
zzuegg:

Assuming Spread on your pair is 2pips and you calculate Stoplevels without spread:

On a 20/40 (TP/SL) pips trade as soon as you open the trade you are 2pips in minus, now you have to make 22pips to win but only -38 to loose. House advantage in this case should be somewhere near 10%.

On a 200/400 pips trade you have to win 198 to win and -398 to loose. House advantage in this case should be near 1%.

Statistically spoken you increase you chances to win by increasing the scalling faktor of the trade. RRR stays the same of course.



I've been chatting with some scalpers. They seem like very successful manual traders. Most of them claim to follow the 2% risk per trade rule and set stop_losses around 5-10 pips. However their take profit usually range from 3-5 pips. And usually they claim it's compensated by have high win-rates. In my mind, this is though to pull off. Unless you have one hell of a perfect entry.

Following these guys, this would seem like a nice way to trade. Have any members here any experience trading like this either with EA or Manually?

 
RaptorUK:
I ran your EA, after 290 trades it had lost 90% and didn't have enough margin to place a 1 lot trade . . .


well it is better than i had thought!!!!!!! Please write it backwards and post the copy!!!

Look, i think there were a problem with that text, teorically it is not ¨probable¨ that it may be that good or bad.. and anyway.... it needs to be fixed!!!!

You texted a broken EA loooll!!

Lool, no... really i would like to have it working fine... i think it could be very profitable and top simplest!! Or better some programmer who do it... there are just a couple of lines!!!

 
RaptorUK:
I ran your EA, after 290 trades it had lost 90% and didn't have enough margin to place a 1 lot trade . . .

ohh i forgot.... the parameters at the EA are 75/8... i don't know anything about that settings. I would have changed them. Is the robot way what i need
 

It does work . . . but not on a Broker that doesn't allow hedging. The first 2 trades placed, one was a buy the other a sell.

I re-ran the test with better data . . .

Reason: