[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 340

 
Bar times to memorise and compare.
 
mqlskeptik:

I wonder how to correctly program the EA so that it does not perform calculations at every tick, but when a new bar is formed.

Maybe it goes like this:

double newbar;

start()

{

if (newbar != iLow(NULL, 0, 1))

{

calculations..........................................

newbar = iLow(NULL, 0, 1);

}

}

int time=-1;
int start()
  {
      if (time!=Time[0])
         {
            /// вычисления на новом баре         

            time=Time[0];
         }

      return(0);
  }
 

guys help...

how to make it so that if there are orders, they will be closed, according to certain conditions....?

 
Vovo4ka:

guys help...

how to make it so that if there are orders, they will be closed, according to certain conditions....?


Remove stops and takeovers and wait for conditions
 
Vovo4ka:

guys help...

how to make sure that if i have orders, they will be closed, according to specific conditions....?

if( your closing conditions) OrderClose();

see https://docs.mql4.com/ru/trading/OrderClose there's an example...

 
charter:

if( your closing conditions) OrderClose();

see https://docs.mql4.com/ru/trading/OrderClose there's an example...


I want to close orders by trolling, all the time they transfer profit, I just want them to be closed by force, not by stop.
 
Vinin:

Remove stops and takeaways and wait for conditions

working without stops is dangerous))
 
Vovo4ka:

guys help...

how to make it so that if there are orders, they will close, under certain conditions....?


Don't be stupid - before you spam on this forum, get acquainted with the tutorial and documentation... At least here.

P.S. Respect yourselves first. :-)))

 
Vovo4ka:

working without stops is dangerous))

No one is arguing that. But if the levels are calculated and there is a signal. There should be no problem. But if there is no signal, then it is a problem (actually, just kidding). Generally speaking, it is up to you to decide. I would not refuse from the stops, just make them reasonable. And everyone is prudent (unfortunately, or fortunately - otherwise there would be no money).
 
Roman.:


Don't be stupid - before you spam on this forum, get acquainted with the tutorial and documentation... At least here.

P.S. Have some respect for yourself first. :-)))


And ask for a link, it's not like I'm asking you to write code, and the topic is sort of "help for newbies..." so it's not spam. And it's inherently stupid for newbies...