Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-13-2007, 03:04 PM
etrade's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 278
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 03:09 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 09-14-2007, 10:06 AM
etrade's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 278
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 09-14-2007, 10:22 AM
jlpi's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 336
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
~ Old Dog / New Tricks ~ riffster Suggestions for Trading Systems 90 09-27-2009 04:28 PM
CPU Usage Linuxser Metatrader 4 29 09-03-2009 06:18 PM
MT4 memory usage european Metatrader 4 18 01-06-2009 10:24 PM
Optimization cpu usage, need help Big Joe Indicators - Metatrader 4 4 08-16-2007 11:46 PM
cpu usage mcsqueeze General Discussion 9 07-19-2006 09:21 PM


All times are GMT. The time now is 06:11 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.