I will write an advisor free of charge - page 139

 
Evgeniia Khaganeti:
Great! This is exactly what was needed. No errors on the test.

One more thing: can we introduce a trade filter to open trades only on the first signal? For example, condition to buy: price was below the BB, then entered the BB, crossed the top of the BB, open a buy. If the price was not below the BB, but crossed the upper limit again, then we do not open these orders. I am attaching the screenshot for clarity.
It is the same for the sales.
Do you like this variant? Only one order is opened. Until it closes, others will not open. If so, here you go.
Files:
 
Hello, see what the problem is please.

EA is waiting for open order from trader or other EA to enter.
if momentum is moving then position is building up on trend, in Sell works well, but from Bay ignores
Основы тестирования в MetaTrader 5
Основы тестирования в MetaTrader 5
  • www.mql5.com
В чем различия между тремя режимами тестирования в MetaTrader 5 и на что обратить внимание? Как происходит тестирование эксперта, торгующего одновременно на нескольких инструментах? Когда и как вычисляются значения индикаторов при тестировании и как обрабатываются события? Как синхронизировать бары с разных инструментов при тестировании в режиме "Только цены открытия"? Статья призвана дать ответы на эти и многие другие вопросы.
Files:
mrT.mq4  9 kb
 

The second condition will never be met. Fulfilment of the first will not.

   if(CountBuy() + CountSell() == 0)
     {
      if(OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, 0, 0, "", Magic, 0, Red)< 1)
         Print("Не вдалось відкрити ордер на продажу!");
     }
   if(CountBuy() + CountSell() == 0)
     {
      if(OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, 0, 0, "", Magic, 0, Blue)<1)
         Print("Не вдалось відкрити ордер на покупку!");
     }
 
Александр:
Will this variant suit you? Only one deal is opened. Until it closes, it will not open other ones. If so, here it is.

No. It's not exactly how the deal opens. Somewhere it does, somewhere it doesn't.
Found an arrow indicator, it's on the BB. It's the arrow that shows the first breakthrough. Is there a way to make them work together? So, the owl would not take all the punctures at all, but only the ones that coincide with the arrow?

Files:
 

Hi all, wanted to ask a question. Maybe someone knows or can re-do an information indicator that shows when several positions are opened total profit and total loss as on the screenshot. There is a version for MT4 with open source. Can someone see this on mt5 or know how to remake or just remake)))) I would be very grateful!!!!! The habit is a serious matter)))))


time indicator

Как заказать торгового робота на MQL5 и MQL4
Как заказать торгового робота на MQL5 и MQL4
  • www.mql5.com
Сервис "Фриланс" является самой большой биржей для заказа торговых роботов и технических индикаторов. Сотни профессиональных разработчиков готовы написать торговое приложение для терминала MetaTrader 4/5.
 
Aleksei Stepanenko:

The second condition will never be met. Fulfilling the first one won't.

Thank you!

 
Aleksei Stepanenko:

The second condition will never be met. Fulfilling the first one won't.

Of course it will. There's no return. But it's easier to write

   if(CountBuy() + CountSell() == 0)
     {
      if(OrderSend(Symbol(), OP_SELL, Lots, Bid, slippage, 0, 0, "", Magic, 0, Red)< 1)
         Print("Не вдалось відкрити ордер на продажу!");
      if(OrderSend(Symbol(), OP_BUY, Lots, Ask, slippage, 0, 0, "", Magic, 0, Blue)<1)
         Print("Не вдалось відкрити ордер на покупку!");
     }
 
Konstantin Nikitin:

I'm sure it will.

.

 
Evgeniia Khaganeti:

No. It's not exactly how the deal opens. Somewhere it matches, somewhere it doesn't.
Found an arrow indicator, it's on the BB. It's the arrow that shows the first breakthrough. Is there a way to make them work together? The owl would not look for all of the breakdowns but for those that coincide with the arrow?

Try it.

Files:
 

Good afternoon, Anton! If your offer is relevant, I would like to suggest automating my TS. In it I usually use either WPR or DPO.

The description of TS with WPR indicator:

The indicator is used with a large period and for each instrument you need to select it.

Only 1 level (-50) is used in the indicator.

Entry/Exit into the transaction at the level crossing from the next candle conditional.

I use stoploss and trailing stop in pips.

There is a nuance, for each new candle I calculate 50% of indicator movement and this conventional level in the indicator acts for me as a signal to exit the deal when the indicator line crosses it. It is a difficult task to calculate and draw this level in my mind. The question is whether it is possible to make this conventional level in the indicator real, for it to work on the principle of a trading stop.

Then the TS will look as follows at crossing the level of -50 upwards - a buy deal, at movement of the indicator line up from the level of -50 will move level with conditional designation of 50% of the indicator line movement and at crossing of this level by the indicator line will exit the deal. On the hour it is about 200 points, not much, but stable. The deal to sell - reverse. I hope this is clear.