Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


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 06-04-2006, 11:12 AM
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!
Reply With Quote
  #2 (permalink)  
Old 06-04-2006, 12: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!
Reply With Quote
  #3 (permalink)  
Old 06-05-2006, 10: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!
Reply With Quote
  #4 (permalink)  
Old 06-05-2006, 11:30 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.
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!
Reply With Quote
  #5 (permalink)  
Old 06-06-2006, 12:56 AM
Senior Member
 
Join Date: Feb 2006
Posts: 513
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!
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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3 Entry 2 MA of RSI Cross Beno Expert Advisors - Metatrader 4 1 11-30-2006 07:07 PM
One entry per cross of MA.. babarmughal Expert Advisors - Metatrader 4 1 11-20-2006 11:27 PM
One entry per BUY ORDER babarmughal Expert Advisors - Metatrader 4 1 05-14-2006 01:18 PM


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



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