Errors, bugs, questions - page 1549

 
comp:

Understood, thank you. Unfortunately, this solution will work only in Expert Advisor (in which the calculation should be interrupted). It won't work in the indicator, because calling the indicator on the chart doesn't create a parallel chart queue, it enters the same event queue, not even for a specific chart, but for ALL the charts of this symbol.

How to shove the indicator as MQ5-resource instead of EX5-resource?

You can't. Moreover, you can not try to edit the code (program text) from another program.
 

Guys! What could be the problem? I put an order

m_trade.SellLimit(1,Ask+40,_Symbol,0,0,ORDER_TIME_GTC,0,")

It's being set. And...at the same rate it is deleted. There is only one(already) line in the EA! This one! I.e. it is not my EA that deletes the order. What is the problem?

 
Karputov Vladimir:
You can't. Especially you can't try to edit the code itself (the program text) from another program.

Can carry EX5 as an array in the code. Create an EX5 file in the sandbox and connect it as a resource.

Just why such a hassle, when it would be more logical to do the same, if you could connect MQ5-resource at once.

 
comp:

Can carry EX5 as an array in the code. Create an EX5 file in the sandbox and connect it as a resource.

Just why such a hassle, when it would be more logical to do the same thing, if you could connect MQ5-resource at once.

Take the existing rules for granted, instead of requiring the implementation of your own desires.
 
Karputov Vladimir:
Take the existing rules for granted, instead of demanding the implementation of your own desires.
Where do you see demands?!
 

comp:

if it were possible to connect the MQ5 resource at once.

and what is the objective apart from academic interest?
 
o_O:
And what is the goal apart from academic interest?

In fact, the developers have made a ban on this

comp:

I can carry EX5 as an array in my code. Create EX5 file in a sandbox and plug it in as a resource.

But that's not the point, of course. I would like to make a universal IsChanged() and connect it through #include.

I do not want to lug the parallelism indicator EX5-file with me. I don't know what kind of things may be put into it. If MQ5 is an open source, it has another attitude.

 
If the "indicator is too slow" never appears in the log during the execution of the indicator, is it possible to say that the indicator did not freeze?
 
comp:
If "indicator is too slow" never appeared in the log during the indicator run, may we confirm that the indicator does not hang?

No one can give a 100% guarantee anywhere :) .If the indicator in the message queue at least places something, it makes sense to test it on the fast market.

Added. If the indicator at least places something in the message queue, then, in addition to testing on the fast market, it makes sense to run several indicators in the terminal.

 
Karputov Vladimir:

No one can give a 100% guarantee anywhere :) .If the indicator in the message queue at least places something, it makes sense to test it on the fast market.

Added. If the indicator at least places something in the message queue, then, in addition to testing on the fast market, it makes sense to run several indicators in the terminal.

The fast market can be emulated through a call of FullOnCalculate()

#define  TIMESERIES(X)                                                  \
   ::ArraySetAsSeries(X, TRUE);                                        \
   Size = ::MathMin(Copy##X(::Symbol(), ::Period(), 0, bars, X), Size);  

int FullOnCalculate( const int Prev_Calculated = 0 )
{
  int Spread[];
  long RealVolume[];
  
  int Size = INT_MAX;
  
  #ifdef __MQL4__
    const int bars = ::Bars;
  #endif

  #ifdef __MQL5__
    const int bars = ::Bars(::Symbol(), ::Period());
  #endif

   TIMESERIES(Spread)
  TIMESERIES(RealVolume)
  
  #ifdef __MQL4__
    return(::OnCalculate(Size, Prev_Calculated, Time, Open, High, Low, Close, RealVolume, Volume, Spread));
  #endif
  
  #ifdef __MQL5__
    datetime Time[];
    double Open[];
    double High[];
    double Low[];
    double Close[];
    long TickVolume[];

    TIMESERIES(Time)
    TIMESERIES(Open)
    TIMESERIES(High)
    TIMESERIES(Low)
    TIMESERIES(Close)
    TIMESERIES(TickVolume)
  
    return(::OnCalculate(Size, Prev_Calculated, Time, Open, High, Low, Close, RealVolume, TickVolume, Spread));
  #endif
}

the event model - similarly. The question was about something else

comp:
If during the execution of an indicator there was no "indicator is too slow" in its log, may we conclude that the indicator didn't freeze?

The past tense in terms of Russian language teaching.