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

 
 
Thread Tools
 
Old 11-08-2006, 03:59 AM
Member
 
Join Date: May 2006
Posts: 47
juanchoc is on a distinguished road
3bar break

High, i made this simple expert for a friend, and now he wants to only allow one trade on the same direction.
So if there's a buy position open, the expert wont open another buy position; and if there's a sell position open, the expert wont open another sell position.

Could someone help me?

Thanks in advance,
JCC
Attached Files
File Type: mq4 3break.mq4 (10.0 KB, 80 views)
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!
 
Old 11-08-2006, 01:20 PM
kohzadi's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Tehran-IR Iran
Posts: 110
kohzadi is on a distinguished road
Quote:
Originally Posted by juanchoc
High, i made this simple expert for a friend, and now he wants to only allow one trade on the same direction.
So if there's a buy position open, the expert wont open another buy position; and if there's a sell position open, the expert wont open another sell position.

Could someone help me?

Thanks in advance,
JCC

Hi
Thanks man
Could you explain more about this EA and adjustment , TF…?
__________________
health & wealth , success & happiness
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!
 
Old 11-08-2006, 02:59 PM
Member
 
Join Date: May 2006
Posts: 47
juanchoc is on a distinguished road
Hi
Its pretty simple, if you have 3 consecutive bars making higher closes, then it buys, if you have 3 consecutive bars making lower closes, then it sells.
Closes positions on reverse signals.

The thing is that i must limit this EA to just 1 open trade at a time, and to only open 1 trade in the same direcction.
If someone could helpme add that code to the ea i'll be thankful.

As for timeframe you can use anyone, i didnt fully test this ea, because it's just for a friend that asked me for it.

I guess it should work well with the limit i just said, and with really tight stops and tight trailing stops (sl arround 10-14 pips for 1h tf, 20-25 for 1d tf, and ts arround 20 for 1h, 40 for 1d tf).

Thanks in advance,
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!
 
Old 11-08-2006, 06:09 PM
Junior Member
 
Join Date: Nov 2006
Location: MA, USA
Posts: 12
achandrasekaran99 is on a distinguished road
Limiting existing positions

You can try to put your order opening instructions inside this if loop. In that way, your order will go through only if there is no existing position. [I am a rookie and copied this from another Expert].

if (!ExistPositions()){

}
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!
 
Old 11-08-2006, 10:59 PM
Member
 
Join Date: Aug 2006
Location: Santo Domingo, DR
Posts: 72
ZeeJay is on a distinguished road
Thumbs up the requested change.

Quote:
Originally Posted by juanchoc
High, i made this simple expert for a friend, and now he wants to only allow one trade on the same direction.
So if there's a buy position open, the expert wont open another buy position; and if there's a sell position open, the expert wont open another sell position.

Could someone help me?

Thanks in advance,
JCC
Hi,

I've added 2 parameters : maxBuys and maxSells, i check for those values
where you set the entry signals, and i assign count the orders in the order loop before that.

hope this helps,
CJ.-
Attached Files
File Type: mq4 3break.mq4 (10.2 KB, 84 views)
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!
 
Old 11-09-2006, 12:35 AM
Member
 
Join Date: May 2006
Posts: 47
juanchoc is on a distinguished road
Wow!
Thanks, just what i was looking for.
Thanks a lot ZeeJay
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!
 

Bookmarks
Thread Tools

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
Cavaliers Break zappata Suggestions for Trading Systems 53 07-09-2007 04:30 PM
3 line break RickW00716 General Discussion 2 04-12-2007 11:10 AM
Dynamic Break Out Linuxser Indicators - Metatrader 4 1 10-09-2006 05:04 AM
Break through system manager Suggestions for Trading Systems 3 03-13-2006 11:16 AM


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



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