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 06-04-2006, 12:12 PM
babarmughal's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 315
babarmughal is on a distinguished road
Smile One Entry Per Bar....

Hi Guys,

what can I put into an EA so that when the conditions meet it only opens 1 order and if the order is closed (TP has reached) no matter if the conditions meet again..should not open another order...

Thanks
Babar
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 06-04-2006, 01:08 PM
harryhid's Avatar
Member
 
Join Date: Feb 2006
Location: Bandung,Indonesia
Posts: 86
harryhid is on a distinguished road
Quote:
Originally Posted by babarmughal
Hi Guys,

what can I put into an EA so that when the conditions meet it only opens 1 order and if the order is closed (TP has reached) no matter if the conditions meet again..should not open another order...

Thanks
Babar
Yes, i want to know too. If we can do this then we can just make an EA base on some stadart simple indicator.
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 06-05-2006, 11:12 PM
Aaragorn's Avatar
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
Quote:
Originally Posted by harryhid
Yes, i want to know too. If we can do this then we can just make an EA base on some stadart simple indicator.
i know how to do it in a spreadsheet but I'm afraid I don't know how to tell you to do it in code but there is probably more than one solution that will work if you know how to do it. Can you write a code to detect if a position is already open? What can you detect about the account with code? Can you tell when the last order was opened, what the available margin is? Something about the account that you CAN detect which will be obviously different if a position is already open?
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
  #4 (permalink)  
Old 06-06-2006, 12:30 AM
Aaragorn's Avatar
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
Quote:
Originally Posted by harryhid
Yes, i want to know too. If we can do this then we can just make an EA base on some stadart simple indicator.
http://www.forex-tsd.com/12186-post40.html
found this on the site...would this help?
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
  #5 (permalink)  
Old 06-06-2006, 01:56 AM
Senior Member
 
Join Date: Feb 2006
Posts: 587
Michel is on a distinguished road
Quote:
Originally Posted by babarmughal
Hi Guys,

what can I put into an EA so that when the conditions meet it only opens 1 order and if the order is closed (TP has reached) no matter if the conditions meet again..should not open another order...

Thanks
Babar
one entry per bar :
PHP Code:

if(Time[0] > LastTime)
{
   
TradeThisBar true;
   
LastTime Time[0];
}

...

if(
EntryCondition && TradeThisBar)
{
   if(
OrderSend(......) > 0TradeThisBar false;

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

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
3 Entry 2 MA of RSI Cross Beno Expert Advisors - Metatrader 4 6 11-23-2008 12:09 PM
One entry per cross of MA.. babarmughal Expert Advisors - Metatrader 4 1 11-21-2006 12:27 AM
One entry per BUY ORDER babarmughal Expert Advisors - Metatrader 4 1 05-14-2006 02:18 PM


All times are GMT. The time now is 04:17 PM.



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