MQL4 - automated forex trading   /  

Forum

how to open only one position per bar?

Back to topics list To post a new topic, please log in or register

avatar
6
janekpietrzyk 2008.01.22 17:23 
Hi,
can U tell me how to make an EA open only one position per one bar?

Cause now it looks something like this:


I also don't want to use "if(OrdersTotal<1)" used in many codes because I want to have more than one order opend at a time (but not in the same bar)

Thank for any help,
Jan


article

Breakpoints in Tester: It's Possible!

The article deals with breakpoint emulation when passed through Tester, debug information being displayed.


avatar
2462
phy 2008.01.22 17:25 

avatar
59
Automated 2008.01.22 18:00 

the code in the post that phy points to is slightly incorrect though, here's a fixed one:

datetime Time0 = 0;
 
void start()
{
  if (Time0 != Time[0])
  {
    OrderSend(...);
    Time0 = Time[0];
  }
}
thank you

avatar
6
janekpietrzyk 2008.01.22 18:29 
Thanks a lot Guys - phy and Automated!

Regards,
jan
Back to topics list  

To add comments, please log in or register