Forex
Google

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-13-2007, 02:04 PM
etrade's Avatar
etrade etrade is offline
Senior Member
 
Join Date: Aug 2007
Posts: 234
etrade is on a distinguished road
EA Usage Tricks

It is very helpful if people share their tricks in using EAs

For instance, I have a problem with using EA, as when I open MT4, EA will open a trade according to its signal (trend direction), though it may be the end of the trade.

One solution is to keep EA inactive, then upon appearing first opposite signal, activate it.

Is there any other way (I am sure there is) ...


I also have another problem:

When the trade reaches the TP, it will be closed, but as EA feels the same trade direction, it will open another trade in the same direction. In fact, I want to know how can I set EA to do trade only one time after each signal change....

Last edited by etrade : 09-13-2007 at 02:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-14-2007, 09:06 AM
etrade's Avatar
etrade etrade is offline
Senior Member
 
Join Date: Aug 2007
Posts: 234
etrade is on a distinguished road
In ASCTrend EA, the trade system is:

PHP Code:
if (!ExistPositions()){//2
  
if (PS){//3
  
OpenSell();
  return(
0);
  }
//3    
  
if (PB){//3
  
OpenBuy();
  return(
0);
  }
//3    
 
}//2

 
if (ExistPositions()){//2
  
if(OrderType()==OP_BUY){//3
   
if(EnableCloseByASCTrend){//4
    
if (PS){//5
    
CloseBuy();
    return(
0); 
    }
//5
   
}//4
  
}//3  
  
if(OrderType()==OP_SELL){//3
   
if(EnableCloseByASCTrend){//4
    
if (PB){//5
    
CloseSell();
    return(
0);
    }
//5
   
}//4
  
}//3 

How can I modify it to persuade EA 1. to trade only one time after each signal change 2. when opening MT4, wait for the next signal change

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-14-2007, 09:22 AM
jlpi's Avatar
jlpi jlpi is offline
Senior Member
 
Join Date: Oct 2006
Posts: 275
jlpi is an unknown quantity at this point
Quote:
Originally Posted by etrade View Post
In ASCTrend EA, the trade system is:

PHP Code:
if (!ExistPositions()){//2
  
if (PS){//3
  
OpenSell();
  return(
0);
  }
//3    
  
if (PB){//3
  
OpenBuy();
  return(
0);
  }
//3    
 
}//2

 
if (ExistPositions()){//2
  
if(OrderType()==OP_BUY){//3
   
if(EnableCloseByASCTrend){//4
    
if (PS){//5
    
CloseBuy();
    return(
0); 
    }
//5
   
}//4
  
}//3  
  
if(OrderType()==OP_SELL){//3
   
if(EnableCloseByASCTrend){//4
    
if (PB){//5
    
CloseSell();
    return(
0);
    }
//5
   
}//4
  
}//3 

How can I modify it to persuade EA 1. to trade only one time after each signal change 2. when opening MT4, wait for the next signal change

Thanks
A way to do it is to use a global variable. It is pretty simple.

For instance you set it to 1 when you open a BUY and -1 if you open a SELL.
And then to open a new order you check what is the value of this variable.
You can reset the variable to 0 for instance if a new signal appears.
And you do not open a new BUY if the variable = 1.

I hope it is clear.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
~ Old Dog / New Tricks ~ riffster Manual trading systems 45 06-25-2008 02:55 AM
CPU Usage Linuxser Metatrader 4 23 06-13-2008 08:10 PM
Optimization cpu usage, need help Big Joe Indicators - Metatrader 4 4 08-16-2007 10:46 PM
MT4 memory usage european Metatrader 4 7 07-25-2007 03:59 PM
cpu usage mcsqueeze General Discussion 9 07-19-2006 08:21 PM


All times are GMT. The time now is 02:24 AM.