[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 265

 
BooGUY:
Please advise! There are two conditions, for buy and sell. After catching a loser by a false signal, e.g. on buy, the Expert Advisor starts to open the next position again by this false signal and again catches a loser. How should I make my EA wait for the signal in the opposite direction after the loss and not open by the false signal again? Thank you!

you can memorise the ticket of an order (at the moment of OrderSend) and then check its profit and direction at the moment of opening the next order (before OrderSend)

or you can scan the history and take the last order of the EA and similarly check it before OrderSend

 
sergeev:

you can memorise the ticket of an order (at the moment of OrderSend) and then check its profit and direction at the moment of opening the next order (before OrderSend)

or you can scan the history and take the last order of the EA and similarly check it before OrderSend

Please write the code, if you can. This is the very part. It is based on example of a muwings. Thank you in advance!

If my EA has a flat channel or sharp spike in the opposite direction to sell, at this time, the moving averages still show buy and open a buy order again after a loss.

 

Hi,

From the picture-why does it count the kills if there aren't any?

 
VOLDEMAR:

I made a chat programmer in Skype! Come add! Help each other . Look for customers for your work and look for orders! Place tenders for orders !!!!

Skype: chat_programerov_mql4

add me to the group - diliksu84
 
Techno:
show the full code
int start()                                     // Спец. функция start
  {
   double bid   =MarketInfo(Symbol(),MODE_BID); // Запрос значения Bid
   double ask   =MarketInfo(Symbol(),MODE_ASK); // Запрос значения Ask
   double point =MarketInfo(Symbol(),MODE_POINT);//Запрос Point
   // Открытие BUY
   OrderSend(Symbol(),OP_BUY,0.1,ask,3,bid-15*Point,bid+15*Point);
   Alert (GetLastError());                      // Сообщение об ошибке
   return;                                      // Выход из start()
  }
Вот код полностью...
 
Golden-dark:
Hello, could you please tell me why the standard OrderSend function doesn't work ? Just taking the source code from the tutorial on this site, but nothing happens. When I added error output, it says 4109 - uninitialized string in an array...
4109 is ERR_TRADE_NOT_ALLOWED - no trade allowed
 
mario065:
From the picture-why does it count killings if there are none?

This is the drawdown, a measure of how low the equity (green line) fell when positions were open during the overshoot. But fortunately, they were already in the plus at the time of closing, so there are no losing trades.
 
granit77:
This is the drawdown, an indicator of how low the equity (green line) fell when positions were open during the overshoot. But fortunately, at the time of closing the positions, they have already come out in the plus, so there are no losing trades.

Thanks ;)
 
Thank you all, it's sorted.
 
Good afternoon! Can you advise how to remove LiveUpdate? I've checked the box that prompts me to update with right and left mouse clicks, searched my computer for LiveUpdate folder, no result.
Reason: