[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 115

 
How the hell can the conditionif (OrderType()==SELL) not be met? if the order is Sell?
 
Dimka-novitsek:
How the hell can the conditionif (OrderType()==SELL) not be met? if the order is Sell?
I think it should look like this: if (OrderType()==OP_SELL)
 
Dimka-novitsek:
The hell he knows, but where isOrderSend? There'sOrderModify! Probably zero is the price stays the same!


Exactly OrderModify. I wish I knew for sure if it's like that or maybe... :) Can anybody confirm this assumption? I thought so too, when looking at the code, but the documentation usesOrderOpenPrice() to keep the price the same.

 
sergeev:

to avoid compiler optimization - this construction is incorrect,

as we do not know what will be checked first - OrderSelect or OrderCloseTime



How is it correct?
 
hoz:

What's the right way?
like this.
   if (!OrderSelect(ticket, SELECT_BY_TICKET)) { Alert("Фатальная ошибка при установке стопов и профитов нового ордера!"); return(false); }
   if (OrderCloseTime()!=0) { Alert("Фатальная ошибка при установке стопов и профитов нового ордера!"); return(false); }
или так

   bool b=OrderSelect(ticket, SELECT_BY_TICKET); 
   if (b) b=(OrderCloseTime()!= 0); 
   if (!b){ Alert("Фатальная ошибка при установке стопов и профитов нового ордера!"); return(false); }

или еще 100500 вариантов, зависящих от структуры логики вашего эксперта
 
How do I teach the computer to perform this strictly business task biz brakes? Otherwise, the speed tester lever only responds if it wants to! The delay is often 3-8 seconds. Mentioning all the bad women!
 
Thank you!!! Yes!!
 
Hello, can you tell me why in build 451 in MetaEditor when you compile, the second ex 4 file does not appear in the experts folder.
 

Good evening, Gurus, help me put together a function for an EA.

For trading on short term highs and lows

Larry Williams, if( Low[1]<Low[2]>Low[3]) -buy

if(High[1]>High[2]<High[3]- продажа

1,2,3 previous bars from the current 0

 
novator:

Good evening, Gurus, help me put together a function for an EA.

For trading on short term highs and lows

Larry Williams, if( Low[1]<Low[2]>Low[3]) -buy

if(High[1]>High[2]<High[3]- продажа

1,2,3 previous bars from the current 0



Have you tried fractals?