Errors, bugs, questions - page 1916

 

Why has the Service Desk stopped responding to applications? There's just a routine message:"Your application has been accepted for consideration" and then silence. No comments, no questions, no results.Over the past month I already have a bunch of such requests hangs on various topics: both on bugs and on proposals. It is unclear whether someone is dealing with them at all or not. Previously, there was always a format of dialogue, but now it is unclear what. There's no point in writing there at all if no one needs it.

 

how to get an event from another chart where EA is not installed?

ps. all solved, forgot to send a broadcast message ))
 

A request to the developers.

I have such a funny thing. I usually press start after optimization and change a couple of parameters in my Expert Advisor out of habit in MT4.

The problem is that if I have tested the strategy for a couple of hours and did not switch from optimization, the results are lost

Can I change the single test option like in MT4?

Many thanks in advance.

 
In the strategy tester in the visualisation the current history opens with a delay (starting from the second trade), until you switch to trades or orders and back, or after 1-2 trades it is updated
 
Anton Ohmat:
In the strategy tester in the visualisation the current history opens with a delay (starting from the second trade), until you switch to trades or orders and back, or after 1-2 trades it is updated

Set the rewind speed to minus three steps from the maximum speed. Also, you probably have output "Comment" on the chart - "Comment" always freezes update information in the tester at rewind speeds close to the maximum.


 
Anton Ohmat:
In the strategy visualization in the Strategy Tester the current history is opened with a delay (starting from the second trade), until you switch to trades or orders and back, or in 1-2 trades it is updated

There is a request(no reply)

Forum on trading, automated trading systems and trading strategies testing

Bugs, bugs, questions

fxsaber, 2017.06.07 22:33

Trading environment GUI when debugging on history (speed slider - maximum) does not correspond to reality
#include <Trade\Trade.mqh>

input int Interval = 3600;
input int AmountLastDeals = 5;
input double Lots = 1;

double CorrectLot( const double Lot )
{
  static const double StepVol = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);
  static const double MaxVol = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MAX);
  static const double MinVol = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN);
  
  const double Vol = StepVol * (int)(Lot / StepVol + 0.5);
  
  return((Vol < MinVol) ? MinVol : ((Vol > MaxVol) ? MaxVol : Vol));
}

void OnTick()
{
  static CTrade Trade;
  static CDealInfo Deal;
  static CPositionInfo Position; 

  if (!Position.Select(_Symbol))
  {
    if (HistorySelect(0, TimeCurrent()))
    {
      const int Total = HistoryDealsTotal() - 1;

      double SumProfit = 0;
      double SumLots = 0;

      for (int i = Total, Count = 0; (i >= 0) && (Count < AmountLastDeals); i--)
        if (Deal.SelectByIndex(i) && (Deal.Entry() == DEAL_ENTRY_OUT))
        {        
          SumProfit += Deal.Profit() * (AmountLastDeals - Count) / AmountLastDeals;
          SumLots += Deal.Volume() * (AmountLastDeals - Count) / AmountLastDeals;
          
          Count++;
        }

      if (Total == 2)
      {
        string Str;
        
        for (int i = Total; i >= 0; i--)
          if (Deal.SelectByIndex(i))
            Print(Deal.FormatDeal(Str));
        
        DebugBreak();
      }

      if ((Total >= 0) && Deal.SelectByIndex(Total) && (Deal.DealType() == DEAL_TYPE_SELL))
        Trade.Sell((SumProfit >= 0) ? Lots : CorrectLot(SumLots));
      else
        Trade.Buy((SumProfit >= 0) ? Lots : CorrectLot(SumLots));
    }       
  }
  else if (TimeCurrent() - Position.Time() >= Interval)
    Trade.PositionClose(_Symbol);
}
Log at the moment of DebugBreak
2017.06.07 23:29:03.554 EURUSD : real ticks begin from 2017.04.10 00:00:00
2017.06.07 23:29:03.564 2017.04.10 00:00:00   instant buy 1.00 EURUSD at 1.05918 (1.05885 / 1.05918)
2017.06.07 23:29:03.564 2017.04.10 00:00:00   deal #2 buy 1.00 EURUSD at 1.05918 done (based on order #2)
2017.06.07 23:29:03.564 2017.04.10 00:00:00   deal performed [#2 buy 1.00 EURUSD at 1.05918]
2017.06.07 23:29:03.564 2017.04.10 00:00:00   order performed buy 1.00 at 1.05918 [#2 buy 1.00 EURUSD at 1.05918]
2017.06.07 23:29:03.566 2017.04.10 00:00:00   CTrade::OrderSend: instant buy 1.00 EURUSD at 1.05918 [done at 1.05918]
2017.06.07 23:29:03.569 2017.04.10 01:00:00   instant sell 1.00 EURUSD at 1.05833 (1.05833 / 1.05845 / 1.05831)
2017.06.07 23:29:03.569 2017.04.10 01:00:00   deal #3 sell 1.00 EURUSD at 1.05833 done (based on order #3)
2017.06.07 23:29:03.569 2017.04.10 01:00:00   deal performed [#3 sell 1.00 EURUSD at 1.05833]
2017.06.07 23:29:03.569 2017.04.10 01:00:00   order performed sell 1.00 at 1.05833 [#3 sell 1.00 EURUSD at 1.05833]
2017.06.07 23:29:03.570 2017.04.10 01:00:00   CTrade::OrderSend: instant sell 1.00 EURUSD at 1.05833 [done at 1.05833]
2017.06.07 23:29:03.570 2017.04.10 01:00:00   #3 sell 1.00 EURUSD at 1.05833
2017.06.07 23:29:03.570 2017.04.10 01:00:00   #2 buy 1.00 EURUSD at 1.05918
2017.06.07 23:29:03.570 2017.04.10 01:00:00   CSymbolInfo::CheckMarketWatch: Unknown symbol ''
2017.06.07 23:29:03.570 2017.04.10 01:00:00   #1 balance 100000.00 []
Screenshot


Last trade is not displayed in GUI. Reproduced on 1596-1606.

 
fxsaber:

There is an application hanging in the BOD

It's been said many times before that at maximum speed slider in the visual tester, don't look for the truth. The gui is 100% jammed and prevents many components (mainly sheet controls) from updating
 
Slava:
It's been said many times before that at maximum speed slider in the visual tester, don't look for the truth. Gui is 100% jammed and does not allow many components (mainly sheet controls) to update

The CD talks about debugging with 100% playback.

 
Slava:
It's been said many times before that at the maximum of the speed slider in the visual tester, don't look for the truth. The gui is 100% jammed and does not allow many components (mainly leaf-controls) to update
Speed is not maxed out. On pause. When you press f12 this happens. When releasing f12 - still nothing happens - history is not updated
 
Anton Ohmat:
The speed is not the maximum. On pause. When pressing f12 this happens. When releasing f12 - still nothing happens - history is not updated

Set the speed minus three steps from the maximum - otherwise interface updates are not guaranteed.