You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello all
I put "kafetero" since Friday and no trade.
So I think there is a problem but I do not know which one?
I'm home "Pepperstone."
thank you for your help.
Hello!! any one can help me? I did the same set 1 direction as this picture do but still escape keep open buy+sell @ same time !! no matter how hard I try!! it nothing happen!! please show me the code setting 1 direction as I want anytime.. thanks!!!!
Hi Ken,
instead of changing the direction in the ea inputs, why not just change it in the common tab of the ea properties. It is there you can put longs only or shorts only. Hope this helps.
cheers,
Gary
stoploss
for (int i=10; i<OrdersTotal() here i=? you can change order total
extern double lTakeProfit = 20;
extern double sTakeProfit = 20; t/p if you want change
extern double Lots = 0.1; lots
and for margin setting
if(AccountFreeMargin()<(1000*Lots))
I didnt use stoploss and trialling stopwhere can change stoploos
Hello,
Can someone adjust this version?
Requirement is to have only one trade per symbol (only buy or only sell).
es_capelast_reversed_ECN_v1.06 - Download - 4shared - AJ Hogenes
has anyone thought of creating this with hlaiman or neural network? maybe we could have better results..
Hallo,
I am not a coder. After one month study I succeed to change it (Escapee.ea) to a trend following system with limited number of open positions, it is working fine in my demo account. Following modifications will boost the system. Can anybody insert a code here that will close all open positions short/long, profit/loss at the starting of a new trend (right place for opening new positions and closing opened position), I will be highly obliged.
Here is the code:
if (!ExistPositions()){
if ((diClose0<diMA1)){
OpenSell();
return(0);
}
if ((diClose2>diMA3)){
OpenBuy();
return(0);
}
Screen shot attached.
Thanks everybody
Mizan Sharif
Hallo,
I am not a coder. After one month study I succeed to change it (Escapee.ea) to a trend following system with limited number of open positions, it is working fine in my demo account. Following modifications will boost the system. Can anybody insert a code here that will close all open positions short/long, profit/loss at the starting of a new trend (right place for opening new positions and closing opened position), I will be highly obliged.
Here is the code:
if (!ExistPositions()){
if ((diClose0<diMA1)){
OpenSell();
return(0);
}
if ((diClose2>diMA3)){
OpenBuy();
return(0);
}
Screen shot attached.
Thanks everybody
Mizan Sharif
You can add this function to your EA :
#define closePause 250
void CloseAll(int orderTypeToClose, int MagicNumber)
{
for(int cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
if (!OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) continue;
if (OrderSymbol()!=Symbol()) continue;
if (OrderMagicNumber()!=MagicNumber) continue;
if (OrderType()!=orderTypeToClose) continue;
for(int c=0; c<3; c++)
{
RefreshRates();
ResetLastError();
bool dummyResult = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),closeSlipage);
int err=GetLastError();
if (err==0) break;
//
//
//
//
//
Print("Errors Closing order :"+OrderTicket());
if(err==4 || err==136 || err==137 || err==138 || err==146)
{
Sleep(closePause);
continue;
}
break;
}
}
}and then inserts something like :
CloseAll(OP_BUY,yourMagicNumber);
before you call OpenSell(); and
CloseAll(OP_SELL,yourMagicNumber);
before you call OpenBuy();
Great. Thanks for your reply and coding. I will do it soon and let you know.
Regards,
Mizan Sharif
You can add this function to your EA :
#define closePause 250
void CloseAll(int orderTypeToClose, int MagicNumber)
{
for(int cnt=OrdersTotal()-1;cnt>=0;cnt--)
{
if (!OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES)) continue;
if (OrderSymbol()!=Symbol()) continue;
if (OrderMagicNumber()!=MagicNumber) continue;
if (OrderType()!=orderTypeToClose) continue;
for(int c=0; c<3; c++)
{
RefreshRates();
ResetLastError();
bool dummyResult = OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),closeSlipage);
int err=GetLastError();
if (err==0) break;
//
//
//
//
//
Print("Errors Closing order :"+OrderTicket());
if(err==4 || err==136 || err==137 || err==138 || err==146)
{
Sleep(closePause);
continue;
}
break;
}
}
}and then inserts something like :
CloseAll(OP_BUY,yourMagicNumber);
before you call OpenSell(); and
CloseAll(OP_SELL,yourMagicNumber);
before you call OpenBuy();
Is there a version with these changes already done?
Thank you.
Hi there,
I tried to use kafetero in new build mt4, but didn't work.
I put the code in a fresh-new EA in mt4 editor. but had a problem. I'm not a programmer and spent hours in forums to fix the problem.
what I could change the
doesn't necessary. need to be quoted out. after that, I could make some tests, which seems good, but only in tests. in real life on demo account, I think because of the commission
other things, I can only do 90% testing and the testing doesn't count with the commission. I added to the spread the commission, but that should be another way.
my questions,
thanks,