Errors, bugs, questions - page 1897

 
Konstantin:
my calculation works out like this:
how does it end up being correct?

It is not clear what the doubt is - my logic is simple - calculate how much was spent on buying assets in total (if we forget about the margin) and divide by the total number of units purchased - this will be the average price of one asset - i.e. breakeven.

 

I remember the developers talking about the possibility of exchanging data between agents. Where can I see an example?

It seems that the frame channel is one-way - from agents to the terminal, but not vice versa.

 
Execution error
void OnStart()
{
  int Array[];
  
  Array[ArrayResize(Array, ArraySize(Array) + 1) - 1] = 0; // array out of range
}
 
Execution error
struct INT
{
  int Array[];
};

void OnStart()
{
  INT i = {0}; //  Если убрать "= {0}" - ошибка выполнения исчезает
  
  Print(ArrayResize(i.Array, 5)); // -1
}
 
fxsaber:
Runtime error
If the structure contains strings and arrays like this {0} better not initialize it, it threw an exception for me.
 

Local agents return the same TerminalInfoInteger(TERMINAL_DLLS_ALLOWED) value until you reload the terminal.

For example, you want DLL agents not to execute. You uncheck the DLL checkbox in the terminal, and the agents keep "happy".


 
Комбинатор:
if there are strings and arrays in the structure like this {0} is better not to initialize it, it threw an exception in my case.
There seems to be a potential vulnerability there.
 
fxsaber:

I remember the developers talking about the possibility of exchanging data between agents. Where can I see an example?

Seems to be a one-way frame channel - from agents to the terminal, but not the other way around.

Forum on trading, automated trading systems and testing of trading strategies

Working with the Expert Advisor Files in the Strategy Tester

Renat Fatkhullin, 2012.08.27 01:41

When working with clud or remote agents, the files used (for reading) must be clearly specified through #property tester_file "myfile1.dat". In this case, the tester passes these files to the cloud along with the source EA, with changes to this file controlled and cached on the cloud servers and agents.

It is possible to transfer large amounts of raw data to the clouds, and receive calculations including massive data via FrameAdd() in the report.

Can I change tester_file-files in OnTesterPass and thus transfer the required information to the Cloud?
 
fxsaber:

In the standard MQL5\Experts\Examples\Moving Average\Moving Average.mq5

Magic check has been missed in TradeSizeOptimized.

Please check this variant.

For my part I have run 9 instances of this EA with different settings and magics to trade online on the embedded VPS - I will watch https://www.mql5.com/ru/signals/305333.

Торговые сигналы для MetaTrader 5: Standard Moving Average 9 instances
Торговые сигналы для MetaTrader 5: Standard Moving Average 9 instances
  • Rashid Umarov
  • www.mql5.com
Торговый Сигнал Standard Moving Average 9 instances для MetaTrader 5: копирование сделок, мониторинг счета, автоматическое исполнение сигналов и социальный трейдинг
Files:
 
Rashid Umarov:

Take a look at this option, please.

For my part, I've run 9 instances of this EA with different settings and magics to trade online on the built-in VPS - I'll be watching https://www.mql5.com/ru/signals/305333.

This EA's lot selection is affected by any third-party trade (including other instances) on the original symbol.

In this piece it happens

      HistorySelect(0,TimeCurrent());
      //---
      int    orders=HistoryDealsTotal();  // total history deals
      int    losses=0;                    // number of losses orders without a break

      for(int i=orders-1;i>=0;i--)
        {
         ulong ticket=HistoryDealGetTicket(i);
         if(ticket==0)
           {
            Print("HistoryDealGetTicket failed, no trade history");
            break;
           }
         //--- check symbol
         if(HistoryDealGetString(ticket,DEAL_SYMBOL)!=_Symbol)
            continue;
         //--- check profit
         double profit=HistoryDealGetDouble(ticket,DEAL_PROFIT);
         if(profit>0.0)
            break;
         if(profit<0.0)
            losses++;
        }
      //---
      if(losses>1)
         lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);